コード例 #1
0
        public ActionResult Treatment()
        {
            if (User.Identity.IsAuthenticated && Session["centerLogin"] != null)
            {
                return(RedirectToAction("Login"));
            }
            if (Session["CenterId"] == null)
            {
                return(RedirectToAction("Login"));
            }

            Session["TreatmentList"] = new List <Treatment>();

            var doctorList = centerManager.GetDoctorList();

            ViewBag.DoctorList = new SelectList(doctorList, "Id", "Name");

            var medicineList = headManager.GetMedicineList();

            ViewBag.MedicineList = new SelectList(medicineList, "Id", "GenericName");

            var diseaseList = headManager.GetDiseaseList();

            ViewBag.DiseaseList = new SelectList(diseaseList, "Id", "Name");

            var doseList = centerManager.GetDoseList();

            ViewBag.DoseList = new SelectList(doseList, "Id", "Name");
            ViewBag.CenterId = 5;
            ViewBag.CenterId = Session["CenterId"];
            PatientInfo patientInfo = new PatientInfo();

            ViewBag.personalInfo = patientInfo;
            return(View());
        }
        public void GetLoadedDoctorAccordingToCenter()
        {
            string centerCode = Session["value"].ToString();

            int id = centerManager.GetCenterId(centerCode);

            doctornameDropDownList.DataSource     = centerManager.GetDoctorList(id);
            doctornameDropDownList.DataTextField  = "Name";
            doctornameDropDownList.DataValueField = "Id";
            doctornameDropDownList.DataBind();
        }