public ActionResult Profile() { if (Session["Student"] == null) { return(RedirectToAction("login", "Home", new { area = "" })); } StudentDBHandle sadb = new StudentDBHandle(); int userid = Convert.ToInt32((Session["Student"])); var sab = db.Students.Find(userid); Session["imgPath"] = sab.ImagePath; tbl_StudentValidation sa = sadb.GetProfileData(userid); return(View(sa)); }
public ActionResult ProfileSetting() { if (Session["Student"] == null) { return(RedirectToAction("Login", "Account", new { area = "" })); } StudentDBHandle sadb = new StudentDBHandle(); int userid = Convert.ToInt32((Session["Student"])); var sab = db.Students.Find(userid); Session["imgPath"] = sab.ImagePath; Session["DateCreated"] = sab.RegisterationDate; Session["Address"] = sab.Address; tbl_StudentValidation sa = sadb.GetProfileData(userid); return(View(sa)); }