public List<BrokenBusinessRules> Validate(GeneralPractitioner Gp) { List<BrokenBusinessRules> brokenRules = new List<BrokenBusinessRules>(); if (Gp.FirstName ==null) { brokenRules.Add(new BrokenBusinessRules("FirstName", "First name is must..")); } return brokenRules; }
public ActionResult Edit(GeneralPractitioner collection) { try { // TODO: Add update logic here _gpService.EditGp(collection); return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Create(GeneralPractitioner collection) { try { // TODO: Add insert logic here collection.CustomerID = (int)Session["CustId"]; _gpService.CreateGp(collection); return RedirectToAction("Index"); } catch { return View(); } }
public void EditGp(GeneralPractitioner Gp) { _gpRepository.Update(Gp); _unitOfWork.Save(); }
public void CreateGp(GeneralPractitioner Gp) { _gpRepository.Add(Gp); _unitOfWork.Save(); }