Пример #1
0
        private void btnNewOrd_Click(object sender, EventArgs e)
        {
            FrmSetOrdEdit edit = new FrmSetOrdEdit(0);

            if (edit.ShowDialog() == DialogResult.OK)
            {
                frmSetInfo_Load(null, null);
                dataGridView1_CellClick(null, null);
            }
        }
Пример #2
0
 private void btnEditOrd_Click(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedRows.Count == 0)
     {
         MessageBox.Show(@"请选择要修改的记录");
         return;
     }
     if (dataGridView1.CurrentRow != null)
     {
         int           id   = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value.ToString().Trim());
         FrmSetOrdEdit edit = new FrmSetOrdEdit(id);
         if (edit.ShowDialog() == DialogResult.OK)
         {
             frmSetInfo_Load(null, null);
             dataGridView1_CellClick(null, null);
         }
     }
 }