Beispiel #1
0
        public ActionResult RadiologyTest()
        {
            List <RadiologyTestReport> PathologyList = new List <RadiologyTestReport>();
            Property p  = new Property();
            DataSet  ds = new DataSet();

            p.OnTable = "FetchRadiologyTest";

            ds = dl.FetchRadiologyReport_sp(p);


            List <SelectListItem> PatientList = new List <SelectListItem>();

            PatientList.Add(new SelectListItem {
                Text = "Select Patient", Value = ""
            });
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                PatientList.Add(new SelectListItem {
                    Text = dr["Name"].ToString(), Value = dr["PatientId"].ToString()
                });
            }
            ViewBag.PatientList = new SelectList(PatientList, "Value", "Text");


            List <SelectListItem> DoctorList = new List <SelectListItem>();

            DoctorList.Add(new SelectListItem {
                Text = "Select Doctor", Value = ""
            });
            foreach (DataRow dr in ds.Tables[1].Rows)
            {
                DoctorList.Add(new SelectListItem {
                    Text = dr["FullName"].ToString(), Value = dr["EmployeeId"].ToString()
                });
            }
            ViewBag.DoctorList = new SelectList(DoctorList, "Value", "Text");

            return(View());
        }