public ActionResult DeleteConfirmed(int id)
        {
            T_PlcBrand t_PlcBrand = db.T_PlcBrand.Find(id);

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

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

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