//新增 private void Add(object sender, EventArgs e) { FmEquipmentMP frm = new FmEquipmentMP(null); if (frm.ShowDialog() == DialogResult.OK) { this.RefreshList(); } }
//编辑 private void Edit(object sender, EventArgs e) { if (dtMain == null || dtMain.Rows.Count < 1) { throw new Exception("当前表体没有记录!"); } int autoId = Convert.ToInt32(gridView1.GetFocusedRowCellValue("AutoId")); FmEquipmentMP frm = new FmEquipmentMP(autoId); if (frm.ShowDialog() == DialogResult.OK) { this.RefreshList(); } }