Example #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmEditScoreRule form = new frmEditScoreRule();

            form.FormClosed += delegate
            {
                if (form.DialogResult == DialogResult.Yes)
                {
                    ReloadDataGridView();
                }
            };
            form.ShowDialog();
        }
Example #2
0
 private void dataGridViewX1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > -1)
     {
         frmEditScoreRule form = new frmEditScoreRule(FormMode.Update);
         form.Text = "修改分數準則";
         form.setData((UDT.ScoreRule)dataGridViewX1.Rows[e.RowIndex].Tag);
         form.FormClosed += delegate
         {
             if (form.DialogResult == DialogResult.Yes)
             {
                 ReloadDataGridView();
             }
         };
         form.ShowDialog();
     }
 }