コード例 #1
0
        // GET: UdApplication/Create
        public ActionResult Create()
        {
            var states = GetAllStates();
            var model  = new UdApplication();

            model.StateList = GetSelectListItems(states);
            return(View(model));
        }
コード例 #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            UdApplication udApplication = db.UDApplications.Find(id);

            db.UDApplications.Remove(udApplication);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        // 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));
        }
コード例 #5
0
        // 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));
        }