⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 +

📁 VB开发的ERP系统
💻
字号:
VERSION 5.00
Object = "{D76D7128-4A96-11D3-BD95-D296DC2DD072}#1.0#0"; "VSOCX7.OCX"
Begin VB.Form Bank_FrmItemGuide 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "导入银行代发栏目"
   ClientHeight    =   3345
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4680
   Icon            =   "基础设置_导入银行代发栏目.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3345
   ScaleWidth      =   4680
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmd_Cancel 
      Caption         =   "取消(&C)"
      Height          =   300
      Left            =   3450
      TabIndex        =   2
      Top             =   2955
      Width           =   1120
   End
   Begin VB.CommandButton Cmd_Ok 
      Caption         =   "确定(&O)"
      Height          =   300
      Left            =   2250
      TabIndex        =   1
      Top             =   2955
      Width           =   1120
   End
   Begin VSFlex8Ctl.VSFlexGrid CzxsGrid 
      Height          =   2715
      Left            =   90
      TabIndex        =   0
      Top             =   120
      Width           =   4485
      _ExtentX        =   7911
      _ExtentY        =   4789
      Appearance      =   1
      BorderStyle     =   1
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      MousePointer    =   0
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      BackColorFixed  =   -2147483633
      ForeColorFixed  =   -2147483630
      BackColorSel    =   -2147483635
      ForeColorSel    =   -2147483634
      BackColorBkg    =   -2147483636
      BackColorAlternate=   -2147483643
      GridColor       =   -2147483633
      GridColorFixed  =   -2147483632
      TreeColor       =   -2147483632
      FloodColor      =   192
      SheetBorder     =   -2147483642
      FocusRect       =   1
      HighLight       =   1
      AllowSelection  =   -1  'True
      AllowBigSelection=   -1  'True
      AllowUserResizing=   1
      SelectionMode   =   0
      GridLines       =   1
      GridLinesFixed  =   2
      GridLineWidth   =   1
      Rows            =   50
      Cols            =   10
      FixedRows       =   1
      FixedCols       =   1
      RowHeightMin    =   0
      RowHeightMax    =   0
      ColWidthMin     =   0
      ColWidthMax     =   0
      ExtendLastCol   =   0   'False
      FormatString    =   ""
      ScrollTrack     =   0   'False
      ScrollBars      =   3
      ScrollTips      =   0   'False
      MergeCells      =   0
      MergeCompare    =   0
      AutoResize      =   -1  'True
      AutoSizeMode    =   0
      AutoSearch      =   0
      MultiTotals     =   -1  'True
      SubtotalPosition=   1
      OutlineBar      =   0
      OutlineCol      =   0
      Ellipsis        =   0
      ExplorerBar     =   0
      PicturesOver    =   0   'False
      FillStyle       =   0
      RightToLeft     =   0   'False
      PictureType     =   0
      TabBehavior     =   0
      OwnerDraw       =   0
      Editable        =   0   'False
      ShowComboButton =   -1  'True
      WordWrap        =   0   'False
      TextStyle       =   0
      TextStyleFixed  =   0
      OleDragMode     =   0
      OleDropMode     =   0
      DataMode        =   0
      VirtualData     =   -1  'True
   End
End
Attribute VB_Name = "Bank_FrmItemGuide"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************
'*    模 块 名 称 :导入银行代发栏目
'*    功 能 描 述 :因为代发栏目是按工资类别、银行设置的,
'*                如果有相同的栏目,则可导入,而不必每次设置。
'*    程序员姓名  :田建秀
'*    最后修改人  :田建秀
'*    最后修改时间:2002/01/04
'*    备        注:
'*******************************************************
Option Explicit
Dim Rsc As New ADODB.Recordset
Dim Sql As String
Dim I As Long

Private Sub Cmd_Cancel_Click()
    Unload Me
End Sub

Private Sub Cmd_Ok_Click()
    With CzxsGrid
        If Trim(.TextMatrix(.Row, 0)) = Trim(Bank_FrmColSet.SortId) And _
            Trim(.TextMatrix(.Row, 1)) = Trim(Bank_FrmColSet.BankCode) Then
            Exit Sub
        Else
            Sql = "insert pm_BankItem(SortID,BankCode,ColumnName,DataType," & _
                  " DataLen,DotLen,DataContent,Single,OrderNO,BkRoundType,AutoAdd1,SourceField)" & _
                  "  select '" & Trim(Bank_FrmColSet.SortId) & "'" & _
                  ",'" & Trim(Bank_FrmColSet.BankCode) & "'," & _
                  " ColumnName,DataType,DataLen,DotLen,DataContent,Single,OrderNO, " & _
                  " BkRoundType,AutoAdd1,SourceField from PM_BankItem where SortID='" & _
                  .TextMatrix(.Row, 0) & "' and BankCode='" & _
                  .TextMatrix(.Row, 1) & "' and not (DataType=5 and Single=1)"
            On Error GoTo Err1
            With Cw_DataEnvi.DataConnect
                .BeginTrans
                .Execute Sql
                .CommitTrans
            End With
            
        End If
    End With
    Unload Me
    Exit Sub
Err1:
    Cw_DataEnvi.DataConnect.RollbackTrans
End Sub

Private Sub CzxsGrid_DblClick()
    Call Cmd_Ok_Click
End Sub

Private Sub Form_Load()
    With CzxsGrid
        
        .Cols = 4
        .Rows = 1
        .FixedRows = 1
        .ColHidden(0) = True
        .ColHidden(1) = True
        .TextMatrix(0, 0) = "工资类别号"
        .TextMatrix(0, 1) = "银行编号"
        .TextMatrix(0, 2) = "工资类别名称"
        .TextMatrix(0, 3) = "银行名称"
        .RowHeight(0) = 450
        .SelectionMode = flexSelectionByRow
        .AutoResize = True
        .ColWidth(2) = 1800
        .ColWidth(3) = 1800
        For I = 0 To .Cols - 1
            .ColAlignment(I) = flexAlignCenterCenter
        Next
    End With
    Sql = "select distinct b.SortId,b.BankCode,SortName,BankName from " & _
        " pm_bankitem b,pm_sort s ,pm_bank p where b.BankCode=p.BankCode " & _
        " and s.SortID=b.SortID and not (datatype=5 and single=1)"
    Set Rsc = Cw_DataEnvi.DataConnect.Execute(Sql)
    With CzxsGrid
        Do While Not Rsc.EOF
            .Rows = .Rows + 1
            .Row = .Rows - 1
            .RowHeight(.Row) = 270
            .TextMatrix(.Row, 0) = Trim(Rsc!SortId)
            .TextMatrix(.Row, 1) = Trim(Rsc!BankCode)
            .TextMatrix(.Row, 2) = Trim(Rsc!SortName)
            .TextMatrix(.Row, 3) = Trim(Rsc!BankName)
            Rsc.MoveNext
        Loop
        If .Rows <> .FixedRows Then
            .Row = .FixedRows
        End If
        
    End With
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set Rsc = Nothing
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -