Ejemplo n.º 1
0
        /*Action to display the department detials including the symptoms treated in that department*/
        /*******************************************************************************************/
        public ActionResult DeptDetails(int?id)
        {
            Department     department = db.Departments.Find(id);
            List <Symptom> symptoms   = db.Symptoms.Where(smp => smp.deptId == id).ToList();

            DepartmentSymptoms depSymp = new DepartmentSymptoms();

            depSymp.department = department;
            depSymp.symptoms   = symptoms;

            return(View(department));
        }
Ejemplo n.º 2
0
        // GET: Departments/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Department     department = db.Departments.Find(id);
            List <Symptom> symptoms   = db.Symptoms.Where(smp => smp.deptId == id).ToList();

            DepartmentSymptoms depSymp = new DepartmentSymptoms();

            depSymp.department = department;
            depSymp.symptoms   = symptoms;

            if (department == null)
            {
                return(HttpNotFound());
            }
            return(View(department));
        }