private void btnFJQAdd_Click(object sender, EventArgs e) { frmDeviceEdit frm = new frmDeviceEdit(); frm.Devicetypeid = DeviceType.DeviceType_FJQ; frm.Owner = this; frm.opType = "add"; frm.ShowDialog(); if (frm.IsOK) { BindFJQ(); } }
private void btnFJQAlter_Click(object sender, EventArgs e) { if (gvFJQ.SelectedRows.Count == 0) { ShowMsg("请选择设备!"); return; } DataGridViewRow gvr = gvFJQ.SelectedRows[0]; frmDeviceEdit frm = new frmDeviceEdit(); frm.Devicetypeid = DeviceType.DeviceType_FJQ; frm.Owner = this; frm.DeviceID = gvr.Cells[0].Value.ToString(); frm.ShowDialog(); if (frm.IsOK) { BindFJQ(); } }