Пример #1
0
        public AdminInfo(string selectedItem, string loginUserName)
        {
            this.selectedItem  = selectedItem;
            this.loginUserName = loginUserName;
            InitializeComponent();
            button1.BackColor = Color.LightSeaGreen;
            button2.BackColor = Color.LightSeaGreen;
            button3.BackColor = Color.LightSeaGreen;
            button4.BackColor = Color.LightSeaGreen;
            List <string> adminInfo = blc.GetAdminInfo(selectedItem);

            label27.Text = adminInfo[0];
            label26.Text = adminInfo[1];
            label25.Text = adminInfo[2];
            label20.Text = adminInfo[3];
            label21.Text = adminInfo[4];
            label24.Text = adminInfo[5];
            label23.Text = adminInfo[6];
            label22.Text = adminInfo[7];

            if (selectedItem == "admin123")
            {
                button1.Visible = false;
                button2.Visible = false;
            }
        }
Пример #2
0
        public EditAdmin(string selectedItem, string loginUserName)
        {
            this.selectedItem  = selectedItem;
            this.loginUserName = loginUserName;
            InitializeComponent();
            button1.BackColor = Color.LightSeaGreen;
            button2.BackColor = Color.LightSeaGreen;
            List <string> adminInfo = blc.GetAdminInfo(selectedItem);

            textBox1.Text = adminInfo[0];
            textBox2.Text = adminInfo[1];
            textBox3.Text = adminInfo[2];
            textBox8.Text = adminInfo[3];
            textBox4.Text = adminInfo[4];
            textBox5.Text = adminInfo[5];
            textBox7.Text = adminInfo[6];
            textBox6.Text = adminInfo[7];
        }