Example #1
0
 public async System.Threading.Tasks.Task <ActionResult> AddBrand(AddEditBrandViewModel model)
 {
     try
     {
         var postResult = ConstantHelpers.PostUrlAsync(Baseurl, "SAV/brands", model).Result;
         if (postResult.Message.Equals("Success"))
         {
             return(RedirectToAction("ListBrand", "Brand"));
         }
         return(View(model));
     }
     catch (Exception ex)
     {
         TryUpdateModel(model);
         return(View(model));
     }
 }
Example #2
0
        public async System.Threading.Tasks.Task <ActionResult> AddBrand()
        {
            var vm = new AddEditBrandViewModel();

            return(View(vm));
        }