public ActionResult Create(LoketModel model) { model.Account = Account; var request = new LoketRequest { Data = model, }; LoketResponse _response = new LoketValidator(_unitOfWork).Validate(request); if (_response.Status) { // Notify to all RegistrationHub.BroadcastDataToAllClients(); } ViewBag.Response = $"{_response.Status};{_response.Message}"; ViewBag.PoliList = BindDropDownPoliList(model.PoliFromID); ViewBag.PatientList = BindDropDownPatientList(); ViewBag.RegistrationTypeList = BindDropDownTypeList(); ViewBag.DoctorList = BindDropDownDoctorList(model.PoliToID); ViewBag.PaymentTypeList = BindDropDownPaymentTypeList(); ViewBag.NecessityList = BindDropDownNecessityList(); return(View("Index", model)); }
public JsonResult FinishRegistration(int id) { var request = new LoketRequest { Data = new LoketModel { Id = id, Account = Session["UserLogon"] == null ? new AccountModel() : (AccountModel)Session["UserLogon"] }, Action = ClinicEnums.Action.Finish.ToString() }; LoketResponse _response = new LoketValidator(_unitOfWork).Validate(request); if (_response.Status) { RegistrationHub.BroadcastDataToAllClients(); } return(Json(new { Status = _response.Status, Message = _response.Message }, JsonRequestBehavior.AllowGet)); }