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

📄 cpmanage.frm

📁 本系统特为行业报价、订单、产品管理与客户关系管理所订制
💻 FRM
字号:
VERSION 5.00
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "actskn43.ocx"
Object = "{4F29B06F-16D9-4A0C-9C8A-2F0C02F625FE}#1.7#0"; "FlexCell.ocx"
Begin VB.Form CPManage 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "账户信息管理"
   ClientHeight    =   6555
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   9570
   Icon            =   "CPManage.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   6555
   ScaleWidth      =   9570
   StartUpPosition =   3  '窗口缺省
   WindowState     =   2  'Maximized
   Begin VB.PictureBox Picture1 
      BackColor       =   &H00808080&
      Height          =   735
      Left            =   -720
      ScaleHeight     =   675
      ScaleWidth      =   11955
      TabIndex        =   1
      Top             =   4680
      Width           =   12015
      Begin VB.CommandButton Command6 
         Caption         =   "刷 新"
         Height          =   375
         Left            =   8040
         TabIndex        =   7
         Top             =   120
         Width           =   1095
      End
      Begin VB.CommandButton Command5 
         Caption         =   "设为供方信息"
         Height          =   375
         Left            =   9360
         TabIndex        =   6
         Top             =   120
         Width           =   1455
      End
      Begin VB.CommandButton Command4 
         Caption         =   "删 除"
         Height          =   375
         Left            =   6720
         TabIndex        =   5
         Top             =   120
         Width           =   1095
      End
      Begin VB.CommandButton Command3 
         Caption         =   "修 改"
         Height          =   375
         Left            =   5400
         TabIndex        =   4
         Top             =   120
         Width           =   1095
      End
      Begin VB.CommandButton Command2 
         Caption         =   "保 存"
         Height          =   375
         Left            =   4080
         TabIndex        =   3
         Top             =   120
         Width           =   1095
      End
      Begin VB.CommandButton Command1 
         Caption         =   "新 增"
         Height          =   375
         Left            =   2760
         TabIndex        =   2
         Top             =   120
         Width           =   1095
      End
   End
   Begin ACTIVESKINLibCtl.Skin skn1 
      Left            =   7920
      OleObjectBlob   =   "CPManage.frx":000C
      Top             =   840
   End
   Begin FlexCell.Grid Grid1 
      Height          =   4335
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   7455
      _ExtentX        =   13150
      _ExtentY        =   7646
      Cols            =   10
      DisplayRowIndex =   -1  'True
      ExtendLastCol   =   -1  'True
      Rows            =   1
   End
End
Attribute VB_Name = "CPManage"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2008/05/10
'描    述:商品综合管理系统 Sql2000版
'网    站:http://www.Mndsoft.com/  (VB6源码博客)
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005)
'e-mail  :Mndsoft@163.com
'e-mail  :Mndsoft@126.com
'OICQ    :88382850
'          如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Dim AddNew As Boolean
Dim ADDSave As Boolean
Dim GEdit As Boolean
Dim Gdel As Boolean

Private Sub ZHMessage()
With Grid1
 .Cell(0, 1).Text = "公司名称"
 .Cell(0, 2).Text = "地址"
 .Cell(0, 3).Text = "企业法人"
 .Cell(0, 4).Text = "业务代理"
 .Cell(0, 5).Text = "开户行"
 .Cell(0, 6).Text = "帐号"
 .Cell(0, 7).Text = "电话"
 .Cell(0, 8).Text = "传真"
 .Cell(0, 9).Text = "是否供方"
 
End With
End Sub

Private Sub Command1_Click()
Grid1.Column(1).Locked = False
AddNew = True
Grid1.Rows = 1
Grid1.Rows = 21
End Sub

Private Sub Command2_Click()
            If AddNew = True Then
            InsertStr = "insert into ZHMessage values("
            Dim Istr As String
            For i = 1 To Grid1.Rows - 1
            If Grid1.Cell(i, 1).Text <> "" Then
               For j = 1 To Grid1.Cols - 1
                 Select Case j
                  Case 9
                   If Grid1.Cell(i, j).Text = "" Then
                   Istr = Istr & "'" & "0')"
                   Else
                   Istr = Istr & "'" & Grid1.Cell(i, j).Text & "')"
                   End If
                  Case Else
                   Istr = Istr & "'" & Grid1.Cell(i, j).Text & "',"
                 End Select
                Next
               Set Qy1 = cnn.Execute(InsertStr & Istr)
               Istr = ""
             End If
            Next
            AddNew = False
            MsgBox "成功录入数据!", vbInformation, "提示"
            Call Command6_Click
           Else
            MsgBox "当前属于查看状态,保存不能执行!", vbInformation, "提示"
           End If
End Sub

Private Sub Command3_Click()
If GEdit = True Then
 For i = 1 To Grid1.Rows - 1
  UPStr = "update zhmessage set "
  UPStr = UPStr & "dz = '" & Grid1.Cell(i, 2).Text & "',"
  UPStr = UPStr & "qyfr = '" & Grid1.Cell(i, 3).Text & "',"
  UPStr = UPStr & "ywdl = '" & Grid1.Cell(i, 4).Text & "',"
  UPStr = UPStr & "khh = '" & Grid1.Cell(i, 5).Text & "',"
  UPStr = UPStr & "zh = '" & Grid1.Cell(i, 6).Text & "',"
  UPStr = UPStr & "tel = '" & Grid1.Cell(i, 7).Text & "',"
  UPStr = UPStr & "fax= '" & Grid1.Cell(i, 8).Text & "',"
  UPStr = UPStr & "yngf = '" & Grid1.Cell(i, 9).Text & "'"
  UPStr = UPStr & " where coname='" & Grid1.Cell(i, 1).Text & "'"
  Set Qy1 = cnn.Execute(UPStr)
 Next
 UPStr = ""
 MsgBox "修改完成!", vbInformation, "提示"
End If
End Sub

Private Sub Command4_Click()
 If Gdel = True Then
  Set Qy1 = cnn.Execute("delete from zhmessage where coname='" & Grid1.Cell(hang, 1).Text & "'")
  MsgBox "已删除指定行!", vbInformation, "提示"
  Call Command6_Click
 Else
  MsgBox "当前状态不允许执行此操作!", vbInformation, "提示"
End If
End Sub

Private Sub Command5_Click()
 If AddNew = False Then
  For i = 1 To Grid1.Rows - 1
    UPStr = "update zhmessage set "
    UPStr = UPStr & "yngf = '0'"
    Set Qy1 = cnn.Execute(UPStr)
  Next
  UPStr = "update zhmessage set "
  UPStr = UPStr & "yngf = '1'"
  UPStr = UPStr & " where coname='" & Grid1.Cell(hang, 1).Text & "'"
  Set Qy1 = cnn.Execute(UPStr)
  MsgBox "已完成设定!", vbInformation, "提示"
  Call Command6_Click
Else
  MsgBox "当前非设定状态!", vbInformation, "提示"
End If
End Sub

Private Sub Command6_Click()
AddNew = False
GEdit = True
Gdel = True
Grid1.Column(1).Locked = True
Set Qy3 = cnn.Execute("select * from zhmessage")
Grid1.Rows = 1
Do While Not Qy3.EOF
 Grid1.Rows = Grid1.Rows + 1
 For i = 1 To Grid1.Cols - 1
  Grid1.Cell(Grid1.Rows - 1, i).Text = Qy3.Fields(i - 1)
 Next
 Qy3.MoveNext
Loop
End Sub

Private Sub Form_Load()
Skn1.LoadSkin App.Path & sknPname
Skn1.ApplySkinByName hWnd, "窗体"
Skn1.ApplySkin hWnd
Picture1.BackColor = RGB(230, 240, 255)
With Grid1
    .OpenFile ("ZHXX.cel")
    Set Qy1 = cnn.Execute("SELECT DISTINCT coname from c_message")
    Do While Not Qy1.EOF
     .ComboBox(1).AddItem Qy1.Fields(0)
     Qy1.MoveNext
    Loop
End With
ZHMessage
Call Command6_Click
End Sub

Private Sub Form_Resize()
Picture1.Move 0, Me.ScaleHeight - Picture1.Height, Me.ScaleWidth, Picture1.Height
Grid1.Move 0, 0, Me.ScaleWidth, Picture1.Top
End Sub

Private Sub Grid1_CellChange(ByVal Row As Long, ByVal Col As Long)
If Col = 1 Then
 If Grid1.Cell(Row, Col).Text <> "" Then
  Set Qy1 = cnn.Execute("select dz,[name],phone,fax from c_message where coname='" & Grid1.Cell(Row, Col).Text & "'")
  If Qy1.EOF = False Then
   Grid1.Cell(Row, 2).Text = Qy1.Fields(0)
   Grid1.Cell(Row, 4).Text = Qy1.Fields(1)
   Grid1.Cell(Row, 7).Text = Qy1.Fields(2)
   Grid1.Cell(Row, 8).Text = Qy1.Fields(3)
  End If
 End If
End If
End Sub

Private Sub Grid1_RowColChange(ByVal Row As Long, ByVal Col As Long)
hang = Row
End Sub

⌨️ 快捷键说明

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