public frmOpenVendorOrders(AccessToken acctkn)
        {
            InitializeComponent();
            var RoleAccess = new RoleAccess(acctkn, this);

            _myAccessToken = acctkn;
            Instance       = this;

            // Add a CellClick handler to handle clicks in the button column.
            dgvOpenVendorOrders.CellClick += new DataGridViewCellEventHandler(dgv_CellClick);
        }
Exemple #2
0
        private void viewOrderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmOpenVendorOrders frmOpenVendorOrders;

            if (frmOpenVendorOrders.Instance == null)
            {
                frmOpenVendorOrders               = new frmOpenVendorOrders(_myAccessToken);
                frmOpenVendorOrders.MdiParent     = this;
                frmOpenVendorOrders.StartPosition = FormStartPosition.CenterScreen;
                frmOpenVendorOrders.Show();
            }
            else
            {
                frmOpenVendorOrders.Instance.WindowState = FormWindowState.Normal;
                frmOpenVendorOrders.Instance.Show();
                frmOpenVendorOrders.Instance.BringToFront();
            }
        }
 private void frmOpenVendorOrders_FormClosed(object sender, FormClosedEventArgs e)
 {
     Instance = null;
 }