+-+
资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:7k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Begin VB.Form KF_FrmAccInfo
- BorderStyle = 3 'Fixed Dialog
- Caption = "系统帐套参数设置"
- ClientHeight = 2280
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 3840
- HelpContextID = 1211001
- Icon = "文件_系统参数设置.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2280
- ScaleWidth = 3840
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin VB.CommandButton cmdOK
- Caption = "取消(&C)"
- Height = 330
- Index = 1
- Left = 2595
- TabIndex = 3
- Top = 1890
- Width = 1140
- End
- Begin VB.CommandButton cmdOK
- Caption = "确定(&O)"
- Height = 330
- Index = 0
- Left = 1380
- TabIndex = 1
- Top = 1890
- Width = 1140
- End
- Begin VB.Frame Frame1
- Caption = "参数设置"
- Height = 1725
- Left = 60
- TabIndex = 0
- Top = 60
- Width = 3675
- Begin VB.CheckBox ChkArea
- Caption = "仓库高低储判断"
- Enabled = 0 'False
- Height = 300
- Index = 7
- Left = 1995
- TabIndex = 10
- Top = 255
- Width = 1560
- End
- Begin VB.CheckBox ChkArea
- Caption = "允许负出库"
- Height = 300
- Index = 6
- Left = 1995
- TabIndex = 9
- Top = 1290
- Width = 1245
- End
- Begin VB.CheckBox ChkArea
- Caption = "最高最低报警"
- Height = 300
- Index = 5
- Left = 135
- TabIndex = 8
- Top = 1290
- Width = 1455
- End
- Begin VB.CheckBox ChkArea
- Caption = "超限额领料"
- Height = 300
- Index = 4
- Left = 1995
- TabIndex = 7
- Top = 945
- Width = 1245
- End
- Begin VB.CheckBox ChkArea
- Caption = "盘点冻结出入库"
- Height = 300
- Index = 3
- Left = 135
- TabIndex = 6
- Top = 945
- Width = 1620
- End
- Begin VB.CheckBox ChkArea
- Caption = "保质期管理"
- Enabled = 0 'False
- Height = 300
- Index = 2
- Left = 1995
- TabIndex = 5
- Top = 600
- Width = 1305
- End
- Begin VB.CheckBox ChkArea
- Caption = "批次管理"
- Height = 300
- Index = 1
- Left = 135
- TabIndex = 4
- Top = 600
- Width = 1110
- End
- Begin VB.CheckBox ChkArea
- Caption = "货区管理"
- Height = 300
- Index = 0
- Left = 135
- TabIndex = 2
- Top = 255
- Width = 1110
- End
- End
- End
- Attribute VB_Name = "KF_FrmAccInfo"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '*****************************************************************
- ' 模块名称:系统参数设置
- ' 模块功能:设置库存管理系统需要控制的系统参数,包含以下参数
- ' 1.货区管理 2.批次管理 3.保质期管理 4.盘点冻结出入库
- ' 5.超限额领料 6.高储低储预警 7.允许负出库
- ' 编 制 者:赵宇光
- ' 编制日期:2001/11/19
- ' 备 注:
- '*****************************************************************
- Private Sub ChkArea_Click(Index As Integer)
- '选择保值期管理时,必须选择批次管理
- ChkArea(2).Enabled = ChkArea(1).Value
- If ChkArea(1).Value = 0 Then
- ChkArea(2).Value = 0
- End If
- '选择仓库高储低储判断时,必须选择高储低储判断
- ChkArea(7).Enabled = ChkArea(5).Value
- If ChkArea(5).Value = 0 Then
- ChkArea(7).Value = 0
- End If
- End Sub
- Private Sub cmdOK_Click(Index As Integer)
- Select Case Index
- Case 0 '确定
- Call SaveSysDefine
- '重新读入系统帐套参数
- Call Drxtztcs
- Call getSysDef
- Unload Me
- Case 1 '取消
- Unload Me
- End Select
- End Sub
- Private Sub Form_Load()
- Dim lngJsq As Long
- '读入系统参数设置信息
- Call ReadSysDefine
- '设置参数状态
- If CheckStartFinish = True Then
- For lngJsq = 0 To ChkArea.count - 1
- ChkArea(lngJsq).Enabled = False
- Next lngJsq
- CmdOK(0).Enabled = False
- End If
- End Sub
- '============以下部分为自定义模块=============================
- Private Sub ReadSysDefine()
- '功能:从GY_AccInformation表中读取系统参数设置信息
- Dim adoRec As New ADODB.Recordset
- Dim lngJsq As Long
- Dim strSQL As String
- '连接SQL Server数据库
- strSQL = "SELECT * FROM GY_AccInformation WHERE SystemCode='KF' AND DataType>0 ORDER BY DataType"
- Set adoRec = Cw_DataEnvi.DataConnect.Execute(strSQL)
- With adoRec
- If Not .EOF Then
- .MoveFirst
- For lngJsq = 0 To .RecordCount - 1
- ChkArea(lngJsq).Value = .Fields("itemvalue")
- .MoveNext
- Next lngJsq
- End If
- End With
- '断开SQL Server连接
- adoRec.Close
- Set adoRec = Nothing
- End Sub
- Private Sub SaveSysDefine()
- '功能:保存系统参数设置
- Dim adoRec As New ADODB.Recordset
- Dim lngJsq As Long
- Dim strSQL As String
- Dim strInformation As String
- '连接SQL Server数据库
- strSQL = "SELECT * FROM GY_AccInformation WHERE SystemCode='KF' AND DataType>0 ORDER BY DataType"
- If adoRec.State = 1 Then adoRec.Close
- adoRec.Open strSQL, Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- With adoRec
- If Not .EOF Then
- .MoveFirst
- For lngJsq = 0 To .RecordCount - 1
- .Fields("itemvalue") = ChkArea(lngJsq).Value
- .Update
- .MoveNext
- Next lngJsq
- End If
- End With
- '断开SQL Server连接
- adoRec.Close
- Set adoRec = Nothing
- strInformation = "参数信息保存完毕!"
- Call Xtxxts(strInformation, 0, 4)
- End Sub
- '============以上部分为自定义模块=============================