private void Insert_Click(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; frmQuestionX frm = new frmQuestionX(strLanguage, strConnectionString, 0); frm.ShowDialog(); if (frm.isTableChanged) { this.Filter(); } this.Cursor = Cursors.Default; } catch (Exception ex) { this.Cursor = Cursors.Default; MessageBox.Show(ex.Message, "Ուշադրություն", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void Update_Click(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; int intQuestionXiD = ((vQuestionX)(this.vQuestionXBindingSource.Current)).QuestionX_ID; frmQuestionX frm = new frmQuestionX(strLanguage, strConnectionString, intQuestionXiD); frm.ShowDialog(); if (frm.isTableChanged) { this.Filter(); } this.Cursor = Cursors.Default; } catch (Exception ex) { this.Cursor = Cursors.Default; MessageBox.Show(ex.Message, "Ուշադրություն", MessageBoxButtons.OK, MessageBoxIcon.Error); } }