Esempio n. 1
0
        private void btnChoose_Click(object sender, EventArgs e)
        {
            frmProduct owner = (frmProduct)this.Owner;

            owner.SetCategoryID(txtCatID.Text);
            this.Close();
        }
Esempio n. 2
0
        private void Products_Click(object sender, EventArgs e)
        {
            foreach (Form curForm in Application.OpenForms)
            {
                if (curForm.GetType() == typeof(frmProduct))
                {
                    curForm.Activate();
                    return;
                }
            }
            frmProduct frm = new frmProduct();

            frm.MdiParent = this;
            frm.Dock      = DockStyle.Fill;
            frm.Show();
        }
Esempio n. 3
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (isValidData())
     {
         frmProduct owner = (frmProduct)this.Owner;
         if (isNew)
         {
             AddNewOrderDetail();
             owner.LoadDataFromDatabase();
         }
         else
         {
             UpdateOrderDetail();
             owner.LoadDataFromDatabase();
         }
     }
 }