Пример #1
0
        public bool StateProvinceDelete(StateProvince stateprovince)
        {
            return Execute<bool>(dal =>
            {
                StateProvince stateprovinceDelete = dal.StateProvince.Where(x => x.StateProvinceID == stateprovince.StateProvinceID).FirstOrDefault();
                if (stateprovinceDelete != null)
                {
                    dal.StateProvince.DeleteOnSubmit(stateprovinceDelete);
                    dal.SubmitChanges();
                    return true;
                }
                return false;

            });
        }
Пример #2
0
        public bool StateProvinceUpdate(StateProvince stateprovince)
        {
            return Execute<bool>(dal =>
            {
                StateProvince stateprovinceUpdate = dal.StateProvince.Where(x => x.StateProvinceID == stateprovince.StateProvinceID).FirstOrDefault();
                if (stateprovinceUpdate != null)
                {
                    stateprovinceUpdate.StateProvinceID = stateprovince.StateProvinceID;
                    stateprovinceUpdate.StateProvinceCode = stateprovince.StateProvinceCode;
                    stateprovinceUpdate.CountryRegionCode = stateprovince.CountryRegionCode;
                    stateprovinceUpdate.IsOnlyStateProvinceFlag = stateprovince.IsOnlyStateProvinceFlag;
                    stateprovinceUpdate.Name = stateprovince.Name;
                    stateprovinceUpdate.TerritoryID = stateprovince.TerritoryID;
                    stateprovinceUpdate.rowguid = stateprovince.rowguid;
                    stateprovinceUpdate.ModifiedDate = stateprovince.ModifiedDate;

                    dal.SubmitChanges();
                    return true;
                }
                return false;

            });
        }
		private void detach_StateProvinces(StateProvince entity)
		{
			this.SendPropertyChanging();
			entity.SalesTerritory = null;
		}
		private void detach_StateProvinces(StateProvince entity)
		{
			this.SendPropertyChanging();
			entity.CountryRegion = null;
		}
 partial void DeleteStateProvince(StateProvince instance);
 partial void UpdateStateProvince(StateProvince instance);
 partial void InsertStateProvince(StateProvince instance);
Пример #8
0
 public void StateProvinceUpdate(StateProvince stateprovince)
 {
     adventureWorks_BC.StateProvinceUpdate(stateprovince);
 }
Пример #9
0
 public void StateProvinceAdd(StateProvince stateprovince)
 {
     adventureWorks_BC.StateProvinceAdd(stateprovince);
 }