예제 #1
0
        private void LoadTourDetailGridView(IList <TourDetail> arr)
        {
            TblSelectClass tblTourDetail = new TblSelectClass(_locations, arr);

            this.gridViewTourDetail.DataSource = tblTourDetail;
            this.gridViewTourDetail.ClearSelection();
            this.SetUpTourDetailGridView();
        }
예제 #2
0
        private void LoadLocations()
        {
            var table = new TblSelectClass(_locationsAvailable.Cast <SelectClass>().ToList(), true);

            this.listLocation.DataSource    = table;
            this.listLocation.DisplayMember = "Name";
            this.listLocation.ValueMember   = "Id";
            this.listLocation.SelectedIndex = 0;
        }
예제 #3
0
        private void LoadGridView(int selectedIndex = -1)
        {
            TblSelectClass table = new TblSelectClass(_arr.Cast <SelectClass>().ToList());

            this.gridView.DataSource = table;
            if (selectedIndex < 0)
            {
                this.gridView.ClearSelection();
            }
            else
            {
                this.gridView.Rows[selectedIndex].Selected = true;
            }
        }