Пример #1
0
        public ActionResult Save(tblStudent oStudent)
        {
            try
            {
                bool Add_Flg = new CommonBL().isNewEntry(oStudent.StudentId);
                if (Add_Flg)
                {
                    new StudentBL().Create(oStudent);
                }
                else
                {
                    new StudentBL().Update(oStudent);
                }

                TempData["successmsg"] = CommonMsg.Success_Update(EntityNames.Student);
                return(RedirectToAction("ManageStudent", new { id = oStudent.StudentId }));
            }
            catch (Exception ex)
            {
                TempData["errormsg"] = CommonMsg.Error();
                return(RedirectToAction("Index"));
            }
        }