Exemple #1
0
        private void toolStripButtonEdit_Click(object sender, EventArgs e)
        {
            if (enforceLawGridViewPowerInventory.SelectedRows.Count == 0)
                return;

            if (enforceLawGridViewPowerInventory.SelectedRows[0].Tag == null)
                return;

            UseWaitCursor = true;
            Application.DoEvents();

            try
            {
                PowerInventory Power = enforceLawGridViewPowerInventory.SelectedRows[0].Tag as PowerInventory;
                frmPower frm = new frmPower(Power);
                frm.OpenWindow(this);
            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }
Exemple #2
0
        private void toolStripButtonAdd_Click(object sender, EventArgs e)
        {
            UseWaitCursor = true;
            Application.DoEvents();

            try
            {
                frmPower frm = new frmPower();
                frm.OpenWindow(this);
            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }