示例#1
0
        private void frm_main_Load(object sender, EventArgs e)
        {
            try {
                skins();
                //lb_manv.Text = Tendn;
                List <QLPHANQUYEN> manhinh = new List <QLPHANQUYEN>();
                QLND_NHOMND        nhom    = new QLND_NHOMND();
                nhom    = pq.laymanhom(Tendn);
                manhinh = pq.laydsmanhinh(nhom.MANHOM);

                for (int i = 0; i < manhinh.Count(); i++)
                {
                    if (manhinh[i].MAMANHINH == "MH001")
                    {
                    }
                    else if (manhinh[i].MAMANHINH == "MH002")
                    {
                        btn_nhanvien.Enabled = btn_phanquyen.Enabled = false;
                    }
                    else
                    {
                        ribbonPageGroup1.Visible = ribbonPageGroup7.Visible = ribbonPageGroup8.Visible
                                                                                  = ribbonPageGroup9.Visible = ribbonPageGroup10.Visible = ribbonPageGroup3.Visible =
                                                                                        ribbonPageGroup4.Visible = ribbonPageGroup5.Visible = false;
                    }
                }
            }
            catch
            {
                ribbonPageGroup1.Visible = ribbonPageGroup7.Visible = ribbonPageGroup8.Visible
                                                                          = ribbonPageGroup9.Visible = ribbonPageGroup10.Visible = ribbonPageGroup3.Visible =
                                                                                ribbonPageGroup4.Visible = ribbonPageGroup5.Visible = false;
            }
        }