Пример #1
0
 public bool SaveSupplier(tbl_Supplier supplier)
 {
     try
     {
         dbContext.tbl_Supplier.Add(supplier);
         dbContext.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #2
0
 public bool ValidateSupplier(tbl_Supplier supplier)
 {
     try
     {
         if (supplier.Supplier_Id > 0)
         {
             return(dbContext.tbl_Supplier.Any(x => x.Supplier_Name == supplier.Supplier_Name && x.Supplier_Id != supplier.Supplier_Id));
         }
         else
         {
             return(dbContext.tbl_Supplier.Any(x => x.Supplier_Name == supplier.Supplier_Name));
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #3
0
 public bool SaveSupplier(tbl_Supplier supplier)
 {
     return(dl.SaveSupplier(supplier));
 }
Пример #4
0
 public bool ValidateSupplier(tbl_Supplier supplier)
 {
     return(dl.ValidateSupplier(supplier));
 }