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