public TypeCodeChangeForm(string tableName, int IdToIgnore) { InitializeComponent(); idToIgnore = IdToIgnore; parmTableName = tableName; clsParmTypeCodes = new parmTypeCodes(tableName, CCFBGlobal.connectionString, ""); arrayList = clsParmTypeCodes.TypeCodesArray; loadList(); }
private void setcboSortOrder(int idx) { bool tmpLoading = loading; string whereClause = ""; if (idx > 0) { for (int i = 0; i < idx; i++) { if (cboSort[i].SelectedIndex > 0) { if (whereClause == "") { whereClause = "WHERE ID NOT IN(" + cboSort[i].SelectedValue.ToString(); } else { whereClause += ", " + cboSort[i].SelectedValue.ToString(); } } } if (whereClause != "") { whereClause += ")"; } } loading = true; object sortList = new parmTypeCodes(CCFBGlobal.parmTbl_CSFPSortOrder, CCFBGlobal.connectionString, whereClause); if (sortList != null) { cboSort[idx].DataSource = ((parmTypeCodes)sortList).TypeCodesArray; cboSort[idx].DisplayMember = "LongName"; cboSort[idx].ValueMember = "UID"; } else { cboSort[idx].DataSource = null; cboSort[idx].Items.Add("Not Initialized"); } cboSort[idx].SelectedIndex = 0; loading = tmpLoading; }