예제 #1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     using (frmDeviceAdd add = new frmDeviceAdd(frmDeviceAdd.FormMode.Add))
     {
         DialogResult result = add.ShowDialog();
         if (result == DialogResult.OK)
         {
             bind_Devices();
         }
     }
 }
예제 #2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     using (frmDeviceAdd edit = new frmDeviceAdd(frmDeviceAdd.FormMode.Edit))
     {
         edit.DeviceId = Convert.ToInt32(dataGridView1.CurrentRow.Cells["id"].Value.ToString());
         DialogResult result = edit.ShowDialog();
         if (result == DialogResult.OK)
         {
             bind_Devices();
         }
     }
 }