资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:9k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Begin VB.Form Qr_RsArCndFrm
- BorderStyle = 3 'Fixed Dialog
- Caption = "相关档案查询条件"
- ClientHeight = 2760
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 4590
- Icon = "查询_相关档案查询条件.frx":0000
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2760
- ScaleWidth = 4590
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin VB.CheckBox Chk_Unload
- Caption = "Check1"
- Height = 240
- Left = 3510
- TabIndex = 9
- Top = 2250
- Visible = 0 'False
- Width = 195
- End
- Begin VB.Frame Frame1
- Height = 1950
- Left = 180
- TabIndex = 2
- Top = 180
- Width = 4200
- Begin VB.TextBox Txt_LrText
- Height = 285
- Index = 1
- Left = 1485
- TabIndex = 10
- Top = 765
- Width = 1410
- End
- Begin VB.CommandButton Ydcommand1
- Height = 300
- Index = 0
- Left = 2565
- Picture = "查询_相关档案查询条件.frx":1042
- Style = 1 'Graphical
- TabIndex = 8
- Top = 315
- Width = 300
- End
- Begin VB.TextBox Txt_LrText
- Height = 285
- Index = 0
- Left = 1485
- TabIndex = 4
- Top = 315
- Width = 1095
- End
- Begin VB.ComboBox Cbo_ArSort
- Height = 300
- Left = 1485
- Style = 2 'Dropdown List
- TabIndex = 3
- Top = 1215
- Width = 2285
- End
- Begin VB.Label Label1
- Caption = "职工号:"
- Height = 240
- Index = 0
- Left = 315
- TabIndex = 7
- Top = 337
- Width = 780
- End
- Begin VB.Label Label1
- Caption = "姓名:"
- Height = 240
- Index = 1
- Left = 315
- TabIndex = 6
- Top = 787
- Width = 600
- End
- Begin VB.Label Label1
- Caption = "档案类别:"
- Height = 240
- Index = 2
- Left = 315
- TabIndex = 5
- Top = 1245
- Width = 915
- End
- End
- Begin VB.CommandButton Cmd_Cancel
- Caption = "取消"
- Height = 300
- Left = 2295
- TabIndex = 1
- Top = 2295
- Width = 1050
- End
- Begin VB.CommandButton Cmd_Yes
- Caption = "确定"
- Height = 300
- Left = 1035
- TabIndex = 0
- Top = 2295
- Width = 1050
- End
- End
- Attribute VB_Name = "Qr_RsArCndFrm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim ArSort() As String
- Dim tmpId As Integer
- Dim sSql As String
- Private Sub Cmd_Yes_Click()
- If Cbo_ArSort.Text = "在这里选择档案种类..." Then
- Call Xtxxts("请选择档案种类!", 0, 3)
- Exit Sub
- End If
- ' sSql = "SELECT * FROM Rs_ArMain WHERE "
- sSql = ""
- If Trim(Txt_LrText(0).Text) <> "" Then
- sSql = sSql & "rs_basicinfo.EmpId = " & Txt_LrText(0).Tag & " AND "
- End If
- If Trim(Txt_LrText(1).Text) <> "" Then
- sSql = sSql & "rs_basicinfo.EmpName = '" & Trim(Txt_LrText(1).Text) & "' AND "
- End If
- sSql = sSql & "ArSort = '" & ArSort(Cbo_ArSort.ListIndex - 1) & "'"
- Enployeeinfo_Query (sSql)
- Qr_RsArFrm.Lbl_ArSort.Caption = Trim(Cbo_ArSort.Text)
- Me.Hide
- ' Xtfhcs = sSql
- End Sub
- Private Sub Form_Load()
- Dim i As Integer
- Dim tmpRs As New Recordset
- Set tmpRs = Cw_DataEnvi.DataConnect.Execute("select * from Rs_ArSort")
- i = 0
- Cbo_ArSort.Clear
- Cbo_ArSort.AddItem ("在这里选择档案种类...")
- Do While Not tmpRs.EOF
- Cbo_ArSort.AddItem Trim(tmpRs!ArName)
- ReDim Preserve ArSort(i + 1)
- ArSort(i) = Trim(tmpRs!ArSort)
- i = i + 1
- tmpRs.MoveNext
- Loop
- Cbo_ArSort.ListIndex = 0
- tmpRs.Close
- End Sub
- Private Sub Ydcommand1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single) '按钮提供帮助
- Call No_Help
- ' Call Text_Help(Index)
- End Sub
- Private Sub Text_Help(Index As Integer) '录入字段帮助
- ' If Not Textboolean(Index, 1) Then
- ' Exit Sub
- ' End If
- ' 'mp 2001-12-27
- ' If Me.Ydcommand1(Index).Visible = False Or Me.Ydcommand1(Index).Enabled = False Then
- ' Exit Sub
- ' End If
- ' TextValiJudgeLock(Index) = True
- '
- ' '先进行有效性判断
- ' If Not TextYxxpd(CurTextIndex) Then
- ' Exit Sub
- ' End If
- '
- ' '[>>调入参照窗体
- '
- '
- '' sParam = Me.Lab_Note(Index).Tag
- '
- '
- ' Call Drbmhelp(Textint(Index, 2), Textstr(Index, 4), Trim(LrText(Index).Text))
- '
- ' '<<]
- '
- ' If Len(Xtfhcs) <> 0 Then
- ' If Textint(Index, 3) = 1 Then
- ' LrText(Index).Text = Xtfhcsfz
- ' LrText(Index).Tag = Xtfhcs
- ' Else
- ' LrText(Index).Text = Xtfhcs
- ' LrText(Index).Tag = Xtfhcsfz
- ' End If
- '
- ' End If
- ' TextValiJudgeLock(Index) = False
- ' LrText(Index).SetFocus
- End Sub
- Private Sub No_Help()
- SsqlHelp = "Emp"
- ' YesNo_str = Txt_RsItm(1).Text
- Ed_EmpArInfoCorHlp.Show 1
- '---------------------
- If Trim(P_Code) <> "" Then
- Txt_LrText(0).Text = P_Code
- Txt_LrText(0).Tag = Trim(Xtfhcs)
- Xtfhcs = ""
- ' Dim i As Integer
- ' For i = 2 To Txt_RsItm.count - 1
- ' Txt_RsItm(i).Text = ""
- ' Next i
- ' Txt_RsItm_KeyDown 1, 13, 0
- End If
- End Sub
- Public Sub Enployeeinfo_Query(Ssql_2 As String) '条件过滤
- Dim aDo_Reco As New Recordset
- Dim aDo_Item As New Recordset
- Dim h As Integer: Dim c As Integer
- Dim Str_Field As String
- Dim ssql_1 As String
- Dim hSql As String
- ' hSql = "select rs_armain.* , rs_basicinfo.empno , rs_basicinfo.empname from rs_armain left join rs_basicinfo on rs_armain.empid =rs_basicinfo.empid "
- Qr_RsArFrm.vsFlexGrid1.Clear
- ssql_1 = "select rs_armain.* , rs_basicinfo.empno , rs_basicinfo.empname from rs_armain left join rs_basicinfo on rs_armain.empid =rs_basicinfo.empid WHERE " & Ssql_2 & "ORDER BY Sno"
- Set aDo_Reco = Cw_DataEnvi.DataConnect.Execute(ssql_1)
- Set aDo_Item = Cw_DataEnvi.DataConnect.Execute("SELECT * FROM Xt_Grid WHERE Grid_code='" & ArSort(Cbo_ArSort.ListIndex - 1) & "' AND ColIndex > '002' order by FieldsName")
- With Qr_RsArFrm.vsFlexGrid1
- ' Qr_RsArFrm.Tag = Qr_RsArCndFrm.Combo1.ItemData(Qr_RsArCndFrm.Combo1.ListIndex)
- ' Qr_RsArFrm.vsFlexGrid1.Tag = Qr_RsArCndFrm.Combo1.Text
- c = 1: h = 1
- .Rows = aDo_Reco.RecordCount + 1
- Do While Not aDo_Item.EOF
- Str_Field = Str_Field & "^" & aDo_Item!Coltitle1 & "|"
- aDo_Item.MoveNext
- Loop
- .Clear
- .FormatString = "<ID |<序号 |<职工号 |<姓名 |" & Str_Field
- .FixedCols = 1
- .Cols = aDo_Item.RecordCount + 4
- aDo_Item.MoveFirst
- Do While Not aDo_Reco.EOF
- Do While Not aDo_Item.EOF
- If c > 3 Then '档案里只存了empId,职工号和姓名需要单独处理
- .TextMatrix(h, c) = Trim("" & aDo_Reco(Trim(aDo_Item!FieldsName)))
- c = c + 1
- aDo_Item.MoveNext
- Else
- .TextMatrix(h, 1) = Trim("" & aDo_Reco("SNo"))
- .TextMatrix(h, 2) = Trim("" & aDo_Reco("EmpNo"))
- .TextMatrix(h, 3) = Trim("" & aDo_Reco("EmpName"))
- c = 4
- End If
- Loop
- .TextMatrix(h, 0) = h
- aDo_Item.MoveFirst
- c = 1
- h = h + 1
- aDo_Reco.MoveNext
- Loop
- ' aDo_Item.MoveFirst
- '
- ' c = 1
- ' Do While Not aDo_Item.EOF
- ' If Val("" & aDo_Item!Width) < 1 Then
- ' .ColWidth(c) = 800
- ' Else
- ' .ColWidth(c) = Val("" & aDo_Item!Width)
- ' End If
- ' aDo_Item.MoveNext
- ' c = c + 1
- ' Loop
- End With
- aDo_Reco.Close
- aDo_Item.Close
- End Sub