Esempio n. 1
0
        private void btn_add_Click(object sender, EventArgs e)
        {
            FormCustomerEdit f = new FormCustomerEdit();

            f.opetrationType = OperationType.Add;
            if (f.ShowDialog() == DialogResult.OK)
            {
                QueryData();
                new PubUtils().ShowNoteOKMsg("新增成功");
            }
        }
Esempio n. 2
0
        private void btn_edit_Click(object sender, EventArgs e)
        {
            if (dgvCustomer.CurrentRow == null || dgvCustomer.CurrentRow.Index == -1)
            {
                new PubUtils().ShowNoteNGMsg("请选中行", 2, grade.OrdinaryError);
                return;
            }
            FormCustomerEdit f = new FormCustomerEdit();

            f.opetrationType = OperationType.Edit;
            f.obj            = Common.Helper.PublicSetModel <SysdatMPNCustomer> .GetTByDataGridViewRow(dgvCustomer.CurrentRow);

            if (f.ShowDialog() == DialogResult.OK)
            {
                QueryData();
                new PubUtils().ShowNoteOKMsg("编辑成功");
            }
        }