Esempio n. 1
0
 partial void UpdateIncomeSource(IncomeSource instance);
Esempio n. 2
0
 partial void DeleteIncomeSource(IncomeSource instance);
Esempio n. 3
0
 partial void InsertIncomeSource(IncomeSource instance);
Esempio n. 4
0
		private void detach_IncomeSources(IncomeSource entity)
		{
			this.SendPropertyChanging();
			entity.Client = null;
		}
Esempio n. 5
0
		private void attach_IncomeSources(IncomeSource entity)
		{
			this.SendPropertyChanging();
			entity.Frequency = this;
		}
Esempio n. 6
0
        public void SaveIncomeSource(IncomeSource incomeSource)
        {
            // if its a new client, insert it
            if (incomeSource.IncomeSourceID == 0)
            {
                _db.IncomeSources.InsertOnSubmit(incomeSource);
            }
            else if (_db.IncomeSources.GetOriginalEntityState(incomeSource) == null)
            {
                // we are updating an existing income source, but it's not attached
                // to the data context, so attach it and detect changes

                _db.IncomeSources.Attach(incomeSource);
                _db.IncomeSources.Context.Refresh(RefreshMode.KeepCurrentValues, incomeSource);
            }

            _db.SubmitChanges();
        }
Esempio n. 7
0
 public void DeleteIncomeSource(IncomeSource incomeSource)
 {
     _db.IncomeSources.DeleteOnSubmit(incomeSource);
     _db.IncomeSources.Context.SubmitChanges();
 }