Exemple #1
0
        private void btnCheckStatus_ItemClick(object sender, ItemClickEventArgs e)
        {
            Form frm = this.CheckExists(typeof(FormCheckPhong));

            if (frm != null)
            {
                frm.Activate();
            }
            else
            {
                FormCheckPhong f = new FormCheckPhong();
                f.MdiParent = this;
                f.Show();
            }
        }
Exemple #2
0
 public FormMain()
 {
     InitializeComponent();
     fm = this;
     if (DataUtil.bophan.Equals("ADMIN"))
     {
         ribbonPage4.Visible = ribbonPageGroup14.Visible = false;
     }
     else if (DataUtil.bophan.Equals("LETAN"))
     {
         ribbonPageGroup6.Visible = ribbonPage3.Visible = rbBuong.Visible = ribbonPageGroup17.Visible = false;
         Form frm = this.CheckExists(typeof(FormSoDoPhong));
         if (frm != null)
         {
             frm.Activate();
         }
         else
         {
             FormSoDoPhong f = new FormSoDoPhong();
             f.MdiParent = this;
             f.Show();
         }
     }
     else if (DataUtil.bophan.Equals("BUONG"))
     {
         ribbonPageGroup6.Visible = ribbonPage3.Visible = rbLeTan.Visible = ribbonPage5.Visible = ribbonPageGroup17.Visible = false;
         Form frm = this.CheckExists(typeof(FormCheckPhong));
         if (frm != null)
         {
             frm.Activate();
         }
         else
         {
             FormCheckPhong f = new FormCheckPhong();
             f.MdiParent = this;
             f.Show();
         }
     }
 }