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

            return(AllFreeTaxiDrivers);
        }
コード例 #2
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);
        }