Ejemplo n.º 1
0
 public ActionResult DeleteConfirmed(string id)
 {
     WashZa.Models.Laundry laundry = db.Laundries.Find(id);
     db.Laundries.Remove(laundry);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,Active,userid,payid,amount,flag_payment,flag_send")] WashZa.Models.Laundry laundry)
 {
     if (ModelState.IsValid)
     {
         db.Entry(laundry).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(laundry));
 }
Ejemplo n.º 3
0
        public ActionResult Create([Bind(Include = "Id,Active,userid,payid,amount,flag_payment,flag_send")] WashZa.Models.Laundry laundry)
        {
            if (ModelState.IsValid)
            {
                db.Laundries.Add(laundry);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(laundry));
        }
Ejemplo n.º 4
0
 // GET: Laundries/Delete/5
 public ActionResult Delete(string id)
 {
     if (id == null)
     {
         return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
     }
     WashZa.Models.Laundry laundry = db.Laundries.Find(id);
     if (laundry == null)
     {
         return(HttpNotFound());
     }
     return(View(laundry));
 }