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