示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            UDApplication uDApplication = db.UDApplications.Find(id);

            db.UDApplications.Remove(uDApplication);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
        // GET: UDApplications/Create
        public ActionResult Create()
        {
            var uDApplication = new UDApplication();
            var state         = States();

            uDApplication.States = GetStatesListItems(state);
            return(View(uDApplication));
        }
示例#3
0
 public ActionResult Edit([Bind(Include = "Id,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")] UDApplication uDApplication)
 {
     if (ModelState.IsValid)
     {
         db.Entry(uDApplication).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(uDApplication));
 }
示例#4
0
        // GET: UDApplication/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            UDApplication uDApplication = db.UDApplications.Find(id);

            if (uDApplication == null)
            {
                return(HttpNotFound());
            }
            return(View(uDApplication));
        }
示例#5
0
        // GET: UDApplications/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            UDApplication uDApplication = db.UDApplications.FirstOrDefault(s => s.ID == id);

            if (uDApplication == null)
            {
                return(HttpNotFound());
            }
            return(View(uDApplication));
        }
示例#6
0
        public ActionResult Edit([Bind(Include = "ID,FirstName,MiddleName,LastName,Email,StreetAddress,StreetAddress2,City,State,ZipCode,HomeNumber,CellNumber,StudentNumber,Program1,Semester,CurrentCourses,PersonalQualEssay,NurseExperience,Legal1,Legal2,Legal3,Legal4,Legal5,Legal6,ExplainLegal,ConfirmLegal,Status")] UDApplication uDApplication)
        {
            if (ModelState.IsValid)
            {
                db.Entry(uDApplication).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            var status = Status();

            uDApplication.Statuses = GetStatusListItems(status);
            var state = States();

            uDApplication.States = GetStatesListItems(state);
            return(View(uDApplication));
        }
示例#7
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            UDApplication uDApplication = db.UDApplications.FirstOrDefault(s => s.ID == id);

            if (uDApplication == null)
            {
                return(HttpNotFound());
            }
            var status = Status();

            uDApplication.Statuses = GetStatusListItems(status);
            var state = States();

            uDApplication.States = GetStatesListItems(state);
            return(View(uDApplication));
        }
示例#8
0
        public ActionResult Create([Bind(Include = "ID,FirstName,MiddleName,LastName,Email,StreetAddress,StreetAddress2,City,State,ZipCode,HomeNumber,CellNumber,StudentNumber,Program1,Semester,CurrentCourses,PersonalQualEssay,NurseExperience,Legal1,Legal2,Legal3,Legal4,Legal5,Legal6,ExplainLegal,ConfirmLegal,Status")] UDApplication uDApplication)
        {
            if (ModelState.IsValid)
            {
                if (User.IsInRole("Advisor") || (User.IsInRole("Admin")) || (User.IsInRole("SuperAdmin")))
                {
                    db.UDApplications.Add(uDApplication);
                    db.SaveChanges();
                    return(RedirectToAction("Index"));
                }
                else
                {
                    db.UDApplications.Add(uDApplication);
                    db.SaveChanges();
                    return(RedirectToAction("Default", "Student", false));
                }
            }
            var state = States();

            uDApplication.States = GetStatesListItems(state);
            return(View(uDApplication));
        }