コード例 #1
0
        // GET: PCPCommunication
        public ActionResult Index()
        {
            var fromD = new DateTime();
            var toD   = new DateTime();

            if (Session["patientLogFromDate"] != null && Session["patientLogToDate"] != null)
            {
                fromD = Convert.ToDateTime(Session["patientLogFromDate"]);
                toD   = Convert.ToDateTime(Session["patientLogToDate"]);
            }
            else
            {
                fromD = DateTime.Now.AddDays(-7);
                toD   = DateTime.Now;
            }

            Session["patientLogFromDate"] = fromD;
            Session["patientLogToDate"]   = toD;

            PCPCommunicationIndexViewModel viewM = new PCPCommunicationIndexViewModel();

            viewM.FromDate = fromD.ToShortDateString();
            viewM.ToDate   = toD.ToShortDateString();
            viewM.Patients = pcpCommunicationQueryGenerator(fromD, toD);

            return(View(viewM));
        }
コード例 #2
0
        public ActionResult Index(PCPCommunicationIndexViewModel viewM)
        {
            var fromD = new DateTime();
            var toD   = new DateTime();

            fromD = getValidDate(viewM.FromDate, true);
            toD   = getValidDate(viewM.ToDate, false);

            Session["patientLogFromDate"] = fromD;
            Session["patientLogToDate"]   = toD;

            if (Request.Form["sendComms"] != null)
            {
                sendCommunications(viewM.hidIDs);
            }

            viewM.FromDate = fromD.ToShortDateString();
            viewM.ToDate   = toD.ToShortDateString();
            viewM.Patients = pcpCommunicationQueryGenerator(fromD, toD);

            return(View(viewM));
        }