public async System.Threading.Tasks.Task <ActionResult> AddEditEntryExitProduct() { var vm = new AddEditEntryExitProductViewModel(); await vm.FillAdd(CargarDatosContext()); return(View(vm)); }
public async System.Threading.Tasks.Task <ActionResult> AddEditEntryExitProduct(AddEditEntryExitProductViewModel model) { try { model.UserId = Session.GetUserId(); var postResult = ConstantHelpers.PostUrlAsync(Baseurl, "SAV/entryexitproducts", model).Result; if (postResult.Message.Equals("Success")) { return(RedirectToAction("ListStockProduct", "EntryExitProduct")); } await model.FillAdd(CargarDatosContext()); return(View(model)); } catch (Exception e) { return(View(model)); } }