コード例 #1
0
        private void LoadComboBoxes()
        {
            lstBillFrom.GetBillFrom();
            cboBillFrom.DisplayMember = "Name";
            cboBillFrom.ValueMember   = "ElementID";
            cboBillFrom.DataSource    = lstBillFrom.Elements;

            lstPurchaseType.GetPurchaseType();
            cboPurchaseType.DisplayMember = "Name";
            cboPurchaseType.ValueMember   = "ElementID";
            cboPurchaseType.DataSource    = lstPurchaseType.Elements;

            lstWhs.GetWhs();
            cboWhs.DisplayMember = "Full";
            cboWhs.ValueMember   = "ElementID";
            cboWhs.DataSource    = lstWhs.Elements;

            lstDivisions.GetDivisions();
            cboDivision.DisplayMember = "Code";
            cboDivision.ValueMember   = "ElementID";
            cboDivision.DataSource    = lstDivisions.Elements;

            lstSeasons.GetAllSeasons();
            cboSeason.DisplayMember = "SeasonName";
            cboSeason.ValueMember   = "GISeasonID";
            cboSeason.DataSource    = lstSeasons.Elements;
        }
コード例 #2
0
        private void LoadComboBoxes()
        {
            lstBillFrom.GetBillFrom();
            cboBillFrom.DisplayMember = "Name";
            cboBillFrom.ValueMember   = "ElementID";
            cboBillFrom.DataSource    = lstBillFrom.Elements;

            lstPurchaseType.GetPurchaseType();
            cboPurchaseType.DisplayMember = "Name";
            cboPurchaseType.ValueMember   = "ElementID";
            cboPurchaseType.DataSource    = lstPurchaseType.Elements;

            lstWhs.GetWhs(clsGlobals.GIPar.ProductColorID);
            cboWhs.DisplayMember = "Full";
            cboWhs.ValueMember   = "ElementID";
            cboWhs.DataSource    = lstWhs.Elements;

            lstDivisions.GetDivisions();
            cboDivision.DisplayMember = "Code";
            cboDivision.ValueMember   = "ElementID";
            cboDivision.DataSource    = lstDivisions.Elements;

            //Seleccionar primer elemento
            if (lstDivisions.Quantity > 0)
            {
                cboDivision.SelectedIndex = 0;
            }

            lstSeasons.GetAllSeasons();
            cboSeason.DisplayMember = "SeasonName";
            cboSeason.ValueMember   = "GISeasonID";
            cboSeason.DataSource    = lstSeasons.Elements;
        }