PageRenderTime 103ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/MiniMint/Models/generated/MiniMintDbContext.designer.cs

https://github.com/DevTheo/dtminimint
C# | 701 lines | 608 code | 84 blank | 9 comment | 58 complexity | c73303297debea40639a2b5edb593ff2 MD5 | raw file
  1. #pragma warning disable 1591
  2. //------------------------------------------------------------------------------
  3. // <auto-generated>
  4. // This code was generated by a tool.
  5. // Runtime Version:2.0.50727.4918
  6. //
  7. // Changes to this file may cause incorrect behavior and will be lost if
  8. // the code is regenerated.
  9. // </auto-generated>
  10. //------------------------------------------------------------------------------
  11. namespace MiniMint.Data
  12. {
  13. using System.Data.Linq;
  14. using System.Data.Linq.Mapping;
  15. using System.Data;
  16. using System.Collections.Generic;
  17. using System.Reflection;
  18. using System.Linq;
  19. using System.Linq.Expressions;
  20. [System.Data.Linq.Mapping.DatabaseAttribute(Name="DTBanking")]
  21. public partial class MiniMintDbContext : System.Data.Linq.DataContext
  22. {
  23. private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
  24. #region Extensibility Method Definitions
  25. partial void OnCreated();
  26. partial void Insertaccount(MiniMint.Models.generated.account instance);
  27. partial void Updateaccount(MiniMint.Models.generated.account instance);
  28. partial void Deleteaccount(MiniMint.Models.generated.account instance);
  29. partial void Insertdailyregister(MiniMint.Models.generated.dailyregister instance);
  30. partial void Updatedailyregister(MiniMint.Models.generated.dailyregister instance);
  31. partial void Deletedailyregister(MiniMint.Models.generated.dailyregister instance);
  32. partial void Insertregistercategory(MiniMint.Models.generated.registercategory instance);
  33. partial void Updateregistercategory(MiniMint.Models.generated.registercategory instance);
  34. partial void Deleteregistercategory(MiniMint.Models.generated.registercategory instance);
  35. #endregion
  36. public MiniMintDbContext() :
  37. base(global::System.Configuration.ConfigurationManager.ConnectionStrings["MiniMintConnection"].ConnectionString, mappingSource)
  38. {
  39. OnCreated();
  40. }
  41. public MiniMintDbContext(string connection) :
  42. base(connection, mappingSource)
  43. {
  44. OnCreated();
  45. }
  46. public MiniMintDbContext(System.Data.IDbConnection connection) :
  47. base(connection, mappingSource)
  48. {
  49. OnCreated();
  50. }
  51. public MiniMintDbContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
  52. base(connection, mappingSource)
  53. {
  54. OnCreated();
  55. }
  56. public MiniMintDbContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
  57. base(connection, mappingSource)
  58. {
  59. OnCreated();
  60. }
  61. public System.Data.Linq.Table<MiniMint.Models.generated.account> accounts
  62. {
  63. get
  64. {
  65. return this.GetTable<MiniMint.Models.generated.account>();
  66. }
  67. }
  68. public System.Data.Linq.Table<MiniMint.Models.generated.dailyregister> dailyregisters
  69. {
  70. get
  71. {
  72. return this.GetTable<MiniMint.Models.generated.dailyregister>();
  73. }
  74. }
  75. public System.Data.Linq.Table<MiniMint.Models.generated.registercategory> registercategories
  76. {
  77. get
  78. {
  79. return this.GetTable<MiniMint.Models.generated.registercategory>();
  80. }
  81. }
  82. public System.Data.Linq.Table<MiniMint.Models.generated.accountsummary> accountsummaries
  83. {
  84. get
  85. {
  86. return this.GetTable<MiniMint.Models.generated.accountsummary>();
  87. }
  88. }
  89. [Function(Name="dbo.usp_summarydata_by_category")]
  90. public ISingleResult<MiniMint.Models.generated.usp_summarydata_by_categoryResult> usp_summarydata_by_category([Parameter(DbType="DateTime")] System.Nullable<System.DateTime> startDate, [Parameter(DbType="DateTime")] System.Nullable<System.DateTime> endDate)
  91. {
  92. IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), startDate, endDate);
  93. return ((ISingleResult<MiniMint.Models.generated.usp_summarydata_by_categoryResult>)(result.ReturnValue));
  94. }
  95. }
  96. }
  97. namespace MiniMint.Models.generated
  98. {
  99. using System.Data.Linq;
  100. using System.Data.Linq.Mapping;
  101. using System.ComponentModel;
  102. using System;
  103. [Table(Name="dbo.accounts")]
  104. public partial class account : INotifyPropertyChanging, INotifyPropertyChanged
  105. {
  106. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  107. private int _account_id;
  108. private string _account_name;
  109. private EntitySet<dailyregister> _dailyregisters;
  110. #region Extensibility Method Definitions
  111. partial void OnLoaded();
  112. partial void OnValidate(System.Data.Linq.ChangeAction action);
  113. partial void OnCreated();
  114. partial void Onaccount_idChanging(int value);
  115. partial void Onaccount_idChanged();
  116. partial void Onaccount_nameChanging(string value);
  117. partial void Onaccount_nameChanged();
  118. #endregion
  119. public account()
  120. {
  121. this._dailyregisters = new EntitySet<dailyregister>(new Action<dailyregister>(this.attach_dailyregisters), new Action<dailyregister>(this.detach_dailyregisters));
  122. OnCreated();
  123. }
  124. [Column(Storage="_account_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
  125. public int account_id
  126. {
  127. get
  128. {
  129. return this._account_id;
  130. }
  131. set
  132. {
  133. if ((this._account_id != value))
  134. {
  135. this.Onaccount_idChanging(value);
  136. this.SendPropertyChanging();
  137. this._account_id = value;
  138. this.SendPropertyChanged("account_id");
  139. this.Onaccount_idChanged();
  140. }
  141. }
  142. }
  143. [Column(Storage="_account_name", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
  144. public string account_name
  145. {
  146. get
  147. {
  148. return this._account_name;
  149. }
  150. set
  151. {
  152. if ((this._account_name != value))
  153. {
  154. this.Onaccount_nameChanging(value);
  155. this.SendPropertyChanging();
  156. this._account_name = value;
  157. this.SendPropertyChanged("account_name");
  158. this.Onaccount_nameChanged();
  159. }
  160. }
  161. }
  162. [Association(Name="account_dailyregister", Storage="_dailyregisters", ThisKey="account_id", OtherKey="registry_account")]
  163. public EntitySet<dailyregister> dailyregisters
  164. {
  165. get
  166. {
  167. return this._dailyregisters;
  168. }
  169. set
  170. {
  171. this._dailyregisters.Assign(value);
  172. }
  173. }
  174. public event PropertyChangingEventHandler PropertyChanging;
  175. public event PropertyChangedEventHandler PropertyChanged;
  176. protected virtual void SendPropertyChanging()
  177. {
  178. if ((this.PropertyChanging != null))
  179. {
  180. this.PropertyChanging(this, emptyChangingEventArgs);
  181. }
  182. }
  183. protected virtual void SendPropertyChanged(String propertyName)
  184. {
  185. if ((this.PropertyChanged != null))
  186. {
  187. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  188. }
  189. }
  190. private void attach_dailyregisters(dailyregister entity)
  191. {
  192. this.SendPropertyChanging();
  193. entity.account = this;
  194. }
  195. private void detach_dailyregisters(dailyregister entity)
  196. {
  197. this.SendPropertyChanging();
  198. entity.account = null;
  199. }
  200. }
  201. [Table(Name="dbo.dailyregister")]
  202. public partial class dailyregister : INotifyPropertyChanging, INotifyPropertyChanged
  203. {
  204. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  205. private int _registry_id;
  206. private System.DateTime _registry_date;
  207. private double _registry_amount;
  208. private string _registry_enteredby;
  209. private int _registry_account;
  210. private System.Nullable<int> _register_category_id;
  211. private EntityRef<account> _account;
  212. private EntityRef<registercategory> _registercategory;
  213. #region Extensibility Method Definitions
  214. partial void OnLoaded();
  215. partial void OnValidate(System.Data.Linq.ChangeAction action);
  216. partial void OnCreated();
  217. partial void Onregistry_idChanging(int value);
  218. partial void Onregistry_idChanged();
  219. partial void Onregistry_dateChanging(System.DateTime value);
  220. partial void Onregistry_dateChanged();
  221. partial void Onregistry_amountChanging(double value);
  222. partial void Onregistry_amountChanged();
  223. partial void Onregistry_enteredbyChanging(string value);
  224. partial void Onregistry_enteredbyChanged();
  225. partial void Onregistry_accountChanging(int value);
  226. partial void Onregistry_accountChanged();
  227. partial void Onregister_category_idChanging(System.Nullable<int> value);
  228. partial void Onregister_category_idChanged();
  229. #endregion
  230. public dailyregister()
  231. {
  232. this._account = default(EntityRef<account>);
  233. this._registercategory = default(EntityRef<registercategory>);
  234. OnCreated();
  235. }
  236. [Column(Storage="_registry_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
  237. public int registry_id
  238. {
  239. get
  240. {
  241. return this._registry_id;
  242. }
  243. set
  244. {
  245. if ((this._registry_id != value))
  246. {
  247. this.Onregistry_idChanging(value);
  248. this.SendPropertyChanging();
  249. this._registry_id = value;
  250. this.SendPropertyChanged("registry_id");
  251. this.Onregistry_idChanged();
  252. }
  253. }
  254. }
  255. [Column(Storage="_registry_date", DbType="DateTime NOT NULL")]
  256. public System.DateTime registry_date
  257. {
  258. get
  259. {
  260. return this._registry_date;
  261. }
  262. set
  263. {
  264. if ((this._registry_date != value))
  265. {
  266. this.Onregistry_dateChanging(value);
  267. this.SendPropertyChanging();
  268. this._registry_date = value;
  269. this.SendPropertyChanged("registry_date");
  270. this.Onregistry_dateChanged();
  271. }
  272. }
  273. }
  274. [Column(Storage="_registry_amount", DbType="Float NOT NULL")]
  275. public double registry_amount
  276. {
  277. get
  278. {
  279. return this._registry_amount;
  280. }
  281. set
  282. {
  283. if ((this._registry_amount != value))
  284. {
  285. this.Onregistry_amountChanging(value);
  286. this.SendPropertyChanging();
  287. this._registry_amount = value;
  288. this.SendPropertyChanged("registry_amount");
  289. this.Onregistry_amountChanged();
  290. }
  291. }
  292. }
  293. [Column(Storage="_registry_enteredby", DbType="VarChar(255) NOT NULL", CanBeNull=false)]
  294. public string registry_enteredby
  295. {
  296. get
  297. {
  298. return this._registry_enteredby;
  299. }
  300. set
  301. {
  302. if ((this._registry_enteredby != value))
  303. {
  304. this.Onregistry_enteredbyChanging(value);
  305. this.SendPropertyChanging();
  306. this._registry_enteredby = value;
  307. this.SendPropertyChanged("registry_enteredby");
  308. this.Onregistry_enteredbyChanged();
  309. }
  310. }
  311. }
  312. [Column(Storage="_registry_account", DbType="Int NOT NULL")]
  313. public int registry_account
  314. {
  315. get
  316. {
  317. return this._registry_account;
  318. }
  319. set
  320. {
  321. if ((this._registry_account != value))
  322. {
  323. if (this._account.HasLoadedOrAssignedValue)
  324. {
  325. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  326. }
  327. this.Onregistry_accountChanging(value);
  328. this.SendPropertyChanging();
  329. this._registry_account = value;
  330. this.SendPropertyChanged("registry_account");
  331. this.Onregistry_accountChanged();
  332. }
  333. }
  334. }
  335. [Column(Storage="_register_category_id", DbType="Int")]
  336. public System.Nullable<int> register_category_id
  337. {
  338. get
  339. {
  340. return this._register_category_id;
  341. }
  342. set
  343. {
  344. if ((this._register_category_id != value))
  345. {
  346. if (this._registercategory.HasLoadedOrAssignedValue)
  347. {
  348. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  349. }
  350. this.Onregister_category_idChanging(value);
  351. this.SendPropertyChanging();
  352. this._register_category_id = value;
  353. this.SendPropertyChanged("register_category_id");
  354. this.Onregister_category_idChanged();
  355. }
  356. }
  357. }
  358. [Association(Name="account_dailyregister", Storage="_account", ThisKey="registry_account", OtherKey="account_id", IsForeignKey=true)]
  359. public account account
  360. {
  361. get
  362. {
  363. return this._account.Entity;
  364. }
  365. set
  366. {
  367. account previousValue = this._account.Entity;
  368. if (((previousValue != value)
  369. || (this._account.HasLoadedOrAssignedValue == false)))
  370. {
  371. this.SendPropertyChanging();
  372. if ((previousValue != null))
  373. {
  374. this._account.Entity = null;
  375. previousValue.dailyregisters.Remove(this);
  376. }
  377. this._account.Entity = value;
  378. if ((value != null))
  379. {
  380. value.dailyregisters.Add(this);
  381. this._registry_account = value.account_id;
  382. }
  383. else
  384. {
  385. this._registry_account = default(int);
  386. }
  387. this.SendPropertyChanged("account");
  388. }
  389. }
  390. }
  391. [Association(Name="registercategory_dailyregister", Storage="_registercategory", ThisKey="register_category_id", OtherKey="register_category_id", IsForeignKey=true)]
  392. public registercategory registercategory
  393. {
  394. get
  395. {
  396. return this._registercategory.Entity;
  397. }
  398. set
  399. {
  400. registercategory previousValue = this._registercategory.Entity;
  401. if (((previousValue != value)
  402. || (this._registercategory.HasLoadedOrAssignedValue == false)))
  403. {
  404. this.SendPropertyChanging();
  405. if ((previousValue != null))
  406. {
  407. this._registercategory.Entity = null;
  408. previousValue.dailyregisters.Remove(this);
  409. }
  410. this._registercategory.Entity = value;
  411. if ((value != null))
  412. {
  413. value.dailyregisters.Add(this);
  414. this._register_category_id = value.register_category_id;
  415. }
  416. else
  417. {
  418. this._register_category_id = default(Nullable<int>);
  419. }
  420. this.SendPropertyChanged("registercategory");
  421. }
  422. }
  423. }
  424. public event PropertyChangingEventHandler PropertyChanging;
  425. public event PropertyChangedEventHandler PropertyChanged;
  426. protected virtual void SendPropertyChanging()
  427. {
  428. if ((this.PropertyChanging != null))
  429. {
  430. this.PropertyChanging(this, emptyChangingEventArgs);
  431. }
  432. }
  433. protected virtual void SendPropertyChanged(String propertyName)
  434. {
  435. if ((this.PropertyChanged != null))
  436. {
  437. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  438. }
  439. }
  440. }
  441. [Table(Name="dbo.registercategories")]
  442. public partial class registercategory : INotifyPropertyChanging, INotifyPropertyChanged
  443. {
  444. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  445. private int _register_category_id;
  446. private string _register_category_name;
  447. private EntitySet<dailyregister> _dailyregisters;
  448. #region Extensibility Method Definitions
  449. partial void OnLoaded();
  450. partial void OnValidate(System.Data.Linq.ChangeAction action);
  451. partial void OnCreated();
  452. partial void Onregister_category_idChanging(int value);
  453. partial void Onregister_category_idChanged();
  454. partial void Onregister_category_nameChanging(string value);
  455. partial void Onregister_category_nameChanged();
  456. #endregion
  457. public registercategory()
  458. {
  459. this._dailyregisters = new EntitySet<dailyregister>(new Action<dailyregister>(this.attach_dailyregisters), new Action<dailyregister>(this.detach_dailyregisters));
  460. OnCreated();
  461. }
  462. [Column(Storage="_register_category_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
  463. public int register_category_id
  464. {
  465. get
  466. {
  467. return this._register_category_id;
  468. }
  469. set
  470. {
  471. if ((this._register_category_id != value))
  472. {
  473. this.Onregister_category_idChanging(value);
  474. this.SendPropertyChanging();
  475. this._register_category_id = value;
  476. this.SendPropertyChanged("register_category_id");
  477. this.Onregister_category_idChanged();
  478. }
  479. }
  480. }
  481. [Column(Storage="_register_category_name", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
  482. public string register_category_name
  483. {
  484. get
  485. {
  486. return this._register_category_name;
  487. }
  488. set
  489. {
  490. if ((this._register_category_name != value))
  491. {
  492. this.Onregister_category_nameChanging(value);
  493. this.SendPropertyChanging();
  494. this._register_category_name = value;
  495. this.SendPropertyChanged("register_category_name");
  496. this.Onregister_category_nameChanged();
  497. }
  498. }
  499. }
  500. [Association(Name="registercategory_dailyregister", Storage="_dailyregisters", ThisKey="register_category_id", OtherKey="register_category_id")]
  501. public EntitySet<dailyregister> dailyregisters
  502. {
  503. get
  504. {
  505. return this._dailyregisters;
  506. }
  507. set
  508. {
  509. this._dailyregisters.Assign(value);
  510. }
  511. }
  512. public event PropertyChangingEventHandler PropertyChanging;
  513. public event PropertyChangedEventHandler PropertyChanged;
  514. protected virtual void SendPropertyChanging()
  515. {
  516. if ((this.PropertyChanging != null))
  517. {
  518. this.PropertyChanging(this, emptyChangingEventArgs);
  519. }
  520. }
  521. protected virtual void SendPropertyChanged(String propertyName)
  522. {
  523. if ((this.PropertyChanged != null))
  524. {
  525. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  526. }
  527. }
  528. private void attach_dailyregisters(dailyregister entity)
  529. {
  530. this.SendPropertyChanging();
  531. entity.registercategory = this;
  532. }
  533. private void detach_dailyregisters(dailyregister entity)
  534. {
  535. this.SendPropertyChanging();
  536. entity.registercategory = null;
  537. }
  538. }
  539. [Table(Name="dbo.accountsummary")]
  540. public partial class accountsummary
  541. {
  542. private string _account_name;
  543. private System.Nullable<double> _CurrentTotal;
  544. public accountsummary()
  545. {
  546. }
  547. [Column(Storage="_account_name", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
  548. public string account_name
  549. {
  550. get
  551. {
  552. return this._account_name;
  553. }
  554. set
  555. {
  556. if ((this._account_name != value))
  557. {
  558. this._account_name = value;
  559. }
  560. }
  561. }
  562. [Column(Storage="_CurrentTotal", DbType="Float")]
  563. public System.Nullable<double> CurrentTotal
  564. {
  565. get
  566. {
  567. return this._CurrentTotal;
  568. }
  569. set
  570. {
  571. if ((this._CurrentTotal != value))
  572. {
  573. this._CurrentTotal = value;
  574. }
  575. }
  576. }
  577. }
  578. public partial class usp_summarydata_by_categoryResult
  579. {
  580. private string _CategoryName;
  581. private System.Nullable<double> _CategoryTotal;
  582. public usp_summarydata_by_categoryResult()
  583. {
  584. }
  585. [Column(Storage="_CategoryName", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
  586. public string CategoryName
  587. {
  588. get
  589. {
  590. return this._CategoryName;
  591. }
  592. set
  593. {
  594. if ((this._CategoryName != value))
  595. {
  596. this._CategoryName = value;
  597. }
  598. }
  599. }
  600. [Column(Storage="_CategoryTotal", DbType="Float")]
  601. public System.Nullable<double> CategoryTotal
  602. {
  603. get
  604. {
  605. return this._CategoryTotal;
  606. }
  607. set
  608. {
  609. if ((this._CategoryTotal != value))
  610. {
  611. this._CategoryTotal = value;
  612. }
  613. }
  614. }
  615. }
  616. }
  617. #pragma warning restore 1591