Example #1
0
        public ActionResult SavePatientShedule(List <string> values)
        {
            TimeSpan       ts             = new TimeSpan();
            PatientShedule patientShedule = new PatientShedule();

            patientShedule.PatientCode  = values[0];
            patientShedule.Date         = DateTime.Now;
            patientShedule.VisitingTime = DateTime.ParseExact(values[1], "dd/MM/yyyy", CultureInfo.InvariantCulture);
            if (values[2].Contains("Hour"))
            {
                patientShedule.VisitingTime = patientShedule.VisitingTime + ts;
            }
            else
            {
                patientShedule.VisitingTime = patientShedule.VisitingTime + TimeSpan.Parse(values[2]);
            }
            patientShedule.VisitingPurpose = values[3];
            patientShedule.PatientId       = Convert.ToInt16(values[4]);
            patientShedule.Id           = Convert.ToInt32(values[5]);
            patientShedule.Contact      = values[6];
            patientShedule.serialNo     = Convert.ToInt16(values[7]);
            patientShedule.PataientType = values[8];
            var message = PatientManualShedulingManager.SavePatientShedule(patientShedule);

            return(Json(new { Success = true, Message = message }));
        }
Example #2
0
        public ActionResult GetPatientData(string patientCode, DateTime dt)
        {
            ////dt=new string();
            var value = true;
            //DateTime date = DateTime.ParseExact(dt, "dd/MM/yyyy", CultureInfo.InvariantCulture);
            List <string> patientData = PatientManualShedulingManager.GetPatientValue(patientCode, dt);

            if (patientData == null)
            {
                value = false;
            }
            return(Json(new { data = patientData, Success = value }));
        }