コード例 #1
0
        //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;
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        //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;
                }
            }
        }
コード例 #4
0
        private void btnAddCos_Click(object sender, EventArgs e)
        {
            FrmCustomers fc = new FrmCustomers(StatusKind.add);

            fc.Show();
        }