//add customer
        private void button2_Click(object sender, EventArgs e)
        {
            FrmCustomers addCust = new FrmCustomers();

            addCust.FormClosed += new FormClosedEventHandler(addCust_FormClosed);
            addCust.Show();
            this.Enabled = false;
        }
        private void btnOpenCust_Click(object sender, EventArgs e)
        {
            CustomersTable c    = new CustomersTable();
            DataRow        dr   = c.Find("IDCust", txtBId.Text);
            Customers      cust = new Customers(dr);
            FrmCustomers   f    = new FrmCustomers(cust, statusKind);

            f.Show();
        }
        //event of FrmCustomers closing
        void addCust_FormClosed(object sender, FormClosedEventArgs e)
        {
            FrmCustomers form = sender as FrmCustomers;

            if (form != null)
            {
                if (form.ClosingOption == 1 || form.ClosingOption == 3)
                {
                    this.Close();
                }
                else
                {
                    this.Enabled = true;
                }
            }
        }
Ejemplo n.º 4
0
        private void btnAddCos_Click(object sender, EventArgs e)
        {
            FrmCustomers fc = new FrmCustomers(StatusKind.add);

            fc.Show();
        }