コード例 #1
0
        public ActionResult Speciality(int Id)
        {
            Models.ViewModelHome  newModel   = new Models.ViewModelHome();
            List <Models.Doctors> doctorList = db.Doctors.Where(d => d.DepartmentId == Id).ToList();

            newModel.Doctors     = doctorList;
            newModel.Departments = db.Departments.ToList();
            return(View(newModel));
        }
 public ActionResult Create()
 {
     if (Session["isLogin"] != null && (bool)Session["isLogin"] == true)
     {
         Models.ViewModelHome model = new Models.ViewModelHome();
         model.Setting = db.Settings.FirstOrDefault();
         return(View(model));
     }
     return(RedirectToAction("Index", "Login"));
 }
 public ActionResult Create()
 {
     if (Session["isLogin"] != null && (bool)Session["isLogin"] == true)
     {
         Models.ViewModelHome model = new Models.ViewModelHome();
         model.AboutNav = db.AboutNav.ToList();
         return(View(model));
     }
     return(RedirectToAction("Index", "Login"));
 }