public bool PersonPhoneDelete(PersonPhone personphone) { return Execute<bool>(dal => { PersonPhone personphoneDelete = dal.PersonPhone.Where(x => x.BusinessEntityID == personphone.BusinessEntityID).FirstOrDefault(); if (personphoneDelete != null) { dal.PersonPhone.DeleteOnSubmit(personphoneDelete); dal.SubmitChanges(); return true; } return false; }); }
public bool PersonPhoneUpdate(PersonPhone personphone) { return Execute<bool>(dal => { PersonPhone personphoneUpdate = dal.PersonPhone.Where(x => x.BusinessEntityID == personphone.BusinessEntityID).FirstOrDefault(); if (personphoneUpdate != null) { personphoneUpdate.BusinessEntityID=personphone.BusinessEntityID; personphoneUpdate.PhoneNumber=personphone.PhoneNumber; personphoneUpdate.PhoneNumberTypeID=personphone.PhoneNumberTypeID; personphoneUpdate.ModifiedDate=personphone.ModifiedDate; dal.SubmitChanges(); return true; } return false; }); }
partial void UpdatePersonPhone(PersonPhone instance);
partial void DeletePersonPhone(PersonPhone instance);
partial void InsertPersonPhone(PersonPhone instance);
private void detach_PersonPhones(PersonPhone entity) { this.SendPropertyChanging(); entity.PhoneNumberType = null; }
private void attach_PersonPhones(PersonPhone entity) { this.SendPropertyChanging(); entity.Person = this; }
public void PersonPhoneUpdate(PersonPhone personphone) { adventureWorks_BC.PersonPhoneUpdate(personphone); }
public void PersonPhoneAdd(PersonPhone personphone) { adventureWorks_BC.PersonPhoneAdd(personphone); }