Esempio n. 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            switch (CurrentPoco)
            {
            case CurrentPoco.Shipper:
                frmShipper fs = new frmShipper();
                fs.ShowDialog();
                break;

            case CurrentPoco.Category:
                frmCategory fc = new frmCategory();
                fc.ShowDialog();
                break;

            default:
                break;
            }
        }
Esempio n. 2
0
        private void dgvMain_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                switch (CurrentPoco)
                {
                case CurrentPoco.Shipper:
                    frmShipper fs = new frmShipper(dgvMain.Rows[e.RowIndex].DataBoundItem as Shipper);
                    fs.ShowDialog();
                    break;

                case CurrentPoco.Category:
                    frmCategory fc = new frmCategory((Category)dgvMain.Rows[e.RowIndex].DataBoundItem);
                    fc.ShowDialog();
                    break;

                default:
                    break;
                }
            }
        }