private void SettingList_Load(object sender, EventArgs e)
        {
            List <ABSetting> settings = SettingDAL.GetSettings();

            grd_settingsList.DataSource = settings.ToDataTable();

            if (settings.Any())
            {
                lbl_noSettings.Visible   = false;
                grd_settingsList.Visible = true;
            }
            else
            {
                lbl_noSettings.Visible   = true;
                grd_settingsList.Visible = false;
            }
        }
示例#2
0
        public SearchList()
        {
            InitializeComponent();
            HideSearchForm();
            cmb_srchPlayerQuality.DataSource = DropDownHelper.GetQualities();
            cmb_srchPlayerRarity.DataSource  = DropDownHelper.GetRarities();
            cmb_srchPlayerLeague.DataSource  = DropDownHelper.GetLeagues();
            cmb_srchPlayerClub.DataSource    = DropDownHelper.GetClubs();

            var abSettings = new List <DropDownOption>
            {
                new DropDownOption {
                    Id = -1, DisplayValue = "-- AB Setting --"
                }
            };

            abSettings.AddRange(SettingDAL.GetSettings().Select(a => new DropDownOption {
                Id = a.PkId, DisplayValue = a.Name
            }));
            cmb_abSettings.DataSource = abSettings;

            ac_playerName.DataSource = SearchDAL.GetPlayersForAutoSuggest().Select(a => a.DisplayName).Distinct().ToList();
        }