public string[] ValidationList() { string sql = "select validation ||' ' ||cmmnt as item from hdb_validation " // where validation in ('A','F','L','H','P','T','V') " + "UNION SELECT ' <<null>>' from dual "; DataTable tbl = m_server.Table("validation", sql); return(DataTableUtility.StringList(tbl, "", "item").ToArray()); }
private void comboBoxFilter_SelectedIndexChanged(object sender, EventArgs e) { try { Cursor = Cursors.WaitCursor; Application.DoEvents(); this.checkedListBoxSites.Items.Clear(); var tbl = db.GetDataTable(SheetName, SpreadsheetGear.Data.GetDataFlags.FormattedText); var table = DataTableUtility.SelectDistinct(tbl, SiteColumn); var sites = DataTableUtility.StringList(table, "", SiteColumn); this.checkedListBoxSites.Items.AddRange(sites.ToArray()); } finally { Cursor = Cursors.Default; } }
public static string[] LookupMonthlyInventory(string cbtt) { List <string> rval = new List <string>(); var tbl = DataTableUtility.Select(MonthlyInventory, "Cbtt='" + cbtt + "'", "cbtt,pcode"); var pcodeList = DataTableUtility.StringList(DataTableUtility.SelectDistinct(tbl, "pcode"), "", "pcode"); foreach (var pc in pcodeList) { string line = cbtt.PadRight(12) + " " + pc.PadRight(9); var rows = tbl.Select("Cbtt='" + cbtt + "' and pcode='" + pc + "'"); for (int i = 0; i < rows.Length; i++) { line += rows[i]["years"].ToString() + " "; } rval.Add(line); } return(rval.ToArray()); }