Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tbl_LK_MarketUnitOfMeaure tbl_LK_MarketUnitOfMeaure = db.tbl_LK_MarketUnitOfMeaure.Find(id);

            db.tbl_LK_MarketUnitOfMeaure.Remove(tbl_LK_MarketUnitOfMeaure);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "UnitOfMeasureID,UnitOfMeasureName")] tbl_LK_MarketUnitOfMeaure tbl_LK_MarketUnitOfMeaure)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_LK_MarketUnitOfMeaure).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tbl_LK_MarketUnitOfMeaure));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "UnitOfMeasureID,UnitOfMeasureName")] tbl_LK_MarketUnitOfMeaure tbl_LK_MarketUnitOfMeaure)
        {
            if (ModelState.IsValid)
            {
                db.tbl_LK_MarketUnitOfMeaure.Add(tbl_LK_MarketUnitOfMeaure);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tbl_LK_MarketUnitOfMeaure));
        }
Пример #4
0
        // GET: MarketUnitOfMeaure/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_LK_MarketUnitOfMeaure tbl_LK_MarketUnitOfMeaure = db.tbl_LK_MarketUnitOfMeaure.Find(id);

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