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