//public void SetDBConnector(SqlConnUtil mConntor) //{ // m_connector = mConntor; //} private void OnDataError(object sender, DataGridViewDataErrorEventArgs e) { //FrmMain.PromptError(e.Exception.Message); if (e.Context == DataGridViewDataErrorContexts.Commit) { Debug.Print("Commit error: {0}", e.ToString()); } if (e.Context == DataGridViewDataErrorContexts.CurrentCellChange) { Debug.Print("Cell change: {0}", e.ToString()); } if (e.Context == DataGridViewDataErrorContexts.Parsing) { Debug.Print("parsing error: {0}", e.ToString()); } if (e.Context == DataGridViewDataErrorContexts.LeaveControl) { Debug.Print("leave control error: {0}", e.ToString()); } if (e.Exception is ConstraintException) { DataGridView view = (DataGridView)sender; view.Rows[e.RowIndex].ErrorText = "an error"; view.Rows[e.RowIndex].Cells[e.ColumnIndex].ErrorText = "an error"; e.ThrowException = false; FrmMain.PromptError("约束有问题"); } }
private void dgvSortInfo_DataError_1(object sender, DataGridViewDataErrorEventArgs e) { writeLog.Write(this.Text + "Dgv异常" + e.ToString()); if (e.Exception.InnerException is System.IndexOutOfRangeException) { // MessageBox.Show("出现异常,请查看后台日志,该异常不影响排程!"); writeLog.Write(this.Text + "Dgv:System.IndexOutOfRangeException异常"); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DGV_MainPlugins_DataError(object sender, DataGridViewDataErrorEventArgs e) { LogCons.Inst.Write(LogLevel.Error, "Error occurred ({0}): {1}", sender.ToString(), e.ToString()); }
// handler pentru situatia in care se incearca initializarea cheii primare cu alte valori decat int private void dataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e) { MessageBox.Show("Error: " + e.ToString() + "\nPrimay key is of type int and shouldn't be null!", "", MessageBoxButtons.OK, MessageBoxIcon.Error); }
private void dgvJogcimek_DataError(object sender, DataGridViewDataErrorEventArgs e) { TraceBejegyzes(e.ToString()); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DGV_MainPlugins_DataError(object sender, DataGridViewDataErrorEventArgs e) { LogConsole.Main.LogConsole.pushMsg(String.Format("Error occurred ({0}) : {1}", sender.ToString(), e.ToString())); }
static void dataSourcesGrid_DataError(object sender, DataGridViewDataErrorEventArgs e) { MessageBox.Show(e.ToString(), Resources.Error_on_datasource, MessageBoxButtons.OK, MessageBoxIcon.Error); }
private void dgDefinitions_DataError(object sender, DataGridViewDataErrorEventArgs e) { log.Debug(e.ToString()); e.Cancel = true; }
private void DGV_DataError(object sender, DataGridViewDataErrorEventArgs e) { mf.Tls.WriteErrorLog("frmRelays/DGV_DataError: " + e.ToString()); }
private void WndGrid_DataError(object sender, DataGridViewDataErrorEventArgs e) { System.Diagnostics.Debug.WriteLine(e.ToString()); }
private void GridOrder_DataError(object sender, DataGridViewDataErrorEventArgs e) { MessageBox.Show("Coś nie tak: " + e.ToString()); }
private void dataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e) { WriteLog.WriteLogs(e.ToString()); }
private void tdataGridView_devices_DataError(object sender, DataGridViewDataErrorEventArgs e) { Console.WriteLine(e.ToString()); }
private void dgvSeriesArticles_DataError(object sender, DataGridViewDataErrorEventArgs e) { Debug.WriteLine(e.ToString()); }
private void dgvNyugdijpenzt_DataError(object sender, DataGridViewDataErrorEventArgs e) { TraceBejegyzes(e.ToString()); }
void dataSourcesGrid_DataError(object sender, DataGridViewDataErrorEventArgs e) { e.ToString(); }
private void dataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e) { MessageBox.Show(e.ToString()); }
private void dgwBankszla_DataError(object sender, DataGridViewDataErrorEventArgs e) { TraceBejegyzes(e.ToString()); }
private void DataGridViewDataErrorEventHandler(object sender, DataGridViewDataErrorEventArgs args) { LogToConsole($"DataGridView error occured. {args.ToString()}", ConsoleTextColor.Error); }