// GET: UdApplication/Create public ActionResult Create() { var states = GetAllStates(); var model = new UdApplication(); model.StateList = GetSelectListItems(states); return(View(model)); }
public ActionResult DeleteConfirmed(int id) { UdApplication udApplication = db.UDApplications.Find(id); db.UDApplications.Remove(udApplication); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,StudentNumber,FirstName,MiddleName,LastName,Email,Address1,Address2,City,State,ZipCode,HomePhone,CellPhone,CampusId,SelectProgram,Semester,CurrentCourses,PersonalQualties,HealthCare,Crimes,SchoolTrouble,HonorablyDischarge,DischargedEmployment,Harassment,DrugsOrAlcohol,DrugsOrAlcoholEssay,AccurateKnowledge,Status")] UdApplication udApplication) { var statuses = GetStatusList(); udApplication.StatusList = GetSelectListItems(statuses); if (ModelState.IsValid) { db.Entry(udApplication).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(udApplication)); }
// GET: UdApplication/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } UdApplication udApplication = db.UDApplications.Find(id); if (udApplication == null) { return(HttpNotFound()); } return(View(udApplication)); }
// GET: UdApplication/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } UdApplication udApplication = db.UDApplications.Find(id); var model = new UdApplication(); var statuses = GetStatusList(); udApplication.StatusList = GetSelectListItems(statuses); if (udApplication == null) { return(HttpNotFound()); } return(View(udApplication)); }