Пример #1
0
        public string EditClientServiceDate(ClientViewModel cvm)
        {
            Clients.EditServiceDate(cvm);

            DailyHub.Refresh();
            return("Success");
        }
Пример #2
0
        public string AddTextMsg(string sender, TextMsgViewModel textMsg)
        {
            int nowServing = NowServing();
            int msgCnt     = Convert.ToInt32(SessionHelper.Get("MsgCnt"));

            if (nowServing != 0)
            {
                bool stopConversation = Clients.AddTextMsg(nowServing, sender, textMsg);

                if (stopConversation)
                {
                    msgCnt -= 1;
                }
                else
                {
                    msgCnt += 1;
                }

                SessionHelper.Set("MsgCnt", msgCnt.ToString());

                DailyHub.Refresh();
                DailyHub.RefreshConversation(nowServing, msgCnt);
                return("Success");
            }

            return("Failure");
        }
Пример #3
0
        public string EditPocketCheck(VisitViewModel vvm)
        {
            int nowServing = NowServing();

            Visits.EditVisit(nowServing, vvm);
            DailyHub.Refresh();
            return("Success");
        }
Пример #4
0
        /// <summary>
        ///  PLB: 6/15/2020 Disallowed this through jqGrid in
        ///     FrontDeskClientHistory.js
        ///     FrontDeskPocketChecks.js
        ///     BackOfficeClientHistory.js
        ///     BackOfficePocketChecks.js
        ///     InterviewerClientHistory.js
        ///     InterviewerPocketChecks.js
        ///  May revisit this decision later.
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public string DeletePocketCheck(int id)
        {
            int nowServing = NowServing();

            Visits.DeletePocketCheck(nowServing, id);
            DailyHub.Refresh();
            return("Success");
        }
Пример #5
0
        public string AddDatedPocketCheck(VisitViewModel vvm)
        {
            int nowServing = NowServing();

            vvm.Date = Extras.DateTimeToday();
            Visits.AddPocketCheck(nowServing, vvm);
            DailyHub.Refresh();
            return("Success");
        }
Пример #6
0
        public string AddVisitNote(int vid, string sender, VisitNoteModel vnm)
        {
            int nowServing = NowServing();

            //  Log.Debug(string.Format("NowServing = {0}, vid = {1}, side = {2}", nowServing, vid, side));

            Visits.AddVisitNote(nowServing, vid, sender, vnm);
            DailyHub.Refresh();
            return("Success");
        }
Пример #7
0
        public string EditReviewClient(ClientReviewViewModel crvm)
        {
            string status = Clients.EditReviewClient(crvm);

            if (status.Equals("Success"))
            {
                DailyHub.Refresh();
            }
            return(status);
        }
Пример #8
0
        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));
        }
Пример #9
0
        public string DeleteMyClient(int id)
        {
            string trainingClients = Config.TrainingClients;

            if (!string.IsNullOrEmpty(trainingClients) && trainingClients.Contains(id.ToString()))
            {
                return("Failure");
            }

            Clients.DeleteMyClient(id);
            DailyHub.Refresh();
            return("Success");
        }
Пример #10
0
        public string AddDependentClient(int household, ClientViewModel cvm)
        {
            int referringAgency = ReferringAgency();
            int id = Clients.AddDependentClient(referringAgency, household, cvm);

            if (id == -1)
            {
                return("Failure");
            }

            DailyHub.Refresh();
            NowServing(id);
            return("Success");
        }
Пример #11
0
        public string EditTextMsg(TextMsgViewModel textMsg)
        {
            int nowServing = NowServing();
            int msgCnt     = Convert.ToInt32(SessionHelper.Get("MsgCnt"));

            if (nowServing != 0)
            {
                Clients.EditTextMsg(nowServing, textMsg);
                DailyHub.Refresh();
                DailyHub.RefreshConversation(nowServing, msgCnt);
                return("Success");
            }

            return("Failure");
        }
Пример #12
0
        public string EditClient(ClientViewModel cvm)
        {
            int id = Clients.EditClient(cvm);

            // Edited client becomes the client being served.
            NowServing(id);

            DailyHub.Refresh();

            if (!string.IsNullOrEmpty(cvm.Conversation) && cvm.Conversation.Equals("Y"))
            {
                return("OpenConversation");
            }

            return("Success");
        }
Пример #13
0
        public string AddClient(ClientViewModel cvm)
        {
            int id = Clients.AddClient(cvm);

            if (id == -1)
            {
                return("Failure");
            }

            // Newly added client becomes the client being served.
            // Entity Framework will set client.Id to the Id of the inserted client.
            // See: https://stackoverflow.com/questions/5212751/how-can-i-get-id-of-inserted-entity-in-entity-framework
            NowServing(id);

            DailyHub.Refresh();
            return("Success");
        }
Пример #14
0
 public string DeleteVisitNote(int id)
 {
     Visits.DeleteVisitNote(id);
     DailyHub.Refresh();
     return("Success");
 }
Пример #15
0
 public string EditVisitNote(VisitNoteModel vnm)
 {
     Visits.EditVisitNote(vnm);
     DailyHub.Refresh();
     return("Success");
 }
Пример #16
0
 public string DeleteDependentClient(int id)
 {
     Clients.DeleteMyClient(id);
     DailyHub.Refresh();
     return("Success");
 }