Exemplo n.º 1
0
        private void btnModify_Click(object sender, EventArgs e)
        {
            var    cells           = dataGridView1.CurrentRow.Cells;
            string rowId           = cells[0].Value.ToString();
            var    selectedPackage = PackagesDB.GetPackage(rowId);

            addModifyForm modifyPackageForm = new addModifyForm();

            modifyPackageForm.addPackage = false;
            modifyPackageForm.modifyPack = selectedPackage;
            DialogResult result = modifyPackageForm.ShowDialog();

            if (result == DialogResult.OK)
            {
                dataGridView1.DataSource = PackagesDB.GetPackages();
            }
        }
Exemplo n.º 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //panelProductSuppliers.Hide();20190604--
            this.panel14.BringToFront();
            // Move panel13 and panel25 to panel14's position
            panel13.Top  = panel14.Top; // Product panel
            panel13.Left = panel14.Left;
            panel25.Top  = panel14.Top; //20190604 Product Suppliers panel
            panel25.Left = panel14.Left;
            //this.panel14.BringToFront();
            //this.panel13.BringToFront();
            //--20190604

            //dataGridView1.DataSource = DataLayer.PackagesDB.GetPackages();
            pkges = packageManager.GetPackage();
            comboBox1.DataSource    = pkges;
            comboBox1.DisplayMember = "PkgName";
            comboBox1.ValueMember   = "PkgName";
        }