Beispiel #1
0
 partial void UpdateAttorney(Attorney instance);
Beispiel #2
0
 partial void DeleteAttorney(Attorney instance);
Beispiel #3
0
 partial void InsertAttorney(Attorney instance);
Beispiel #4
0
		private void detach_Attorneys(Attorney entity)
		{
			this.SendPropertyChanging();
			entity.Client = null;
		}
Beispiel #5
0
		private void attach_Attorneys(Attorney entity)
		{
			this.SendPropertyChanging();
			entity.Client = this;
		}
        public void SaveAttorney(Attorney attorney)
        {
            // if its a new client, insert it
            if (attorney.AttorneyID == 0)
            {
                _db.Attorneys.InsertOnSubmit(attorney);
            }
            else if (_db.Attorneys.GetOriginalEntityState(attorney) == null)
            {
                // we are updating an existing attorney, but it's not attached
                // to the data context, so attach it and detect changes

                _db.Attorneys.Attach(attorney);
                _db.Attorneys.Context.Refresh(RefreshMode.KeepCurrentValues, attorney);
            }

            _db.SubmitChanges();
        }
 public void DeleteAttorney(Attorney attorney)
 {
     _db.Attorneys.DeleteOnSubmit(attorney);
     _db.Attorneys.Context.SubmitChanges();
 }