コード例 #1
0
        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;

            });
        }
コード例 #2
0
        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;

            });
        }
コード例 #3
0
 partial void UpdatePersonPhone(PersonPhone instance);
コード例 #4
0
 partial void DeletePersonPhone(PersonPhone instance);
コード例 #5
0
 partial void InsertPersonPhone(PersonPhone instance);
コード例 #6
0
		private void detach_PersonPhones(PersonPhone entity)
		{
			this.SendPropertyChanging();
			entity.PhoneNumberType = null;
		}
コード例 #7
0
		private void attach_PersonPhones(PersonPhone entity)
		{
			this.SendPropertyChanging();
			entity.Person = this;
		}
コード例 #8
0
 public void PersonPhoneUpdate(PersonPhone personphone)
 {
     adventureWorks_BC.PersonPhoneUpdate(personphone);
 }
コード例 #9
0
 public void PersonPhoneAdd(PersonPhone personphone)
 {
     adventureWorks_BC.PersonPhoneAdd(personphone);
 }