private void FormSpatialReferenceSystems_Load(object sender, System.EventArgs e) { ProjDB db = new ProjDB(_table); DataTable tab = (_table == ProjDBTables.projs) ? db.GetTable(_filter) : db.GetDatumTable(_filter); if (tab == null) { MessageBox.Show(db.errMessage, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } BuildList(tab); db.Dispose(); }
private void btnQuery_Click(object sender, System.EventArgs e) { ProjDB db = new ProjDB(_table); DataTable tab; if (_table == ProjDBTables.projs) { tab = db.GetTable("(PROJ_ID like '%" + txtWhere.Text + "%' OR PROJ_DESCRIPTION like '%" + txtWhere.Text + "%')" + ((_filter != String.Empty) ? " AND (" + _filter + ")" : "")); } else { tab = db.GetDatumTable("DATUM_Name like '%" + txtWhere.Text + "%'"); } db.Dispose(); if (tab == null) { MessageBox.Show(db.errMessage, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } BuildList(tab); }