Ejemplo n.º 1
0
        private void btnAddRemoveProduct_Click(object sender, EventArgs e)
        {
            pkgId = selected.PackageId;
            frmAddProductToPackage viewProductsForPackage = new frmAddProductToPackage();

            viewProductsForPackage.selected = PackageDB.GetPackageById(pkgId);
            DialogResult result = viewProductsForPackage.ShowDialog();
        }
Ejemplo n.º 2
0
        private void btnView_Click(object sender, EventArgs e)
        {
            try
            {
                int row, packageID;
                row       = packageDataGridView.CurrentRow.Index;
                packageID = (int)packageDataGridView.Rows[row].Cells["dataGridViewTextBoxColumn1"].Value;

                frmViewSelPackage viewSelected = new frmViewSelPackage();   // set selected package on frmViewSelPackage
                viewSelected.selected = PackageDB.GetPackageById(packageID);
                DialogResult result = viewSelected.ShowDialog();

                DisplayPackages();
                //RefreshOrderDisplay();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error while retrieving package with selected Id: " + ex.Message,
                                ex.GetType().ToString());
            }
        }