public ActionResult Complaint(PickupDB pickupdb) { db.Entry(pickupdb).State = EntityState.Modified; db.Configuration.ValidateOnSaveEnabled = false; db.SaveChanges(); return RedirectToAction("Review"); }
public ActionResult Date(PickupDB pickupdb) { if (ModelState.IsValid) { db.Pickup.Add(pickupdb); db.SaveChanges(); return RedirectToAction("Confirm",pickupdb); } return View(pickupdb); }
public ActionResult Create(PickupDB pickupdb) { List<string> PropertyNames = new List<string>() { "firstn", "lastn", "number", "address", "pincode" }; if (PropertyNames.Any(p => !ModelState.IsValidField(p))) { return View(pickupdb); // Error } else { return RedirectToAction("Date", pickupdb); // Everything is okay } }
public ViewResult Confirm(PickupDB pickupdb) { return View(pickupdb); }
// // GET: /Status/ public ViewResult Status() { PickupDB pickupdb = new PickupDB(); pickupdb.ID = 1; return View(pickupdb); }
public ActionResult Edit(PickupDB pickupdb) { List<string> PropertyNames = new List<string>() { "firstn", "lastn", "number", "address", "pincode" }; if (PropertyNames.Any(p => !ModelState.IsValidField(p))) { return View(pickupdb); // Error } else { db.Entry(pickupdb).State = EntityState.Modified; db.Configuration.ValidateOnSaveEnabled = false; db.SaveChanges(); return RedirectToAction("Index", "Home"); } }
public ActionResult Index() { PickupDB pickupdb = new PickupDB(); pickupdb.ID = 1; return View(pickupdb); }