Exemple #1
0
 public static string Update(int ID, double NumOfDateToChangeProduct, double NumOfProductCanChange, double FeeChangeProduct, double FeeDiscountPerProduct,
                             string ChangeGoodsRule, string RetailReturnRule, DateTime ModifiedDate, string ModifiedBy, string CSSPrintBarcode)
 {
     using (var dbe = new inventorymanagementEntities())
     {
         tbl_Config ui = dbe.tbl_Config.Where(a => a.ID == ID).SingleOrDefault();
         if (ui != null)
         {
             ui.NumOfDateToChangeProduct = NumOfDateToChangeProduct;
             ui.NumOfProductCanChange    = NumOfProductCanChange;
             ui.FeeChangeProduct         = FeeChangeProduct;
             ui.FeeDiscountPerProduct    = FeeDiscountPerProduct;
             ui.ChangeGoodsRule          = ChangeGoodsRule;
             ui.RetailReturnRule         = RetailReturnRule;
             ui.ModifiedBy      = ModifiedBy;
             ui.ModifiedDate    = ModifiedDate;
             ui.CSSPrintBarcode = CSSPrintBarcode;
             int kq = dbe.SaveChanges();
             return(kq.ToString());
         }
         else
         {
             return(null);
         }
     }
 }
Exemple #2
0
 public static tbl_Config GetByID(int ID)
 {
     using (var dbe = new inventorymanagementEntities())
     {
         tbl_Config ai = dbe.tbl_Config.Where(a => a.ID == ID).SingleOrDefault();
         if (ai != null)
         {
             return(ai);
         }
         else
         {
             return(null);
         }
     }
 }