+
资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:7k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Begin VB.Form FrmJcsz_CheckParaSet
- BorderStyle = 1 'Fixed Single
- Caption = "检验管理"
- ClientHeight = 2580
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 3270
- HelpContextID = 2001
- Icon = "基础_检验管理.frx":0000
- KeyPreview = -1 'True
- LinkTopic = "Form2"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2580
- ScaleWidth = 3270
- StartUpPosition = 2 '屏幕中心
- Begin VB.CommandButton QxCommand
- Cancel = -1 'True
- Caption = "取消(&C)"
- Height = 300
- Left = 2055
- TabIndex = 7
- Top = 2220
- Width = 1120
- End
- Begin VB.CommandButton BcCommand
- Caption = "保存(&S)"
- Height = 300
- Left = 840
- TabIndex = 6
- Top = 2220
- Width = 1120
- End
- Begin VB.Frame Frame1
- Height = 2055
- Left = 120
- TabIndex = 0
- Top = 60
- Width = 3015
- Begin VB.CheckBox Chk_MidJudge
- Caption = "中控检验自动判断合格"
- Height = 495
- Left = 240
- TabIndex = 4
- Top = 1200
- Width = 2535
- End
- Begin VB.CheckBox Chk_ProductJudge
- Caption = "成品检验自动判断检验结果"
- Height = 495
- Left = 240
- TabIndex = 3
- Top = 840
- Width = 2535
- End
- Begin VB.CheckBox Chk_StockJudge
- Caption = "进料检验自动判断检验结果"
- Height = 495
- Left = 240
- TabIndex = 2
- Top = 480
- Width = 2535
- End
- Begin VB.CheckBox Chk_IfLinkStock
- Caption = "进料检验与采购接口"
- Height = 495
- Left = 240
- TabIndex = 1
- Top = 120
- Width = 2535
- End
- Begin VB.CheckBox Chk_DefineMidMaterial
- Caption = "自定义中控物料编码"
- Height = 255
- Left = 240
- TabIndex = 5
- Top = 1680
- Width = 2535
- End
- End
- End
- Attribute VB_Name = "FrmJcsz_CheckParaSet"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '**************************************************************************************
- '* 模 块 名 称 :检验管理
- '* 功 能 描 述 :录入基本检验管理
- '* 程序员姓名 :张晶石
- '* 最后修改人 :张晶石
- '* 最后修改时间:2002/01/21
- '* 备 注:程序中所有依实际情况自定义部分均用[>> <<]括起
- '*
- '* 1.每次调入外部功能窗体,均要加锁ChangeLock=True,窗体关闭后解锁ChangeLock=false
- '*
- '**************************************************************************************
- Dim jdzygs As Integer '控件焦点转移个数
- Dim Tsxx As String '错误提示信息
- Dim Rec_CodeSet As New ADODB.Recordset '编码设置表
- Dim Str_RightEdit As String '编辑(新增、修改、删除)权限索引
- Private Sub Form_Load()
- '编辑(新增、修改、删除)权限索引
- Str_RightEdit = "QC_CheckParaSet_Edit"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True, False) Then
- BcCommand.Enabled = False
- End If
- If GBln_IfLinkStock = True Then Chk_IfLinkStock.Value = 1
- If GBln_StockJudge = True Then Chk_StockJudge.Value = 1
- If GBln_ProductJudge = True Then Chk_ProductJudge.Value = 1
- If GBln_MidJudge = True Then Chk_MidJudge.Value = 1
- If GBln_DefineMidMaterial = True Then Chk_DefineMidMaterial.Value = 1
- '判断是否存在采购系统,不存在则不能设置为与采购系统接口
- With Rec_CodeSet
- If .State = 1 Then .Close
- .Open "select * from dbo.sysobjects where id = object_id(N'[dbo].[Cg_PurReciptSub]') and OBJECTPROPERTY(id, N'IsUserTable') = 1", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- If .EOF Then
- GBln_IfLinkStock = False
- Chk_IfLinkStock.Value = 0
- Chk_IfLinkStock.Enabled = False
- End If
- End With
- End Sub
- Private Sub QxCommand_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) '取消
- '避免执行Click程序
- Bln_Cancel = True
- Unload Me
- End Sub
- Private Sub QxCommand_Click() '取消
- If Bln_Cancel Then
- Bln_Cancel = False
- Exit Sub
- End If
- Unload Me
- End Sub
- Private Sub BcCommand_Click() '保 存
- If Not Bclrsj Then Exit Sub
- End Sub
- Private Function Bclrsj() As Boolean '判断录入数据有效性,并保存数据
- With Rec_CodeSet
- On Error GoTo Swcwcl
- If .State = 1 Then .Close
- .Open "SELECT * FROM Qc_CheckParaSet ", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- Cw_DataEnvi.DataConnect.BeginTrans
- If .EOF Then
- .AddNew
- .Fields("CheckParaSetID") = 1 '主键
- End If
- .Fields("IfLinkStock") = Chk_IfLinkStock.Value '进料检验与采购接口
- .Fields("StockJudge") = Chk_StockJudge.Value '进料检验自动判断检验结果
- .Fields("ProductJudge") = Chk_ProductJudge.Value '成品检验自动判断检验结果
- .Fields("MidJudge") = Chk_MidJudge.Value '中控检验自动判断合格
- .Fields("DefineMidMaterial") = Chk_DefineMidMaterial.Value '自定义中控物料编码
- .Update
- Cw_DataEnvi.DataConnect.CommitTrans
- GBln_IfLinkStock = Chk_IfLinkStock.Value
- GBln_StockJudge = Chk_StockJudge.Value
- GBln_ProductJudge = Chk_ProductJudge.Value
- GBln_MidJudge = Chk_MidJudge.Value
- GBln_DefineMidMaterial = Chk_DefineMidMaterial.Value
- Tsxx = "保存完毕!"
- Call Xtxxts(Tsxx, 0, 4)
- '保存记录成功,函数返回真值
- Bclrsj = True
- Exit Function
- End With
- Swcwcl:
- Cw_DataEnvi.DataConnect.RollbackTrans
- Tsxx = "存盘过程中出现错误,程序自动恢复保存前状态!"
- Call Xtxxts(Tsxx, 0, 1)
- Exit Function
- End Function