Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            TrukReport trukReport = db.TrukReports.Find(id);

            db.TrukReports.Remove(trukReport);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 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));
 }
Exemple #3
0
        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));
        }
Exemple #4
0
        // 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));
        }