资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:7k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Begin VB.Form Bbfx_SelDate
- BorderStyle = 3 'Fixed Dialog
- Caption = "分析期选择"
- ClientHeight = 1620
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 4155
- KeyPreview = -1 'True
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 1620
- ScaleWidth = 4155
- ShowInTaskbar = 0 'False
- StartUpPosition = 1 '所有者中心
- Begin VB.CommandButton YdCommand
- Caption = "确定(&O)"
- Height = 300
- Index = 0
- Left = 1770
- TabIndex = 5
- Top = 1260
- Width = 1120
- End
- Begin VB.CommandButton YdCommand
- Caption = "取消(&C)"
- Height = 300
- Index = 1
- Left = 2970
- TabIndex = 6
- Top = 1260
- Width = 1120
- End
- Begin VB.Frame Frame1
- Height = 1185
- Left = 60
- TabIndex = 7
- Top = 0
- Width = 4035
- Begin VB.Frame Frame2
- Height = 495
- Left = 150
- TabIndex = 8
- Top = 120
- Width = 3765
- Begin VB.OptionButton DateType
- Caption = "按月"
- Height = 255
- Index = 0
- Left = 495
- TabIndex = 0
- Top = 180
- Value = -1 'True
- Width = 675
- End
- Begin VB.OptionButton DateType
- Caption = "按季"
- Height = 255
- Index = 1
- Left = 1590
- TabIndex = 1
- Top = 180
- Width = 675
- End
- Begin VB.OptionButton DateType
- Caption = "按年"
- Height = 255
- Index = 2
- Left = 2715
- TabIndex = 2
- Top = 180
- Width = 705
- End
- End
- Begin VB.ComboBox Combo_Date
- Height = 300
- Index = 0
- Left = 150
- Style = 2 'Dropdown List
- TabIndex = 3
- Top = 720
- Width = 1695
- End
- Begin VB.ComboBox Combo_Date
- Height = 300
- Index = 1
- Left = 2235
- Style = 2 'Dropdown List
- TabIndex = 4
- Top = 720
- Width = 1695
- End
- Begin VB.Line Line1
- X1 = 1935
- X2 = 2145
- Y1 = 870
- Y2 = 870
- End
- End
- End
- Attribute VB_Name = "Bbfx_SelDate"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '*************************************************************
- '* 模 块 名 称 :报表分析条件
- '* 功 能 描 述 :报表的分析条件
- '* 程序员姓名 : 魏永生
- '* 最后修改人 :
- '* 最后修改时间:2002/1/15
- '* 备 注:
- '* 报表分析/绝对数分析
- '* 报表分析/定基分析
- '* 报表分析/环比分析
- '*************************************************************
- Option Explicit
- Public bSeach As Boolean
- Public strBegin As String
- Public strEnd As String
- '----------------------
- Public iThisYear As Integer '本年
- Public iCompYear As Integer '查询终止年
- Public iThisMonthBegin As Integer '本年月起始
- Public iThisMonthEnd As Integer '本年终止月
- Public intType As Integer '比较类型,0按月、1按季、2按年
- Private Tsxx As String
- Private Sub Form_KeyPress(KeyAscii As Integer) '控 制 焦 点 转 移
- Dim jdzygs As Integer '控件焦点转移个数
- jdzygs = 8
- Select Case KeyAscii
- Case vbKeyReturn
- If Kjjdzy(jdzygs) Then
- KeyAscii = 0
- End If
- Case 39 '屏蔽"'"
- KeyAscii = 0
- End Select
- End Sub
- '----------------------
- Private Sub DateType_Click(Index As Integer)
- Select Case Index
- Case 0 '月
- Call FillMonth(Combo_Date(0))
- Call FillMonth(Combo_Date(1))
- Case 1 '季
- Call FillThreeMonth(Combo_Date(0))
- Call FillThreeMonth(Combo_Date(1))
- Case 2 '年
- Call FillYear(Combo_Date(0))
- Call FillYear(Combo_Date(1))
- End Select
- intType = Index
- End Sub
- Private Sub Form_Load()
- Me.Icon = XT_Main.Icon
- Me.bSeach = False
- Call DateType_Click(0)
- End Sub
- Private Sub YdCommand_Click(Index As Integer)
- Select Case Index
- Case 0 '确定
- iThisMonthBegin = 0
- iThisMonthEnd = 0
- strBegin = ""
- strEnd = ""
- bSeach = True
- strBegin = Combo_Date(0).Text
- strEnd = Combo_Date(1).Text
- iThisYear = Xtyear
- iCompYear = Left(strEnd, 4)
- If intType <> 2 Then
- iThisMonthBegin = Right(Combo_Date(0).Text, 2)
- iThisMonthEnd = Right(Combo_Date(1).Text, 2)
- End If
- If iThisMonthBegin > iThisMonthEnd Then
- Dim Item As Integer
- Item = iThisMonthBegin
- iThisMonthBegin = iThisMonthEnd
- iThisMonthEnd = Item
- End If
- Case 1 '取消
- bSeach = False
- End Select
- Me.Hide
- End Sub
- Private Sub FillMonth(PastCombo As ComboBox)
- Dim iMonth As Integer
- With PastCombo
- .Clear
- For iMonth = 1 To 12
- .AddItem Xtyear & "." & Format(iMonth, "00")
- Next
- .ListIndex = Val(Xtmm - 1)
- End With
- End Sub
- Private Sub FillThreeMonth(PastCombo As ComboBox)
- Dim iThreeMonth As Integer
- With PastCombo
- .Clear
- For iThreeMonth = 1 To 4
- .AddItem Xtyear & "." & Format(((iThreeMonth - 1) * 3 + 1), "00") & "-" & Xtyear & "." & Format(iThreeMonth * 3, "00")
- Next
- .ListIndex = 0
- End With
- End Sub
- Private Sub FillYear(PastCombo As ComboBox)
- Dim Rs As New ADODB.Recordset
- Dim strSql As String
- strSql = "SELECT DISTINCT kjyear AS cYear FROM gy_kjrlb"
- Set Rs = Cw_DataEnvi.DataConnect.Execute(strSql)
- PastCombo.Clear
- With Rs
- Do Until .EOF
- PastCombo.AddItem Trim(!cYear)
- .MoveNext
- Loop
- End With
- If PastCombo.ListCount > 0 Then PastCombo.ListIndex = 0
- End Sub