private List <Driver> GetAllFreeDrivers() { IOperatorBl operatorBl = HttpContext.Current.Application.GetContainer().Resolve <IOperatorBl>(); var AllFreeTaxiDrivers = operatorBl.GetAllDriversByDriverStatus((int)DriverStatusEnum.Free); return(AllFreeTaxiDrivers); }
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()); } }
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); }