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

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

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

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