public ActionResult DeleteConfirmed(int id)
        {
            TruckRefBrands truckRefBrands = db.TruckRefBrands.Find(id);

            db.TruckRefBrands.Remove(truckRefBrands);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "TruckRefBrandID,TruckRefBrandName")] TruckRefBrands truckRefBrands)
 {
     if (ModelState.IsValid)
     {
         db.Entry(truckRefBrands).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(truckRefBrands));
 }
        public ActionResult Create([Bind(Include = "TruckRefBrandID,TruckRefBrandName")] TruckRefBrands truckRefBrands)
        {
            if (ModelState.IsValid)
            {
                db.TruckRefBrands.Add(truckRefBrands);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(truckRefBrands));
        }
        // GET: TruckRefBrands/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TruckRefBrands truckRefBrands = db.TruckRefBrands.Find(id);

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