public ActionResult PrepareExistingClientOverflowVoucher(RequestedServicesViewModel rsvm) { int nowServing = NowServing(); Client client = Clients.GetClient(nowServing, null); Clients.StoreRequestedServicesAndSupportingDocuments(client.Id, rsvm); PrepareClientNotes(client, rsvm); DateTime today = Extras.DateTimeToday(); DateTime expiryDate = Clients.CalculateExpiry(today); Clients.UpdateOverflowExpiry(nowServing, expiryDate); ViewBag.ClientName = Clients.ClientBeingServed(client); ViewBag.BirthName = client.BirthName; ViewBag.DOB = client.DOB.ToString("MM/dd/yyyy"); ViewBag.Age = client.Age; ViewBag.Agency = Agencies.GetAgencyName(Convert.ToInt32(rsvm.AgencyId)); // rsvm.AgencyId will be the Id of an Agency as a string ViewBag.IssueDate = today.ToString("ddd MMM d, yyyy"); ViewBag.Expiry = expiryDate.ToString("ddd MMM d, yyyy"); ViewBag.VoucherDate = today.ToString("MM/dd/yyyy"); // for _OverflowSignatureBlock.cshtml List <VisitViewModel> visits = Visits.GetVisits(nowServing); rsvm.XBC = client.XBC == true ? "XBC" : string.Empty; rsvm.XID = client.XID == true ? "XID" : string.Empty; // VoucherBackButtonHelper("Set", rsvm); var objTuple = new Tuple <List <VisitViewModel>, RequestedServicesViewModel>(visits, rsvm); return(View("PrintExistingClientOverflowVoucher", objTuple)); }
public ActionResult PrepareInterviewerExistingClient() { int nowServing = NowServing(); RequestedServicesViewModel rsvm = new RequestedServicesViewModel(); Client client = Clients.GetClient(nowServing, rsvm); PrepareClientNotes(client, rsvm); DateTime today = Extras.DateTimeToday(); ViewBag.TicketDate = today.ToString("MM/dd/yyyy"); ViewBag.ServiceTicket = client.ServiceTicket; ViewBag.ClientName = Clients.ClientBeingServed(client); ViewBag.BirthName = client.BirthName; ViewBag.DOB = client.DOB.ToString("MM/dd/yyyy"); ViewBag.Age = client.Age; ViewBag.Agency = GetClientAgencyName(client); List <VisitViewModel> visits = Visits.GetVisits(nowServing); rsvm.XBC = client.XBC == true ? "XBC" : string.Empty; rsvm.XID = client.XID == true ? "XID" : string.Empty; // ServiceTicketBackButtonHelper("Set", rsvm); var objTuple = new Tuple <List <VisitViewModel>, RequestedServicesViewModel>(visits, rsvm); return(View("PrintExistingClient", objTuple)); }
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")); }
private bool RequestingBothTIDandTDL(RequestedServicesViewModel rsvm) { bool tid = rsvm.NewTID || rsvm.ReplacementTID; bool tdl = rsvm.NewTDL || rsvm.ReplacementTDL; return(tid && tdl); }
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 RequestedServicesPage(Data.Model.Schedule item) { InitializeComponent(); BindingContext = model = new RequestedServicesViewModel() { scheduleModel = item }; }
public ActionResult ClearClientHistory() { RequestedServicesViewModel rsvm = new RequestedServicesViewModel { Agencies = Agencies.GetAgenciesSelectList(0) }; DailyHub.GetClientHistory(0); return(View("ExistingClient", rsvm)); }
/* * public ActionResult PrehistoricChecks() * { * 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; * * // Treat a client with ancient history like a client with existing history * // that is not yet visible, i.e. must be added to any actual existing history. * return View("ExistingClient", rsvm); * } */ public ActionResult GetClientHistory() { RequestedServicesViewModel rsvm = new RequestedServicesViewModel { Agencies = Agencies.GetAgenciesSelectList(0) }; string nowServing = SessionHelper.Get("NowServing"); DailyHub.GetClientHistory(Convert.ToInt32(nowServing)); return(View("ExistingClient", rsvm)); }
public ActionResult PrepareExpressClient(RequestedServicesViewModel rsvm) { int nowServing = NowServing(); Clients.StoreRequestedServicesAndSupportingDocuments(nowServing, rsvm); // This is the POST method of // ~/Views/FrontDesk/ExpressClient.cshtml // If the NowServing client comes from the front desk, then the client will // have no supporting documents and the supporting documents section of the service // ticket will simply be a worksheet for the interviewer to fill in. If the NowServing // client comes from the Dashboard, then the client will have supporting documents. // So in either case, passing rsvm instead of null as the second argument of // GetClient is correct. Client client = Clients.GetClient(nowServing, rsvm); PrepareClientNotes(client, rsvm); DateTime today = Extras.DateTimeToday(); ViewBag.TicketDate = today.ToString("MM/dd/yyyy"); ViewBag.ServiceTicket = client.ServiceTicket; ViewBag.ClientName = Clients.ClientBeingServed(client); ViewBag.BirthName = client.BirthName; ViewBag.DOB = client.DOB.ToString("MM/dd/yyyy"); ViewBag.Age = client.Age; if (rsvm.OtherAgency && !string.IsNullOrEmpty(client.AgencyName)) { ViewBag.Agency = client.AgencyName; } else { ViewBag.Agency = Agencies.GetAgencyName(Convert.ToInt32(rsvm.AgencyId)); // rsvm.Agency will be the Id of an Agency as a string } // ServiceTicketBackButtonHelper("Set", rsvm); // May have added a pocket check. In that case, this express client becomes // an existing client. if (CheckManager.HasHistory(nowServing)) { List <VisitViewModel> visits = Visits.GetVisits(nowServing); var objTuple = new Tuple <List <VisitViewModel>, RequestedServicesViewModel>(visits, rsvm); return(View("PrintExistingClient", objTuple)); } DailyHub.Refresh(); return(View("PrintExpressClient", rsvm)); }
protected void PrepareClientNotes(Client client, RequestedServicesViewModel rsvm) { if (!rsvm.TrackingOnly) { PrepareBCNotes(client, rsvm); PrepareMBVDNotes(client, rsvm); PrepareTIDNotes(client, rsvm); PrepareTDLNotes(client, rsvm); } else { rsvm.Notes = client.Notes; } }
protected static void PrepareTDLNotes(Client client, RequestedServicesViewModel rsvm) { StringBuilder notes = new StringBuilder(); if (client.XID) { notes.Append(" XID "); } if (rsvm.PreApprovedNewTDL || rsvm.PreApprovedReplacementTDL) { notes.Append(" pre-approved "); } rsvm.TDLNotes = notes.ToString(); }
public ActionResult PrepareServiceTicket() { 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); if (client.HH != 0) { ViewBag.Warning = "Cannot prepare a Service Ticket for a dependent of another client."; return(View("Warning")); } PrepareClientNotes(client, rsvm); DateTime today = Extras.DateTimeToday(); ViewBag.VoucherDate = today.ToString("MM/dd/yyyy"); ViewBag.Expiry = client.Expiry.ToString("ddd MMM d, yyyy"); ViewBag.ClientName = Clients.ClientBeingServed(client, false); ViewBag.BirthName = client.BirthName; // ViewBag.CurrentAddress = Clients.ClientAddress(client); ViewBag.Phone = (!string.IsNullOrEmpty(client.Phone) ? client.Phone : "N/A"); ViewBag.Email = (!string.IsNullOrEmpty(client.Email) ? client.Email : "N/A"); ViewBag.DOB = client.DOB.ToString("MM/dd/yyyy"); // ViewBag.BirthPlace = Clients.GetBirthplace(client); ViewBag.Age = client.Age; ViewBag.Agency = Agencies.GetAgencyName(client.AgencyId); // rsvm.Agency will be the Id of an Agency as a string List <ClientViewModel> dependents = Clients.GetDependents(nowServing); var objTuple = new Tuple <List <ClientViewModel>, RequestedServicesViewModel>(dependents, rsvm); // VoucherBackButtonHelper("Set", rsvm); // return View("PrintVoucher", objTuple); return(View("PrintServiceTicket", objTuple)); }
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 ActionResult ExpressClientServiceTicket() { int nowServing = NowServing(); RequestedServicesViewModel rsvm = new RequestedServicesViewModel(); Client client = Clients.GetClient(nowServing, rsvm); PrepareClientNotes(client, rsvm); DateTime today = Extras.DateTimeToday(); ViewBag.TicketDate = today.ToString("MM/dd/yyyy"); ViewBag.ServiceTicket = client.ServiceTicket; ViewBag.ClientName = Clients.ClientBeingServed(client); ViewBag.BirthName = client.BirthName; ViewBag.DOB = client.DOB.ToString("MM/dd/yyyy"); ViewBag.Age = client.Age; ViewBag.Agency = GetClientAgencyName(client); // ServiceTicketBackButtonHelper("Set", rsvm); return(View("PrintExpressClient", rsvm)); }
protected string ServiceRequestError(RequestedServicesViewModel rsvm) { string error = string.Empty; if (RequestingBothTIDandTDL(rsvm)) { error = "By Texas State Law no resident may possess both an ID and a DL."; } else if (RequestingBothBCandMBVD(rsvm)) { error = "Cannot request both in-state and out-of-state birth certificates."; } /* * else if (rsvm.MBVD) * { * error = "Sorry, Operation ID cannot currently process a request for an out-of-state birth certificate."; * } */ return(error); }
protected static void PrepareBCNotes(Client client, RequestedServicesViewModel rsvm) { StringBuilder notes = new StringBuilder(); if (client.XBC) { notes.Append(" XBC "); } if (rsvm.PreApprovedBC) { notes.Append(" pre-approved "); } if (rsvm.HCC) { notes.Append(" (Harris County Clerk) "); } rsvm.BCNotes = notes.ToString(); }
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 ActionResult PreApprovalForm() { RequestedServicesViewModel rsvm = new RequestedServicesViewModel(); return(View("PreApprovalForm", rsvm)); }
private bool RequestingBothBCandMBVD(RequestedServicesViewModel rsvm) { return(rsvm.BC & rsvm.MBVD); }