partial void UpdateIncomeSource(IncomeSource instance);
partial void DeleteIncomeSource(IncomeSource instance);
partial void InsertIncomeSource(IncomeSource instance);
private void detach_IncomeSources(IncomeSource entity) { this.SendPropertyChanging(); entity.Client = null; }
private void attach_IncomeSources(IncomeSource entity) { this.SendPropertyChanging(); entity.Frequency = this; }
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(); }
public void DeleteIncomeSource(IncomeSource incomeSource) { _db.IncomeSources.DeleteOnSubmit(incomeSource); _db.IncomeSources.Context.SubmitChanges(); }