public ActionResult AddTeacher(teacher T) { if (Session["id"] == null) return RedirectToAction("signin", "Home"); DAO.teachers.AddObject(T); DAO.SaveChanges(); return RedirectToAction("Index"); }
/// <summary> /// Deprecated Method for adding a new object to the teachers EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToteachers(teacher teacher) { base.AddObject("teachers", teacher); }
/// <summary> /// Create a new teacher object. /// </summary> /// <param name="teacherId">Initial value of the teacherId property.</param> public static teacher Createteacher(global::System.Int32 teacherId) { teacher teacher = new teacher(); teacher.teacherId = teacherId; return teacher; }
public ActionResult CashView(int id, teacher std) { if (Session["id"] == null) return RedirectToAction("signin", "Home"); try { epayment = std.PaymentMode.ToString(); return RedirectToAction("CashViewResult"); } catch (Exception E) { return RedirectToAction("CashView"); } }
public ActionResult MaritalView(int id, teacher std) { if (Session["id"] == null) return RedirectToAction("signin", "Home"); try { emarital = std.MaritalStatus.ToString(); return RedirectToAction("MaritalViewResult"); } catch (Exception E) { return RedirectToAction("MaritalView"); } }
public ActionResult GenderView(int id, teacher std) { if (Session["id"] == null) return RedirectToAction("signin", "Home"); try { egender = std.Gender.ToString(); return RedirectToAction("GenderViewResult"); } catch (Exception E) { return RedirectToAction("GenderView"); } }
public ActionResult Edit(int id, teacher T) { if (Session["id"] == null) return RedirectToAction("signin", "Home"); teacher tec = (from tech in DAO.teachers where tech.teacherId == id select tech).FirstOrDefault<teacher>(); tec.teacherId = T.teacherId; tec.Status = T.Status; tec.TeacherAddress = T.TeacherAddress; tec.TeacherDOB = T.TeacherDOB; tec.TeacherName = T.TeacherName; tec.Telephone = T.Telephone; tec.CellPhone = T.CellPhone; tec.JoinDate = T.JoinDate; tec.BasicSalary = T.BasicSalary; tec.Account_Number = T.Account_Number; tec.MaritalStatus = T.MaritalStatus; tec.PaymentMode = T.PaymentMode; tec.Designation = T.Designation; DAO.SaveChanges(); return RedirectToAction("ViewTeacherMenu"); }
public ActionResult DesignationView(int id, teacher std) { if (Session["id"] == null) return RedirectToAction("signin", "Home"); try { desig = std.Designation.ToString(); return RedirectToAction("DesignationViewResult"); } catch (Exception E) { return RedirectToAction("DesignationView"); } }