public ActionResult DeleteConfirmed(int id)
        {
            Tbl_ProductsType tbl_ProductsType = db.Tbl_ProductsType.Find(id);

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

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

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