Exemplo n.º 1
0
        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"));
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
        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"));
        }
Exemplo n.º 4
0
        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));
        }
Exemplo n.º 5
0
        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();
        }
Exemplo n.º 6
0
        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));
        }
Exemplo n.º 7
0
        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));
        }
Exemplo n.º 8
0
 public string DeleteMBVD(MBVDViewModel mbvdvm)
 {
     MBVDS.DeleteMBVD(mbvdvm);
     return("Success");
 }
Exemplo n.º 9
0
 public string EditMBVD(MBVDViewModel mbvdvm)
 {
     MBVDS.EditMBVD(mbvdvm);
     return("Success");
 }
Exemplo n.º 10
0
 public string AddMBVD(MBVDViewModel mbvdvm)
 {
     MBVDS.AddMBVD(mbvdvm);
     return("Success");
 }