Example #1
0
        private void btCreate_Click(object sender, EventArgs e)
        {
            EnglishSentencesForm ESF = new EnglishSentencesForm(null, true);

            ESF.FormClosed += new FormClosedEventHandler(CRUD_FormClosed);
            ESF.ShowDialog();
        }
Example #2
0
        private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var form = dataGridView1.Rows[e.RowIndex].DataBoundItem as EnglishSentences;

            if (form == null)
            {
                MessageBox.Show("Error happend,please try again!");
            }
            else
            {
                EnglishSentencesForm ESF = new EnglishSentencesForm(form);
                ESF.FormClosed += new FormClosedEventHandler(CRUD_FormClosed);
                ESF.ShowDialog();
            }
        }