想要从gridview输出中输出列表 [英] Want to output list from a gridview output

查看:67
本文介绍了想要从gridview输出中输出列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含所有员工数据的表,它是一个平面sql表.它包含管理经理的总经理,管理团队负责人的经理和代理人的经理.我在gridview上有一个输出,其中列出了GM下的所有座席,这很好,但是我需要做的是限制经理仅查看其所属组下的座席.他的团队通常由5名团队负责人组成,每人管理约8位特工.
目前,我可以在网格视图上输出其团队的团队负责人,我需要的字段称为Full_name.我不能做的是创建一个循环,该循环可以在gridview full_name上循环,因为该名称是座席记录上的supervisor_name,而该字段将把座席拉到经理下的团队负责人下. /> 我正在使用linq创建填充gridview的查询.
非常感谢您的帮助.

I have a table that contains all employee data, it is a flat sql table. It contains General managers who manage managers, and managers who manage team leaders, who manage agents. I have an output on gridview which lists all agents under the GM, that is fine but what I need to do is limit the managers to view only the agents that are under his group. His group is usually composed of 5 team leaders who manage around 8 agents each.
I currently can output the the team leaders from their group on a gridview, the field I need is called Full_name. What I can''t do is create a loop that can loop on the gridview full_name as that name is the supervisor_name on the agents record and it''s that field that will pull the agents under the team leaders under the managers.
I am using linq to create the query that fills the gridview.
Your help is greatly appreciated.

推荐答案

希望您正在使用存储过程来检索结果,如果没有,应该这样做.在这种情况下,请添加一个where子句以由管理器进行过滤.
Hopefully you are using a stored procedure to retrieve the results, if not, you should be. In which case add a where clause to filter by the manager.


我没有使用存储过程.我将在明天下班后发布查询,但是基本上,我通过过滤经理的姓名来呼叫团队负责人,因为他的名字在团队负责人记录中显示为主管.我已经更新了我的原始帖子,以更正我需要的字段.我实际上需要我的gridview中的full_name字段,因为该名称将是座席记录上的supervisor_name.因此where子句将是;其中gridview输出中的supervisor_name = full_name名称,该表是同一张表.我可以输出到新的gridview或下拉框或组合框,因为该输出将用于在另一个表上查找有关雇员的信息.

感谢您的答复.
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.


这篇关于想要从gridview输出中输出列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆