Ejemplo n.º 1
0
        public ActionResult customMatrialList(int DoctorID = 0, string FilterType = "1")
        {
            if (DoctorID == 0)
            {
                DoctorID = getDoctorIDbyUserID();
            }
            IEnumerable <CustomMaterialPresentViewModel> customMatrialList;

            sessionStateManger.setDoctorCustomMatrailFilter(User.Identity.GetUserId(), FilterType);
            if (FilterType == "1")
            {
                customMatrialList = customMatrialRepository.getCustomMaterialList(DoctorID);
            }
            else if (FilterType == "2")
            {
                customMatrialList = customMatrialRepository.getOldCustomMaterialList(DoctorID);
            }
            else if (FilterType == "3")
            {
                int patientID = getCurrentPatientID();
                customMatrialList = customMatrialRepository.getCustomMaterialList(DoctorID, patientID);
            }
            else
            {
                int patientID = getCurrentPatientID();
                customMatrialList = customMatrialRepository.getOldCustomMaterialList(DoctorID, patientID);
            }

            if (customMatrialList == null)
            {
                return(HttpNotFound());
            }
            ViewBag.FilterType = FilterType;

            return(View(customMatrialList));
        }