Exemple #1
0
        private List <Driver> GetAllFreeDrivers()
        {
            IOperatorBl operatorBl         = HttpContext.Current.Application.GetContainer().Resolve <IOperatorBl>();
            var         AllFreeTaxiDrivers = operatorBl.GetAllDriversByDriverStatus((int)DriverStatusEnum.Free);

            return(AllFreeTaxiDrivers);
        }
Exemple #2
0
 public IEnumerable <Request> GetAllRequests(string status)
 {
     if (status == "All")
     {
         IOperatorBl operatorBl = HttpContext.Current.Application.GetContainer().Resolve <IOperatorBl>();
         var         orders     = operatorBl.GetAllRequests();
         return(orders.OrderBy(o => o.RequesTime).ToList());
     }
     else
     {
         IOperatorBl operatorBl = HttpContext.Current.Application.GetContainer().Resolve <IOperatorBl>();
         var         orders     = operatorBl.GetAllRequestsByStatus((int)Enum.Parse(typeof(RequestStatusEnum), status));
         return(orders.OrderBy(o => o.RequesTime).ToList());
     }
 }
Exemple #3
0
        private bool GetDrivers()
        {
            IOperatorBl operatorBl = HttpContext.Current.Application.GetContainer().Resolve <IOperatorBl>();

            var drivers = operatorBl.GetAllDriversByDriverStatus((int)Enum.Parse(typeof(DriverStatusEnum), "Free"));

            driversDropDownList.DataSource     = drivers;
            driversDropDownList.DataValueField = "Id";
            driversDropDownList.DataTextField  = "DriverInfo";
            driversDropDownList.DataBind();

            if (drivers.Count < 1)
            {
                return(false);
            }

            return(true);
        }