Exemple #1
0
 public IActionResult Brand(BrandAddVM brand)
 {
     if (!ModelState.IsValid)
     {
         return(View(brand));
     }
     if (!(PService.CheckExistBrandEName(brand.EName) || PService.CheckExistBrandName(brand.Name)))
     {
         PService.AddProductBrand(new Brand
         {
             Description = brand.Description,
             EName       = brand.EName,
             Name        = brand.Name
         });
         brand = null;
         return(View());
     }
     return(View());
 }
Exemple #2
0
        public IActionResult Brand()
        {
            BrandAddVM brand = new BrandAddVM();

            return(View(brand));
        }