Ejemplo n.º 1
0
        public string UpdateStatus(int bookingID, string status)
        {
            DeliveryDAL agent = new DeliveryDAL();
            bool res = agent.UpdateBookingStatus(bookingID, status);

            if (res)
            {
                return "DONE";
            }

            else
            {
                return "ERROR";
            }
        }
Ejemplo n.º 2
0
        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);
        }