public ActionResult DeleteConfirmed(int id) { TrukReport trukReport = db.TrukReports.Find(id); db.TrukReports.Remove(trukReport); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,NoPolisi,Driver,AsstDriver,Tujuan,Berangkat,Pulang,MuatanBerangkat,QtyMuatanBerangkat,MuatanPulang,QtyMuatanPulang")] TrukReport trukReport) { if (ModelState.IsValid) { db.Entry(trukReport).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(trukReport)); }
public ActionResult Create([Bind(Include = "ID,NoPolisi,Driver,AsstDriver,Tujuan,Berangkat,Pulang,MuatanBerangkat,QtyMuatanBerangkat,MuatanPulang,QtyMuatanPulang")] TrukReport trukReport) { if (ModelState.IsValid) { db.TrukReports.Add(trukReport); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(trukReport)); }
// GET: TrukReports/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TrukReport trukReport = db.TrukReports.Find(id); if (trukReport == null) { return(HttpNotFound()); } return(View(trukReport)); }