Пример #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            // open new empty add package form
            frmAddEditPackage secondForm = new frmAddEditPackage();

            secondForm.isAdd = true;
            DialogResult result = secondForm.ShowDialog();

            if (result == DialogResult.OK)
            {
                RefreshDisplay();
            }
        }
Пример #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            // open new empty add package form with modify option
            frmAddEditPackage secondForm = new frmAddEditPackage();

            secondForm.isAdd     = false;
            secondForm.packageID = Convert.ToInt32(txtPackageID.Text); // send prod ID to second form
            DialogResult result = secondForm.ShowDialog();

            if (result == DialogResult.OK)
            {
                RefreshDisplay();
            }
        }