public ActionResult DeleteConfirmed(decimal id)
        {
            Measurement_units measurement_units = db.Measurement_units.Find(id);

            db.Measurement_units.Remove(measurement_units);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "unit_id,unit_name,unit_status")] Measurement_units measurement_units)
 {
     if (ModelState.IsValid)
     {
         db.Entry(measurement_units).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(measurement_units));
 }
        public ActionResult Create([Bind(Include = "unit_id,unit_name,unit_status")] Measurement_units measurement_units)
        {
            if (ModelState.IsValid)
            {
                db.Measurement_units.Add(measurement_units);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(measurement_units));
        }
        // GET: Measurement_units/Delete/5
        public ActionResult Delete(decimal id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Measurement_units measurement_units = db.Measurement_units.Find(id);

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