示例#1
0
        public ActionResult Index()
        {
            StudentViewModel st = stb.GetStudentbyEmailId(Session["emailid"].ToString());

            Session.Add("studentid", st.StudentId);
            if (st.StudentId > 0)
            {
                ViewBag.SaveText = "Update";
                Session.Add("action", "Update");
            }
            else
            {
                ViewBag.SaveText = "Save";
                Session.Add("action", "Save");
            }
            return(View(st));
        }