public string UpdateStatus(int bookingID, string status) { DeliveryDAL agent = new DeliveryDAL(); bool res = agent.UpdateBookingStatus(bookingID, status); if (res) { return "DONE"; } else { return "ERROR"; } }
public ActionResult DeliveryIndex() { //ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application."; //Authentication string type = (string)Session["UserRole"]; if (type == null) { return RedirectToAction("Register", "UserAccount"); } else if (type.CompareTo("D") != 0) { Session["UserID"] = null; Session["UserRole"] = null; return RedirectToAction("Login", "UserAccount"); } DeliveryDAL agent = new DeliveryDAL(); DeliveryModel bookings = agent.Bookings(); return View(bookings); }