示例#1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            AddEditCustomer aec = new AddEditCustomer();

            if (aec.ShowDialog() == DialogResult.OK)
            {
                FillLvCustomer();
            }
        }
示例#2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (lvCustomer.SelectedItems.Count < 1)
            {
                MessageBox.Show("No Customer selected!");
                return;
            }
            var             id       = lvCustomer.SelectedItems[0].Tag;
            var             customer = DB.GetCtx().Customer.Find(id);
            AddEditCustomer aec      = new AddEditCustomer(customer);

            if (aec.ShowDialog() == DialogResult.OK)
            {
                FillLvCustomer();
            }
        }
示例#3
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            AddEditCustomer aed = new AddEditCustomer(customer);

            aed.ShowDialog();
        }