private void btn_add_Click(object sender, EventArgs e) { FormSuppliesEdit f = new FormSuppliesEdit(); f.opetrationType = Common.Enum.OperationType.Add; if (f.ShowDialog() == DialogResult.OK) { QueryData(); new PubUtils().ShowNoteOKMsg("新增成功"); } }
private void btn_edit_Click(object sender, EventArgs e) { if (dgvSupplies.CurrentRow == null || dgvSupplies.CurrentRow.Index == -1) { new PubUtils().ShowNoteNGMsg("请选中行", 2, grade.OrdinaryError); return; } FormSuppliesEdit f = new FormSuppliesEdit(); f.opetrationType = Common.Enum.OperationType.Edit; f.obj = Common.Helper.PublicSetModel <MdcDatSuppliesManage> .GetTByDataGridViewRow(dgvSupplies.CurrentRow); if (f.ShowDialog() == DialogResult.OK) { QueryData(); new PubUtils().ShowNoteOKMsg("编辑成功"); } }