protected void BtnChooseID_Click(object sender, EventArgs e) { Staff manager = (Staff)Session["LoginStaff"]; string deptID = manager.Dept_ID; if (UCDC.GetStaffNameByStaffID(TBStaffID.Text, deptID) == null) { LBStaffName.Text = "No such staff in this department!"; LBStaffName.ForeColor = System.Drawing.Color.Red; } else { Staff stf = (Staff)UCDC.GetStaffNameByStaffID(TBStaffID.Text, deptID); if (stf.Role_ID == "Manager" || stf.Role_ID == "AuthStaff") { LBStaffName.Text = " AuthStaff/Manager Can not be RepStaff!"; LBStaffName.ForeColor = System.Drawing.Color.Red; } else { LBStaffName.Text = UCDC.GetStaffNameByStaffID(TBStaffID.Text, deptID).Staff_Name; } } }