//Total amount of completed orders
 public ActionResult TotalAmount()
 {
     if (!CommonServices.CheckUserSession())
     {
         return this.RedirectToAction("Login", "Login");
     }
     OrderServices orderService = new OrderServices();
     var GrandTotal = orderService.GrandTotal(UserSession.UserId);
     return PartialView("_GrandTotalPartial", GrandTotal);
 }
        //Orders initially after user is logged in
        public ActionResult Index()
        {
            if (!CommonServices.CheckUserSession())
            {
                return this.RedirectToAction("Login", "Login");
            }

            OrderServices orderServ = new OrderServices();
            return View(orderServ.GetOrderByDeliveryId(UserSession.UserId));
        }
        //Details of amount--returns partial view
        public ActionResult AmountDetails(int id)
        {
            if (!CommonServices.CheckUserSession())
            {
                return this.RedirectToAction("Login", "Login");
            }

            OrderServices orderservice = new OrderServices();
            var amountDetail = orderservice.AmountListById(id);
            return PartialView("_AmountDetails", amountDetail);
        }
        //Details of individual order
        public ActionResult Details(int id)
        {
            if (!CommonServices.CheckUserSession())
            {
                return this.RedirectToAction("Login", "Login");
            }


            OrderServices orderService = new OrderServices();
            return View(orderService.getOrderDetailById(id));
        }
 //Map 
 public ActionResult GetMap(int id)
 {
     OrderServices orderService = new OrderServices();
     var getMap = orderService.getOrderDetailById(id);
     return View(getMap);
 }
        //Updating the status of individual order
        public int UpdateStatus(string statusId, string id)
        {

            int result = new OrderServices().UpdatedStatus(Convert.ToInt16(id), Convert.ToInt16(statusId));
            return result;
        }