Click here to Skip to main content
15,895,462 members

Comments by TonyJPerez (Top 2 by date)

TonyJPerez 29-Jun-11 7:10am View    
Here is the query I'm using:
Protected Sub allbymgr_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles allbymgr.Click

Dim dC As New APDDataClassesDataContext()
Dim MG = From p In dC.ALLs_employees _
Where p.SUPERVISOR_NAME = lblfname.Text And _
p.EMPLOYMENT_STATUS = "A" _
Order By p.FULL_NAME _
Select p.FULL_NAME, p.LOCATION_NAME, p.EMPLOYMENT_STATUS, _
p.SUPERVISOR_NAME

GridView3.DataSource = MG
GridView3.DataBind()
TonyJPerez 28-Jun-11 22:50pm View    
.I am not using a stored procedure. I will post my query tomorrow from work, but basically I call the team leaders by filtering the manager's name as his name appears as supervisor on the team leaders records. I have updated my original post to correct the fields I need. I actually need the full_name field from my gridview as that name will be the supervisor_name on the agents records. So the where clause would be; where supervisor_name = full_name name from the gridview output, the table is the same table. I can output to a new gridview or dropdown box or a combobox as that output will be used to lookup info on another table regarding the employee.

thanks for your reply.