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

📄 frmclient.frm

📁 < 飞鸿商品>>零售是基于VB+SQL2000开的商品零售管理系统. 开发的很好.可以一看
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         TabIndex        =   37
         Top             =   2745
         Width           =   420
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "法人代表"
         Height          =   210
         Index           =   7
         Left            =   3540
         TabIndex        =   36
         Top             =   2730
         Width           =   840
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "联系人"
         Height          =   210
         Index           =   8
         Left            =   6870
         TabIndex        =   35
         Top             =   2730
         Width           =   630
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "电话"
         Height          =   210
         Index           =   9
         Left            =   630
         TabIndex        =   34
         Top             =   3195
         Width           =   420
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "传真"
         Height          =   210
         Index           =   10
         Left            =   7020
         TabIndex        =   33
         Top             =   3180
         Width           =   420
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "E-Mail"
         Height          =   210
         Index           =   11
         Left            =   420
         TabIndex        =   32
         Top             =   3645
         Width           =   630
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "公司网站"
         Height          =   210
         Index           =   12
         Left            =   210
         TabIndex        =   31
         Top             =   4095
         Width           =   840
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "发展日期"
         Height          =   210
         Index           =   13
         Left            =   210
         TabIndex        =   30
         Top             =   4560
         Width           =   840
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "停用日期"
         Height          =   210
         Index           =   14
         Left            =   5040
         TabIndex        =   29
         Top             =   4530
         Width           =   840
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "银行帐号"
         Height          =   210
         Index           =   15
         Left            =   210
         TabIndex        =   28
         Top             =   5010
         Width           =   840
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "税务号"
         Height          =   210
         Index           =   16
         Left            =   5250
         TabIndex        =   27
         Top             =   4980
         Width           =   630
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "备注"
         Height          =   210
         Index           =   17
         Left            =   630
         TabIndex        =   26
         Top             =   5460
         Width           =   420
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "  客 户 资 料 卡  "
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   15
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   3510
         TabIndex        =   25
         Top             =   240
         Width           =   2895
      End
      Begin VB.Line Line1 
         X1              =   3450
         X2              =   6570
         Y1              =   630
         Y2              =   630
      End
   End
   Begin MSFlexGridLib.MSFlexGrid Grid 
      Height          =   6405
      Left            =   60
      TabIndex        =   0
      Top             =   60
      Width           =   10005
      _ExtentX        =   17648
      _ExtentY        =   11298
      _Version        =   393216
      Rows            =   10
      Cols            =   1
      FixedCols       =   0
      ForeColor       =   0
      BackColorBkg    =   14737632
      SelectionMode   =   1
      AllowUserResizing=   1
      Appearance      =   0
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin Manage.xpcmdbutton cmdExit 
      Height          =   465
      Left            =   8100
      TabIndex        =   1
      Top             =   6750
      Width           =   1155
      _ExtentX        =   2037
      _ExtentY        =   820
      Caption         =   "退  出"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin Manage.xpcmdbutton cmdDel 
      Height          =   465
      Left            =   6480
      TabIndex        =   2
      Top             =   6750
      Width           =   1155
      _ExtentX        =   2037
      _ExtentY        =   820
      Caption         =   "删  除"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin Manage.xpcmdbutton cmdAdd 
      Height          =   465
      Left            =   4890
      TabIndex        =   3
      Top             =   6750
      Width           =   1155
      _ExtentX        =   2037
      _ExtentY        =   820
      Caption         =   "添 加"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
End
Attribute VB_Name = "frmClient"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdAdd_Click()
Dim Rst As ADODB.Recordset
Dim SQL As String
Dim I As Integer

SQL = "select max(id)+1 from client_list"
Set Rst = New ADODB.Recordset
Rst.CursorLocation = adUseClient
Rst.Open SQL, Conn, adOpenDynamic, adLockReadOnly, adCmdText
If IsNull(Rst.Fields(0)) Then txt(0).Text = "1" Else txt(0).Text = CStr(Rst.Fields(0))

Rst.Close
Set Rst = Nothing

For I = 1 To 15
  txt(I).Text = ""
Next

picAdd.Visible = True
End Sub

Private Sub cmdCancel_Click()
  picAdd.Visible = False
End Sub

Private Sub cmdDel_Click()
If Grid.Text = "" Then Exit Sub

Dim Cmd As ADODB.Command
Dim SQL As String

SQL = "delete from client_list where id=" & Grid.Text
Set Cmd = New ADODB.Command
Cmd.ActiveConnection = Conn
Cmd.CommandText = SQL
Cmd.CommandType = adCmdText
Cmd.Execute

Grid.RemoveItem Grid.RowSel

End Sub

Private Sub cmdExit_Click()
  Unload Me
End Sub

Private Sub cmdSave_Click()
Dim Cmd As ADODB.Command
Dim SQL As String
Dim I As Integer

Set Cmd = New ADODB.Command
Cmd.ActiveConnection = Conn
SQL = "insert into client_list values(" & txt(0).Text & ",'"

For I = 1 To 17
  SQL = SQL + txt(I).Text & "','"
Next
  
SQL = Mid(SQL, 1, Len(SQL) - 2) & ")"
Cmd.CommandText = SQL
Cmd.CommandType = adCmdText
Cmd.Execute

Grid.Rows = Grid.Rows + 1
For I = 0 To 17
  Grid.TextMatrix(Grid.Rows - 1, I) = txt(I).Text
Next


If chk1.Value = 1 Then
  txt(0).Text = CStr(Val(txt(0).Text) + 1)
  If chk2.Value = 0 Then
    For I = 1 To 17
      txt(I).Text = ""
    Next
  End If
Else
  picAdd.Visible = False
End If
  
End Sub

Private Sub Form_Load()
  
  Me.Height = 7905
  Me.Width = 10230
  With picAdd
    .Left = 60
    .Top = 60
    .Visible = False
  End With
  
FillGrid " 编码|^ 类别|^ 地区|^ 属性|^ 客户名称|^ 地       址|^ 邮 编|" & _
        "^ 法人代表|^ 联系人|^ 电    话|^ 传    真|^ E-Mail|^ 公司网站|^ 银行账号|" & _
        "^ 税务号|^ 备    注|^ 发展日期|^ 停用日期", "select * from client_list", Grid, 18

End Sub

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



⌨️ 快捷键说明

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