Beispiel #1
0
        //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异常");
     }
 }
Beispiel #3
0
 /// <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());
 }
Beispiel #4
0
        // 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());
 }
Beispiel #6
0
 /// <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()));
 }
Beispiel #7
0
 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;
 }
Beispiel #9
0
 private void DGV_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     mf.Tls.WriteErrorLog("frmRelays/DGV_DataError: " + e.ToString());
 }
Beispiel #10
0
 private void WndGrid_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine(e.ToString());
 }
Beispiel #11
0
 private void GridOrder_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     MessageBox.Show("Coś nie tak: " + e.ToString());
 }
Beispiel #12
0
 private void dataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     WriteLog.WriteLogs(e.ToString());
 }
Beispiel #13
0
 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());
 }
Beispiel #15
0
 private void dgvNyugdijpenzt_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     TraceBejegyzes(e.ToString());
 }
Beispiel #16
0
 void dataSourcesGrid_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     e.ToString();
 }
Beispiel #17
0
 private void dataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     MessageBox.Show(e.ToString());
 }
Beispiel #18
0
 private void dgwBankszla_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     TraceBejegyzes(e.ToString());
 }
Beispiel #19
0
 private void DataGridViewDataErrorEventHandler(object sender, DataGridViewDataErrorEventArgs args)
 {
     LogToConsole($"DataGridView error occured. {args.ToString()}", ConsoleTextColor.Error);
 }