Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            DailyLogMileageAndFuelReport dailyLogMileageAndFuelReport = db.DailyLogMileageAndFuelReports.Find(id);

            db.DailyLogMileageAndFuelReports.Remove(dailyLogMileageAndFuelReport);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Id,Driver,DateofWork,Owner,Tractornumber,Trailernumber,Pronumber,State,Totalmilesdriven,Totalgaspurchased,Routestraveled,Odometerstart,Odometerfinish")] DailyLogMileageAndFuelReport dailyLogMileageAndFuelReport)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dailyLogMileageAndFuelReport).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dailyLogMileageAndFuelReport));
 }
Beispiel #3
0
        // GET: DailyLogMileageAndFuelReports/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DailyLogMileageAndFuelReport dailyLogMileageAndFuelReport = db.DailyLogMileageAndFuelReports.Find(id);

            if (dailyLogMileageAndFuelReport == null)
            {
                return(HttpNotFound());
            }
            return(View(dailyLogMileageAndFuelReport));
        }