Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            trip_request trip_request = db.trip_request.Find(id);

            db.trip_request.Remove(trip_request);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "id,rider_id,seats,start_at_date,end_at_date,trip_type_id,created_at,created_by")] trip_request trip_request)
 {
     if (ModelState.IsValid)
     {
         db.Entry(trip_request).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.trip_type_id = new SelectList(db.trip_types, "id", "name", trip_request.trip_type_id);
     return(View(trip_request));
 }
Ejemplo n.º 3
0
        public ActionResult DeleteConfirmed(int id)
        {
            trip_request trip_request = db.trip_request.Find(id);

            db.trip_request.Remove(trip_request);
            db.SaveChanges();
            if (Request.IsAjaxRequest())
            {
                return(Json(new { type = "success", message = "Deleted Success" }));
            }
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 4
0
        // GET: TripRequested/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            trip_request trip_request = db.trip_request.Find(id);

            if (trip_request == null)
            {
                return(HttpNotFound());
            }
            return(View(trip_request));
        }
Ejemplo n.º 5
0
        // GET: trip_request/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            trip_request trip_request = db.trip_request.Find(id);

            if (trip_request == null)
            {
                return(HttpNotFound());
            }
            ViewBag.trip_type_id = new SelectList(db.trip_types, "id", "name", trip_request.trip_type_id);
            return(View(trip_request));
        }