private void btnInsertInputPoint_Click(object sender, EventArgs e) // quay trở lại user control insert point { Panel pnlManage = this.Parent as Panel; if (pnlManage != null) { UserControlStudent studentControl = new UserControlStudent(); // tạo usercontrol pnlManage.Controls.Clear(); pnlManage.Controls.Add(studentControl); studentControl.Dock = DockStyle.Fill; } }
private void btnStudent_Click(object sender, EventArgs e) // khi nhấn nút học viên load usercontrol Student ra quản lý { btnRegister.BackColor = SystemColors.ControlLightLight; btnStudent.BackColor = SystemColors.ControlLight; btnClass.BackColor = SystemColors.ControlLightLight; btnProcess.BackColor = SystemColors.ControlLightLight; btnExam.BackColor = SystemColors.ControlLightLight; btnSettings.BackColor = SystemColors.ControlLightLight; UserControlStudent studentControl = new UserControlStudent(); // tạo usercontrol pnlManage.Controls.Clear(); pnlManage.Controls.Add(studentControl); studentControl.Dock = DockStyle.Fill; }