コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            statusfactura statusfactura = db.statusfactura.Find(id);

            db.statusfactura.Remove(statusfactura);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "id,descripcion")] statusfactura statusfactura)
 {
     if (ModelState.IsValid)
     {
         db.Entry(statusfactura).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(statusfactura));
 }
コード例 #3
0
        public ActionResult Create([Bind(Include = "id,descripcion")] statusfactura statusfactura)
        {
            if (ModelState.IsValid)
            {
                db.statusfactura.Add(statusfactura);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(statusfactura));
        }
コード例 #4
0
        // GET: statusfacturas/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            statusfactura statusfactura = db.statusfactura.Find(id);

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