public ActionResult Create([Bind(Include = "Scheduled_Program_Id,Program_Name,Location,Start_Date,End_Date,Sessions_Per_Week,DummyID")] ProgramsScheduled programsScheduled) { if (ModelState.IsValid) { db.ProgramsScheduleds.Add(programsScheduled); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(programsScheduled)); }
public ActionResult Accept([Bind(Include = "Application_Id, Full_Name, Date_Of_Birth, Highest_Qualification, Marks_Obtained, Goals, Email_Id, Scheduled_Program_Id, Status, Date_Of_Interview")] ApplicationForm applicant) { if (Session["Login_id"] != null) { if (ModelState.IsValid) { db.Entry(applicant).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("StatusChange", "MAC")); } return(View(applicant)); } else { return(RedirectToAction("Login", "Users")); } }
public ActionResult RegisterForAdmin(User user) { if (user == null) { ViewBag.Message = "Please enter the Data"; } if (ModelState.IsValid) { db.Users.Add(user); db.SaveChanges(); ViewBag.Message = "Sucessfully Added"; return(RedirectToAction("Login")); } return(View(user)); }
//Registration public ActionResult Register(ApplicationForm register) { if (register == null) { ViewBag.Message = "Please enter the Data"; } if (ModelState.IsValid) { db.ApplicationForms.Add(register); db.SaveChanges(); ViewBag.Message = "Sucessfully Added"; return(RedirectToAction("DisplayApplicant")); } return(View(register)); }
public ActionResult Create(ProgramsOffered programsOffered) { if (Session["Login_id"] != null) { db.ProgramsOffereds.Add(programsOffered); db.SaveChanges(); return(View()); } else { return(RedirectToAction("Login", "Users")); } }