Beispiel #1
0
        public void MainGUI_Load(object sender, EventArgs e)
        {
            HSB.TLSL();
            HSB.Loadkl();
            HSB.AVG();

            List <string> l = new List <string>();

            foreach (var s in clasDTO.lop)
            {
                l.Add(s.TenL1);
            }
            dslopcbox.DataSource = l.ToList();

            if (UsserrDTO.u.Per != 0)
            {
                button14.Visible = true;
            }

            if (UsserrDTO.u.Per == 0)
            {
                pictureBox3.Visible = false;

                button1.Visible = false;
                button2.Visible = false;
                button3.Visible = false;
                button4.Visible = false;
                button5.Visible = false;
                button6.Visible = false;
                button7.Visible = false;
                button9.Visible = true;
                showinpanel(new DSclass());
            }
            else
            {
                if (UsserrDTO.u.Per == 1)
                {
                    pictureBox3.Visible = false;

                    button1.Visible  = false;
                    button2.Visible  = false;
                    button3.Visible  = false;
                    button4.Visible  = false;
                    button5.Visible  = false;
                    button6.Visible  = false;
                    button7.Visible  = false;
                    button8.Visible  = false;
                    button9.Visible  = false;
                    button10.Visible = true;
                }
                else
                {
                    if (UsserrDTO.u.Per == 2)
                    {
                        button1.Visible  = false;
                        button2.Visible  = false;
                        button3.Visible  = false;
                        button4.Visible  = false;
                        button5.Visible  = false;
                        button6.Visible  = false;
                        button7.Visible  = false;
                        button8.Visible  = false;
                        button9.Visible  = true;
                        button11.Visible = true;
                        button12.Visible = true;
                        button13.Visible = true;
                    }
                }
            }
        }