Example #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            Gen_Mst_Product gen_Mst_Product = db.Gen_Mst_Product.Find(id);

            db.Gen_Mst_Product.Remove(gen_Mst_Product);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "ProductCode,ProductName,Comments")] Gen_Mst_Product gen_Mst_Product)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gen_Mst_Product).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(gen_Mst_Product));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "ProductCode,ProductName,Comments")] Gen_Mst_Product gen_Mst_Product)
        {
            if (ModelState.IsValid)
            {
                db.Gen_Mst_Product.Add(gen_Mst_Product);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(gen_Mst_Product));
        }
Example #4
0
        // GET: Gen_Mst_Product/Details/5
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Gen_Mst_Product gen_Mst_Product = db.Gen_Mst_Product.Find(id);

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