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

📄 frmsalesroom.frm

📁 网上销售源代码
💻 FRM
📖 第 1 页 / 共 3 页
字号:
         Top             =   315
         Width           =   945
      End
      Begin VB.Label Label3 
         Caption         =   "门市全称:"
         Height          =   225
         Left            =   270
         TabIndex        =   10
         Top             =   780
         Width           =   945
      End
      Begin VB.Label Label4 
         Caption         =   "上级部门:"
         Height          =   225
         Left            =   270
         TabIndex        =   9
         Top             =   1208
         Width           =   945
      End
      Begin VB.Label Label5 
         Caption         =   "门市类型:"
         Height          =   225
         Left            =   3780
         TabIndex        =   8
         Top             =   1208
         Width           =   945
      End
      Begin VB.Label Label6 
         Caption         =   "开户行:"
         Height          =   225
         Left            =   270
         TabIndex        =   7
         Top             =   1605
         Width           =   945
      End
      Begin VB.Label Label7 
         Caption         =   "帐号:"
         Height          =   225
         Left            =   3780
         TabIndex        =   6
         Top             =   1605
         Width           =   945
      End
   End
   Begin MSComctlLib.ImageList ImgOperation 
      Left            =   5880
      Top             =   60
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   19
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":0000
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":5F42
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":6C1C
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":8926
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":94F8
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":C202
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":C51C
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":C96E
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":10330
            Key             =   ""
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":108CA
            Key             =   ""
         EndProperty
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":10E64
            Key             =   ""
         EndProperty
         BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":1173E
            Key             =   ""
         EndProperty
         BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":11898
            Key             =   ""
         EndProperty
         BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":11C32
            Key             =   ""
         EndProperty
         BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":11FCC
            Key             =   ""
         EndProperty
         BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":12366
            Key             =   ""
         EndProperty
         BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":12700
            Key             =   ""
         EndProperty
         BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":12A1A
            Key             =   ""
         EndProperty
         BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmSalesroom.frx":132F4
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar tlbOperate 
      Height          =   540
      Left            =   0
      TabIndex        =   55
      Top             =   0
      Width           =   7500
      _ExtentX        =   13229
      _ExtentY        =   953
      ButtonWidth     =   820
      ButtonHeight    =   953
      AllowCustomize  =   0   'False
      Wrappable       =   0   'False
      Style           =   1
      ImageList       =   "ImgOperation"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   12
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.ToolTipText     =   "新增"
            Style           =   3
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "保存"
            Key             =   "update"
            Object.ToolTipText     =   "保存"
            ImageIndex      =   9
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "撤消"
            Key             =   "cancel"
            ImageIndex      =   10
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "首页"
            Key             =   "first"
            ImageIndex      =   13
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "前页"
            Key             =   "prev"
            ImageIndex      =   14
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "下页"
            Key             =   "next"
            ImageIndex      =   15
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "末页"
            Key             =   "last"
            ImageIndex      =   16
         EndProperty
         BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "关闭"
            Key             =   "quit"
            Object.ToolTipText     =   "关闭"
            ImageIndex      =   19
         EndProperty
         BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "frmSalesroom"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public P_SID As String

Private Sub Command1_Click()

End Sub

Private Sub Text18_Change()

End Sub

Private Sub Text9_Change()

End Sub

Private Sub cboProvince_Click()
'查询城市信息
If Trim(cboProvince.Text) <> "" Then
    sql = "Select DistInct City from CityInfo " & _
          " Where Province='" & Trim(cboProvince.Text) & "' and City<>''"
    Set Ars = SQLDB.Execute(sql)
    cboCity.Clear
    Do While Not Ars.EOF
        cboCity.AddItem Ars("City")
    Ars.MoveNext
    cboCity.ListIndex = 0
    Loop
End If
End Sub

Private Sub cboTerritory_Click()
Dim sql As String
Dim Ars As New ADODB.Recordset

'查询课信息
If Trim(cboTerritory.Text) <> "" Then
    sql = "Select Class from Class Where AreaStorID='" & Trim(cboTerritory.Text) & "'"
    Set Ars = SQLDB.Execute(sql)
    cboClass.Clear
    cboClass.AddItem ""
    Do While Not Ars.EOF
        cboClass.AddItem Ars("Class") & ""
    Ars.MoveNext
    cboClass.ListIndex = 0
    Loop
End If

''查询省份
'If Trim(cboTerritory.Text) <> "" Then
'    sql = "Select DISTINCT Province from CityInfo Where City IS NULL"
'    Set Ars = SQLDB.Execute(sql)
'    cboProvince.Clear
'    Do While Not Ars.EOF
'        cboProvince.AddItem Ars("Province") & ""
'    Ars.MoveNext
'    cboProvince.ListIndex = 0
'    Loop
'End If
'
''查询城市信息
'If Trim(cboProvince.Text) <> "" Then
'    sql = "Select DistInct City from CityInfo Where " & _
'          "Province='" & Trim(cboProvince.Text) & "' and City<>Null"
'    Set Ars = SQLDB.Execute(sql)
'    cboCity.Clear
'    Do While Not Ars.EOF
'        cboCity.AddItem Ars("City")
'    Ars.MoveNext
'    cboCity.ListIndex = 0
'    Loop
'End If

End Sub

Private Sub Form_Load()
Dim sql As String
Dim Ars As New ADODB.Recordset

    '初使化门市类型
    InifDepartmentType
    
    '初使化下拉柜
    InifTerritory
    
    If P_SID <> "" Then
        sql = "select DepartmentID,DepartmentName,DepartmentAllName," & _
              "Superior,DepartmentType,Householder,Accounts,Aftertax,Charter," & _
              "ProtocolID,IdiographDate,EndDate,AreaStorID,Class,Province,City,Linkman," & _
              "Principal,Phone,Fax,Email,Reticul,Address,Post,Pass," & _
              "State,Remark " & _
              "from Department Where DepartmentID='" & P_SID & "'"
        Set Ars = SQLDB.Execute(sql)
        If Not Ars.EOF Then
            txtDepartmentID.Enabled = False
            txtDepartmentID.Text = Ars("DepartmentID") & ""
            txtDepartmentName.Text = Ars("DepartmentName") & ""
            txtDepartmentAllName.Text = Ars("DepartmentAllName") & ""
            txtLinkman.Text = Ars("Linkman") & ""
            txtPrincipal.Text = Ars("Principal") & ""
            txtPhone.Text = Ars("Phone") & ""
            txtFax.Text = Ars("Fax") & ""
            cboTerritory.ListIndex = getComIndex(cboTerritory, Ars("AreaStorID") & "")
            cboProvince.ListIndex = getComIndex(cboProvince, Ars("Province") & "")
            cboCity.ListIndex = getComIndex(cboCity, Ars("City") & "")
            txtAddress.Text = Ars("Address") & ""
            cboClass.ListIndex = getComIndex(cboClass, Ars("Class") & "")
            txtPost.Text = Ars("Post") & ""
            txtProtocolID.Text = Ars("ProtocolID") & ""
            dtpIdiographDate.Value = Ars("IdiographDate") & ""
            dtpEndDate.Value = Ars("EndDate") & ""
            txtHouseholder.Text = Ars("Householder") & ""
            txtAccounts.Text = Ars("Accounts") & ""
            txtAftertax.Text = Ars("Aftertax") & ""
            txtCharter.Text = Ars("Charter") & ""
            txtEmail.Text = Ars("Email") & ""
            txtReticul.Text = Ars("Reticul") & ""
            cboDepartmentType.ListIndex = getComIndex(cboDepartmentType, Ars("DepartmentType") & "")
            cboSuperior.ListIndex = getComIndex(cboSuperior, Ars("Superior") & "")
            txtPass.Text = Ars("Pass") & ""
            txtAffPass.Text = Ars("Pass") & ""
            If Ars("State") = 1 Then
                ChkOpen.Value = 1
            Else
                ChkOpen.Value = 0
            End If
            txtRemark.Text = Ars("ReMark") & ""
        End If
    End If
End Sub

Private Sub tlbOperate_ButtonClick(ByVal Button As MSComctlLib.Button)
 Select Case Button.Key
        Case "update"
            '保存数据
            If P_SID = "" Then
                Sava
            Else
                Update
            End If
            
        Case "cancel"
            '撤消
            InitClear
        
        Case "first"
            '首页
            frmMQSalesroom.mintCurPage = 1
            gFillFg frmMQSalesroom.fg, frmMQSalesroom.mrstDriveRoom, frmMQSalesroom.tlbOperate.Buttons, frmMQSalesroom.mintCurPage, frmMQSalesroom.mintPageSize
            P_SID = frmMQSalesroom.fg.TextMatrix(1, 1)
            FillText
            frmMQSalesroom.fg.TextMatrix(0, 0) = "序号"
            frmMQSalesroom.ShowID
            
            If frmMQSalesroom.mintCurPage = 1 Then
                If frmMQSalesroom.fg.Row = 1 Then
                    Me.tlbOperate.Buttons("first").Enabled = False
                    Me.tlbOperate.Buttons("prev").Enabled = False
                    Me.tlbOperate.Buttons("next").Enabled = True
                    Me.tlbOperate.Buttons("last").Enabled = True
                End If
            End If
            
        Case "prev"
            '前页
            If frmMQSalesroom.fg.Row = frmMQSalesroom.fg.Rows - 1 Then
                If frmMQSalesroom.mintCurPage <= frmMQSalesroom.mrstDriveRoom.PageCount Then
                    frmMQSalesroom.mintCurPage = frmMQSalesroom.mintCurPage - 1
                    gFillFg frmMQSalesroom.fg, frmMQSalesroom.mrstDriveRoom, frmMQSalesroom.tlbOperate.Buttons, frmMQSalesroom.mintCurPage, frmMQSalesroom.mintPageSize
                    P_SID = frmMQSalesroom.fg.TextMatrix(frmMQSalesroom.fg.Rows - 1, 1)
                    FillText
                    frmMQSalesroom.fg.TextMatrix(0, 0) = "序号"
                    frmMQSalesroom.ShowID
                End If
            End If
            
            If frmMQSalesroom.mintCurPage = 1 Then
                If frmMQSalesroom.fg.Row = 1 Then
                    Me.tlbOperate.Buttons("first").Enabled = False
                    Me.tlbOperate.Buttons("prev").Enabled = False
                    Me.tlbOperate.Buttons("next").Enabled = True
                    Me.tlbOperate.Buttons("last").Enabled = True
                End If
            End If
        
        Case "next"
            '下页
            If frmMQSalesroom.fg.Row = frmMQSalesroom.fg.Rows - 1 Then
                frmMQSalesroom.mintCurPage = frmMQSalesroom.mintCurPage + 1
                gFillFg frmMQSalesroom.fg, frmMQSalesroom.mrstDriveRoom, frmMQSalesroom.tlbOperate.Buttons, frmMQSalesroom.mintCurPage, frmMQSalesroom.mintPageSize
                P_SID = frmMQSalesroom.fg.TextMatrix(1, 1)
                FillText
                frmMQSalesroom.fg.TextMatrix(0, 0) = "序号"
                frmMQSalesroom.ShowID
            End If
            
            If frmMQSalesroom.mintCurPage = frmMQSalesroom.mrstDriveRoom.PageCount Then
                If frmMQSalesroom.fg.Row = frmMQSalesroom.fg.Rows - 1 Then
                    Me.tlbOperate.Buttons("first").Enabled = True
                    Me.tlbOperate.Buttons("prev").Enabled = True
                    Me.tlbOperate.Buttons("next").Enabled = False
                    Me.tlbOperate.Buttons("last").Enabled = False
                End If

⌨️ 快捷键说明

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