예제 #1
0
        public bool UnitMeasureDelete(UnitMeasure unitmeasure)
        {
            return Execute<bool>(dal =>
            {
                UnitMeasure unitmeasureDelete = dal.UnitMeasure.Where(x => x.UnitMeasureCode == unitmeasure.UnitMeasureCode).FirstOrDefault();
                if (unitmeasureDelete != null)
                {
                    dal.UnitMeasure.DeleteOnSubmit(unitmeasureDelete);
                    dal.SubmitChanges();
                    return true;
                }
                return false;

            });
        }
예제 #2
0
        public bool UnitMeasureUpdate(UnitMeasure unitmeasure)
        {
            return Execute<bool>(dal =>
            {
                UnitMeasure unitmeasureUpdate = dal.UnitMeasure.Where(x => x.UnitMeasureCode == unitmeasure.UnitMeasureCode).FirstOrDefault();
                if (unitmeasureUpdate != null)
                {
                    unitmeasureUpdate.UnitMeasureCode = unitmeasure.UnitMeasureCode;
                    unitmeasureUpdate.Name = unitmeasure.Name;
                    unitmeasureUpdate.ModifiedDate = unitmeasure.ModifiedDate;

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

            });
        }
 partial void DeleteUnitMeasure(UnitMeasure instance);
 partial void UpdateUnitMeasure(UnitMeasure instance);
 partial void InsertUnitMeasure(UnitMeasure instance);
예제 #6
0
 public void UnitMeasureUpdate(UnitMeasure unitmeasure)
 {
     adventureWorks_BC.UnitMeasureUpdate(unitmeasure);
 }
예제 #7
0
 public void UnitMeasureAdd(UnitMeasure unitmeasure)
 {
     adventureWorks_BC.UnitMeasureAdd(unitmeasure);
 }