以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助] (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=67947) |
-- 作者:yupeng -- 发布时间:2015/5/7 8:43:00 -- [求助] 求助大侠 下面的代码在SQL里哪些要改 谢谢 \'--------以下是定义部门栏----------------------- Dim fll As WinForm.TopicBar = Forms("主窗体").Controls("分类栏") Dim bm As WinForm.TopicPage = fll.Pages("部门") bm.Links.Clear For Each bmmc As String In DataTables("词典").GetComboListString("名称","类别 = \'部门\'","_identify").Split("|") Dim kg As String = new String(" ",24 - bmmc.Length*2) \'定义前面的对齐空格 Dim rs As String = DataTables("员工资料").Compute("count(_identify)","部门 = \'" & bmmc & "\'") \'定义统计的数量 Dim kg2 As String = new String(" ",3-rs.Length) bm.Links.Add(bmmc,bmmc & kg & "(" & kg2 & rs & "人)") Next \'-------以上是定义部门栏------------------------- \'--------以下是定义用工性质栏----------------------- Dim yg As WinForm.TopicPage = fll.Pages("用工性质") yg.Links.Clear For Each ygxz As String In DataTables("词典").GetComboListString("名称","类别 = \'用工性质\'","_identify").Split("|") Dim kg As String = new String(" ",24 - ygxz.Length*2) \'定义前面的对齐空格 Dim rs As String = DataTables("员工资料").Compute("count(_identify)","用工性质 = \'" & ygxz & "\'") \'定义统计的数量 只能用string 不能用 Integer,因为整数型不能统计长度 Dim kg2 As String = new String(" ",3- rs.Length) \'定义人数括号数字间的空格 yg.Links.Add(ygxz,ygxz & kg & "(" & kg2 & rs & "人)") \'合成标题 Next \'-------以上是定义用工性质栏------------------------- Dim ks As WinForm.TopicPage = fll.Pages("科室") ks.Links.Clear For Each ksks As String In DataTables("词典").GetComboListString("名称","类别 = \'科室\'","_identify").Split("|") Dim kg As String = new String(" ",24 - ksks.Length*2) \'定义前面的对齐空格 Dim rs As String = DataTables("员工资料").Compute("count(_identify)","科室 = \'" & ksks & "\'") \'定义统计的数量 Dim kg2 As String = new String(" ",3-rs.Length) ks.Links.Add(ksks,ksks & kg & "(" & kg2 & rs & "人)") Next \'-------以上是定义工种------------------------- Dim xb As WinForm.TopicPage = fll.Pages("性别") xb.Links.Clear For Each xbxb As String In DataTables("词典").GetComboListString("名称","类别 = \'性别\'","_identify").Split("|") Dim kg As String = new String(" ",24 - xbxb.Length*2) \'定义前面的对齐空格 Dim rs As String = DataTables("员工资料").Compute("count(_identify)","性别 = \'" & xbxb & "\'") \'定义统计的数量 Dim kg2 As String = new String(" ",3-rs.Length) xb.Links.Add(xbxb,xbxb & kg & "(" & kg2 & rs & "人)") Next \'-------以上是定义工种-------------------------
|
-- 作者:Bin -- 发布时间:2015/5/7 8:45:00 -- 出现什么问题? 抱什么错.具体信息是什么? 你要实现什么? 最好上个例子 |
-- 作者:大红袍 -- 发布时间:2015/5/7 9:03:00 -- http://www.foxtable.com/help/topics/1485.htm
|