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