public IActionResult Edit(StoreBuildingVM sbVM) { ViewBag.ErrorMessage = ""; if (ModelState.IsValid) { sbRepo.Update(sbVM); return(RedirectToAction("Index", "StoreBuildingVM")); } return(View(sbVM)); }
public bool Update(StoreBuildingVM sbVM) { BuildingRepo buildingRepo = new BuildingRepo(db); return(buildingRepo.Update(sbVM.BuildingName, sbVM.UnitNum, sbVM.Capacity)); }
public IActionResult Edit(string branch, string buildingName, int unitNum) { StoreBuildingVM sbVM = sbRepo.Get(branch, buildingName, unitNum); return(View(sbVM)); }