private void tsbLoad_Click(object sender, EventArgs e)
        {
            if (dgList.SelectedRows.Count == 0)
            {
                return;
            }
            id1 = Convert.ToInt32(dgList.SelectedRows[0].Cells["id"].Value);

            frmAllocation frmAloc = DashBoard._allocation;

            foreach (var form in Application.OpenForms)
            {
                if (((Form)form).GetType().Name == "frmAllocation")
                {
                    frmAloc.Close();
                    break;
                }
            }
            if (frmAloc == null || frmAloc.IsDisposed == true)
            {
                frmAloc    = new frmAllocation();
                frmAloc.id = id1;
                frmAloc.Show();
            }
            frmAloc.BringToFront();

            //this.Close();
        }
 private void allocationToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (_allocation == null || _allocation.IsDisposed == true)
     {
         _allocation = new frmAllocation();
         _allocation.Show();
     }
     _allocation.BringToFront();
 }
Ejemplo n.º 3
0
 private void LnkLbAllocation_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (_allocation == null || _allocation.IsDisposed == true)
     {
         _allocation = new frmAllocation();
         _allocation.Show();
     }
     _allocation.BringToFront();
 }