Example #1
0
 public ActionResult Complaint(PickupDB pickupdb)
 {
     db.Entry(pickupdb).State = EntityState.Modified;
         db.Configuration.ValidateOnSaveEnabled = false;
         db.SaveChanges();
         return RedirectToAction("Review");
 }
Example #2
0
 public ActionResult Date(PickupDB pickupdb)
 {
     if (ModelState.IsValid)
     {
         db.Pickup.Add(pickupdb);
         db.SaveChanges();
         return RedirectToAction("Confirm",pickupdb);
     }
     return View(pickupdb);
 }
Example #3
0
        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
            }
        }
Example #4
0
 public ViewResult Confirm(PickupDB pickupdb)
 {
     return View(pickupdb);
 }
Example #5
0
 //
 // GET: /Status/
 public ViewResult Status()
 {
     PickupDB pickupdb = new PickupDB();
     pickupdb.ID = 1;
     return View(pickupdb);
 }
Example #6
0
 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");
     }
 }
Example #7
0
 public ActionResult Index()
 {
     PickupDB pickupdb = new PickupDB();
     pickupdb.ID = 1;
     return View(pickupdb);
 }