Пример #1
0
        public static void fillListBox(System.Web.UI.WebControls.ListBox _lst, int _comID)
        {
            try
            {

                Units _unit=new Units();

                UnitInfoSelect _unitSelect = new UnitInfoSelect();
                _unitSelect.ComID = _comID;
                _unitSelect.UnitListBoxItems(_unit._ListItems);

                _lst.DataSource = _unit._ListItems;
                _lst.DataTextField = "Name";
                _lst.DataValueField = "Value";
                _lst.DataBind();

            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                _lst = null;
            }
        }
 private void selectUnitInfo()
 {
     UnitInfoSelect _UnitInfoSelect = new UnitInfoSelect(this._Units);
        _UnitInfoSelect.Units = this._Units;
        _UnitInfoSelect.selectUnits();
        this._ds = _UnitInfoSelect.Ds;
 }