Esempio n. 1
0
        private void btn_Customer_Edit_Click(object sender, EventArgs e)
        {
            if (this.CustomerInfoListView.SelectedRows.Count <= 0)
            {
                MessageBox.Show("请选择要编辑的人员信息");
            }

            EditCustomerForm editcutomerform = new EditCustomerForm(this.CustomerInfoListView.SelectedRows[0].Cells[0].Value.ToString());

            if (editcutomerform.ShowDialog() == DialogResult.OK)
            {
            }
        }
Esempio n. 2
0
        private void ShowEditForm(int?customerID)
        {
            var form = new EditCustomerForm(customerID);

            form.FormClosed += EditFormClosed;
            var documentManager = DocumentManager.FromControl(MdiParent);

            if (documentManager != null)
            {
                documentManager.View.AddDocument(form);
            }
            else
            {
                try {
                    form.ShowDialog();
                } finally {
                    form.Dispose();
                }
            }
        }