示例#1
0
        private void btnClients_Click(object sender, EventArgs e)
        {
            UC_Mechanic mechanic = new UC_Mechanic();

            this.Controls.Clear();
            this.Controls.Add(mechanic);
        }
        private void CallPanel(int number)
        {
            switch (number)
            {
            case 1: UC_Staff s1 = new UC_Staff();
                this.Controls.Clear();
                this.Controls.Add(s1);
                break;

            case 2: UC_Mechanic m1 = new UC_Mechanic();
                this.Controls.Clear();
                this.Controls.Add(m1);
                break;
            }
        }