Example #1
0
        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();
     }
 }
Example #4
0
 public void EditGp(GeneralPractitioner Gp)
 {
     _gpRepository.Update(Gp);
     _unitOfWork.Save();
 }
Example #5
0
 public void CreateGp(GeneralPractitioner Gp)
 {
     _gpRepository.Add(Gp);
     _unitOfWork.Save();
 }