示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Detali detali = db.Detali.Find(id);

            db.Detali.Remove(detali);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public void SetOb(int x, int y, Detali c)
 {
     if (x < 0 || y < 0 || x >= m || y >= h)
     {
         return;
     }
     mas[x, y] = c;
 }
示例#3
0
 public ActionResult Edit([Bind(Include = "Id,NmDetal")] Detali detali)
 {
     if (ModelState.IsValid)
     {
         db.Entry(detali).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(detali));
 }
示例#4
0
        public ActionResult Create([Bind(Include = "Id,NmDetal")] Detali detali)
        {
            if (ModelState.IsValid)
            {
                db.Detali.Add(detali);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(detali));
        }
示例#5
0
        // GET: Detalis/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Detali detali = db.Detali.Find(id);

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