public async System.Threading.Tasks.Task <ActionResult> AddProductBrand() { var vm = new AddEditProductBrandViewModel(); await vm.FillAdd(CargarDatosContext()); return(View(vm)); }
public async System.Threading.Tasks.Task <ActionResult> AddProductBrand(AddEditProductBrandViewModel model, FormCollection fc) { try { var postResult = ConstantHelpers.PostUrlAsync(Baseurl, "SAV/productbrands", model).Result; if (postResult.Message.Equals("Success")) { return(RedirectToAction("ListProductBrand", "ProductBrand")); } return(View(model)); } catch (Exception ex) { TryUpdateModel(model); return(View(model)); } }