Пример #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmCustomerAdd frm = new frmCustomerAdd();

            General._customerAdd          = 0;
            frm.btnUpdateCustomer.Visible = false;
            frm.btnAddNewCustomer.Visible = true;
            this.Close();
            frm.Show();
        }
Пример #2
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (lvCustomers.Items.Count > 0)
     {
         frmCustomerAdd frm = new frmCustomerAdd();
         General._customerAdd          = 0;
         General._customerId           = Convert.ToInt32(lvCustomers.SelectedItems[0].SubItems[0].Text);
         frm.btnUpdateCustomer.Visible = true;
         frm.btnAddNewCustomer.Visible = false;
         this.Close();
         frm.Show();
     }
 }