Exemple #1
0
        public ActionResult DeleteConfirmed(short id)
        {
            timetable_request timetable_request = db.timetable_request.Find(id);

            db.timetable_request.Remove(timetable_request);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
        // GET: /Request/Details/5
        public ActionResult Details(short?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            timetable_request timetable_request = db.timetable_request.Find(id);

            if (timetable_request == null)
            {
                return(HttpNotFound());
            }
            return(View(timetable_request));
        }
Exemple #3
0
 public ActionResult Edit([Bind(Include = "Request_ID,Department_Code,Part_Code,Module_Code,Day_ID,Start_Time,Duration,Number_Students,Number_Rooms,Priority,Room_Type,Park_ID,Custom_Comments,Current_Year,Current_Semester,Current_Round,Request_Status")] timetable_request timetable_request)
 {
     if (ModelState.IsValid)
     {
         db.Entry(timetable_request).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Day_ID          = new SelectList(db.timetable_day, "Day_ID", "Day_Name", timetable_request.Day_ID);
     ViewBag.Department_Code = new SelectList(db.timetable_module, "Department_Code", "Module_Title", timetable_request.Department_Code);
     ViewBag.Request_ID      = new SelectList(db.timetable_request, "Request_ID", "Department_Code", timetable_request.Request_ID);
     ViewBag.Request_ID      = new SelectList(db.timetable_request, "Request_ID", "Department_Code", timetable_request.Request_ID);
     ViewBag.Request_ID      = new SelectList(db.timetable_request_room_allocation, "Request_ID", "Building_ID", timetable_request.Request_ID);
     ViewBag.Request_ID      = new SelectList(db.timetable_request_week, "Request_ID", "Request_ID", timetable_request.Request_ID);
     return(View(timetable_request));
 }
Exemple #4
0
        // GET: /Request/Edit/5
        public ActionResult Edit(short?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            timetable_request timetable_request = db.timetable_request.Find(id);

            if (timetable_request == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Day_ID          = new SelectList(db.timetable_day, "Day_ID", "Day_Name", timetable_request.Day_ID);
            ViewBag.Department_Code = new SelectList(db.timetable_module, "Department_Code", "Module_Title", timetable_request.Department_Code);
            ViewBag.Request_ID      = new SelectList(db.timetable_request, "Request_ID", "Department_Code", timetable_request.Request_ID);
            ViewBag.Request_ID      = new SelectList(db.timetable_request, "Request_ID", "Department_Code", timetable_request.Request_ID);
            ViewBag.Request_ID      = new SelectList(db.timetable_request_room_allocation, "Request_ID", "Building_ID", timetable_request.Request_ID);
            ViewBag.Request_ID      = new SelectList(db.timetable_request_week, "Request_ID", "Request_ID", timetable_request.Request_ID);
            return(View(timetable_request));
        }