public ActionResult StoreExistingClientServiceRequest(RequestedServicesViewModel rsvm) { // Called when // ~/Views/CaseManager/ExistingClientServiceRequest.cshtml // posts to server. rsvm will contain both requested services // and supporting documents. int nowServing = NowServing(); Client client = Clients.GetClient(nowServing, null); // pass null so the supporting documents won't be erased string serviceRequestError = ServiceRequestError(rsvm); if (!string.IsNullOrEmpty(serviceRequestError)) { ViewBag.ClientName = Clients.ClientBeingServed(client); ViewBag.DOB = client.DOB.ToString("MM/dd/yyyy"); ViewBag.Age = client.Age; ModelState.AddModelError("ServiceRequestError", serviceRequestError); rsvm.Agencies = Agencies.GetAgenciesSelectList(client.AgencyId); rsvm.MBVDS = MBVDS.GetMBVDSelectList(); return(View("ExistingClientServiceRequest", rsvm)); } Clients.StoreRequestedServicesAndSupportingDocuments(client.Id, rsvm); PrepareClientNotes(client, rsvm); return(RedirectToAction("ManageDashboard", "Interviewer")); }
public ActionResult ExistingClient() { int nowServing = NowServing(); RequestedServicesViewModel rsvm = new RequestedServicesViewModel(); Client client = Clients.GetClient(nowServing, rsvm); rsvm.Agencies = Agencies.GetAgenciesSelectList(client.AgencyId); rsvm.MBVDS = MBVDS.GetMBVDSelectList(); if (!string.IsNullOrEmpty(client.AgencyName)) { rsvm.OtherAgency = true; rsvm.OtherAgencyName = client.AgencyName; } // rsvm.Agency = Agencies.GetAgencyName(client.AgencyId); ViewBag.ClientName = Clients.ClientBeingServed(client); ViewBag.DOB = client.DOB.ToString("MM/dd/yyyy"); ViewBag.Age = client.Age; ViewBag.Agency = GetClientAgencyName(client); // needed only for Interviewer role // ServiceTicketBackButtonHelper("Get", rsvm); return(View("ExistingClient", rsvm)); }
public ActionResult OverflowVoucher() { int nowServing = NowServing(); if (nowServing == 0) { ViewBag.Warning = "Please first select a client from the Clients Table."; return(View("Warning")); } RequestedServicesViewModel rsvm = new RequestedServicesViewModel(); Client client = Clients.GetClient(nowServing, rsvm); rsvm.Agencies = Agencies.GetAgenciesSelectList(client.AgencyId); rsvm.MBVDS = MBVDS.GetMBVDSelectList(); if (client == null) { ViewBag.Warning = "Could not find selected client."; return(View("Warning")); } if (CheckManager.HasHistory(client.Id)) { // client.EXP = false; return(RedirectToAction("ExistingClientOverflowVoucher")); } // client.EXP = true; return(RedirectToAction("ExpressClientOverflowVoucher")); }
public ActionResult ExistingClientOverflowVoucher() { RequestedServicesViewModel rsvm = new RequestedServicesViewModel(); int nowServing = NowServing(); Client client = Clients.GetClient(nowServing, rsvm); rsvm.Agencies = Agencies.GetAgenciesSelectList(client.AgencyId); rsvm.MBVDS = MBVDS.GetMBVDSelectList(); ViewBag.ClientName = Clients.ClientBeingServed(client); ViewBag.DOB = client.DOB.ToString("MM/dd/yyyy"); ViewBag.Age = client.Age; // VoucherBackButtonHelper("Get", rsvm); return(View(rsvm)); }
protected static void PrepareMBVDNotes(Client client, RequestedServicesViewModel rsvm) { StringBuilder notes = new StringBuilder(); if (client.XBC) { notes.Append(" XBC "); } // notes.Append(string.Format(" {0}", rsvm.State)); notes.Append(string.Format(" {0}", MBVDS.GetMBVDName(Convert.ToInt32(rsvm.State)))); if (rsvm.PreApprovedMBVD) { notes.Append(", pre-approved "); } rsvm.MBVDNotes = notes.ToString(); }
public JsonResult GetMBVDS(int page, int rows) { List <MBVDViewModel> mbvds = MBVDS.GetMBVDS(); int pageIndex = page - 1; int pageSize = rows; int totalRecords = mbvds.Count; int totalPages = (int)Math.Ceiling((float)totalRecords / (float)rows); mbvds = mbvds.Skip(pageIndex * pageSize).Take(pageSize).ToList(); mbvds = mbvds.OrderBy(m => m.MBVDId).ToList(); var jsonData = new { total = totalPages, page = page, records = totalRecords, rows = mbvds }; return(Json(jsonData, JsonRequestBehavior.AllowGet)); }
public ActionResult ExistingClientServiceRequest() { int nowServing = NowServing(); RequestedServicesViewModel rsvm = new RequestedServicesViewModel(); Client client = Clients.GetClient(nowServing, rsvm); rsvm.Agencies = Agencies.GetAgenciesSelectList(client.AgencyId); rsvm.MBVDS = MBVDS.GetMBVDSelectList(); ViewBag.Agency = GetClientAgencyName(client); if (!string.IsNullOrEmpty(client.AgencyName)) { rsvm.OtherAgency = true; rsvm.OtherAgencyName = client.AgencyName; } ViewBag.ClientName = Clients.ClientBeingServed(client); ViewBag.DOB = client.DOB.ToString("MM/dd/yyyy"); ViewBag.Age = client.Age; return(View("ExistingClientServiceRequest", rsvm)); }
public string DeleteMBVD(MBVDViewModel mbvdvm) { MBVDS.DeleteMBVD(mbvdvm); return("Success"); }
public string EditMBVD(MBVDViewModel mbvdvm) { MBVDS.EditMBVD(mbvdvm); return("Success"); }
public string AddMBVD(MBVDViewModel mbvdvm) { MBVDS.AddMBVD(mbvdvm); return("Success"); }