private void DoFilterDataTable() { if (String.IsNullOrEmpty(txtFilterDt.Text)) { ClearFilter(); return; } Cursor currentCursor = Cursor.Current; try { Cursor.Current = Cursors.WaitCursor; ShowStatusProgress("Filtering data..."); if (ddlFilterType.Text == "Custom") { CustomFilterDataTable(txtFilterDt.Text); } else if (ddlFilterType.Text == "Like") { LikeSearchDataTable(txtFilterDt.Text); } } catch (Exception ex) { GenericErrorDialog.ShowError("Filter Error", "Invalid filter expression", ex.Message); } finally { Cursor.Current = currentCursor; HideStatusProgress(); } }
public static void ShowError(string caption, string shortError, Exception ex) { GenericErrorDialog frm = new GenericErrorDialog(); frm.lblShortDescription.Text = shortError; frm.txtLongDescription.Text = Utils.FormatException(ex); frm.Text = caption; frm.ShowDialog(); }
public static void ShowError(string caption, string shortError, string longError) { GenericErrorDialog frm = new GenericErrorDialog(); frm.lblShortDescription.Text = shortError; frm.txtLongDescription.Text = longError; frm.Text = caption; frm.ShowDialog(); }
private void btnSave_Click(object sender, EventArgs e) { try { kryptonPaletteCustom.Export(ConfigHelper.CustomPaletteFileName, true, true); DialogResult = DialogResult.OK; } catch (Exception ex) { GenericErrorDialog.ShowError("Palette Save Error", "Can not save custom palette.", ex); DialogResult = DialogResult.None; } }