public IActionResult AddCenter(EximinationCenter model) { model.SeatAvailable = model.TotalSeat; if (ModelState.IsValid) { cernterRepositry.Add(model); } return(View()); }
public bool Add(EximinationCenter eximination) { try { repo.EximinationCenters.Add(eximination); repo.SaveChanges(); return(true); }catch (Exception ex) { return(false); } }
public void SeatUpdate(string code) { try { EximinationCenter center = GetExamCenterById(code); center.SeatAvailable = center.SeatAvailable - 1; repo.EximinationCenters.Update(center); repo.SaveChanges(); } catch (Exception ex) { Console.WriteLine(ex); } }
public IActionResult AddCenter(EximinationCenter model) { return(View()); }