Exemple #1
0
 private void LoadDataSector(ComboBox obj)
 {
     databases.baseDS.bizSectorDataTable sectorTbl = DataAccess.Libs.myBizSectorTbl;
     obj.DataSource = null;
     obj.Items.Clear();
     obj.DisplayMember = sectorTbl.description1Column.ColumnName;
     obj.ValueMember   = sectorTbl.codeColumn.ColumnName;
     obj.DataSource    = sectorTbl;
     if (sectorTbl.Count > 0)
     {
         obj.MaxDropDownItems = sectorTbl.Count;
         obj.SelectedIndex    = 0;
     }
 }
 public databases.baseDS.bizSectorDataTable GetBizSector()
 {
     try
     {
         databases.baseDS.bizSectorDataTable tbl = new databases.baseDS.bizSectorDataTable();
         databases.DbAccess.LoadData(tbl);
         return tbl;
     }
     catch (Exception ex)
     {
         WriteSysLogLocal("WS024", ex);
     }
     return null;
 }