Esempio n. 1
0
 public bool ValidateBrand(tbl_Brands brand)
 {
     try
     {
         if (brand.Brand_Id > 0)
         {
             return(dbContext.tbl_Brands.Any(x => x.Brand_Name == brand.Brand_Name && x.Brand_Id != brand.Brand_Id));
         }
         else
         {
             return(dbContext.tbl_Brands.Any(x => x.Brand_Name == brand.Brand_Name));
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 2
0
 public bool SaveBrand(tbl_Brands brand)
 {
     try
     {
         var result = dbContext.SP_SaveBrand(brand.Brand_Id, brand.Brand_Name, brand.Brand_Status).ToList();
         if (result.Any())
         {
             if (result.FirstOrDefault().Result == 1)
             {
                 return(true);
             }
         }
         return(false);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public bool SaveBrand(tbl_Brands brand)
 {
     return(dl.SaveBrand(brand));
 }
 public bool ValidateBrand(tbl_Brands brand)
 {
     return(dl.ValidateBrand(brand));
 }