Example #1
0
        private void FillContract() {

            const string METHOD_NAME = "FillContract";

            try {

                ArrayList listIDs = new System.Collections.ArrayList(_contractList.Split(new char[] { ',' }));
                ListBox lst = lstFaContract;
                lst.Items.Clear();

                List<ListBeetContractIDItem> stateList = WSCReportsExec.ContractListByStations(_stationList);

                foreach (ListBeetContractIDItem state in stateList) {

                    ListItem item = new ListItem(state.ContractNumber, state.ContractID);
                    lst.Items.Add(item);
                    if (listIDs.Contains(item.Value)) {
                        lst.Items[lst.Items.Count - 1].Selected = true;
                    }
                }
            }
            catch (Exception ex) {
                Common.CException wex = new Common.CException(MOD_NAME + METHOD_NAME, ex);
                throw (wex);
            }
        }