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

📄 frmouth1.frm

📁 经典delphi,Delphi下深入Windows核心编程.原书光盘代码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form frmOUTH1 
   Caption         =   "销售单信息"
   ClientHeight    =   6600
   ClientLeft      =   48
   ClientTop       =   336
   ClientWidth     =   6216
   LinkTopic       =   "Form1"
   ScaleHeight     =   6600
   ScaleWidth      =   6216
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtSL 
      Height          =   372
      Left            =   4560
      TabIndex        =   41
      Text            =   "txtSL"
      Top             =   6480
      Visible         =   0   'False
      Width           =   252
   End
   Begin VB.TextBox txtZKE 
      Height          =   372
      Left            =   5520
      TabIndex        =   40
      Text            =   "Text2"
      Top             =   6480
      Visible         =   0   'False
      Width           =   252
   End
   Begin VB.TextBox txtWZDM 
      Height          =   372
      Left            =   5880
      TabIndex        =   39
      Text            =   "txtSL"
      Top             =   6480
      Visible         =   0   'False
      Width           =   252
   End
   Begin VB.TextBox txtYANSE 
      Height          =   372
      Left            =   4920
      TabIndex        =   38
      Text            =   "txtSL"
      Top             =   6480
      Visible         =   0   'False
      Width           =   252
   End
   Begin VB.TextBox txtCKDM 
      Height          =   372
      Left            =   1080
      TabIndex        =   37
      Text            =   "txtSL"
      Top             =   6480
      Visible         =   0   'False
      Width           =   252
   End
   Begin VB.CommandButton cmdSave 
      Caption         =   "保存 (&S)"
      Height          =   375
      Left            =   1560
      TabIndex        =   36
      Top             =   6120
      Width           =   1215
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "返回 (&X)"
      Height          =   375
      Left            =   3000
      TabIndex        =   35
      Top             =   6120
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Caption         =   "销售单基本信息:"
      Height          =   1212
      Index           =   0
      Left            =   120
      TabIndex        =   26
      Top             =   0
      Width           =   6012
      Begin VB.TextBox txtItem 
         Height          =   270
         Index           =   0
         Left            =   1200
         MaxLength       =   20
         TabIndex        =   30
         Top             =   360
         Width           =   1572
      End
      Begin VB.ComboBox Combo1 
         Height          =   288
         Index           =   0
         Left            =   3720
         Style           =   2  'Dropdown List
         TabIndex        =   29
         Top             =   360
         Width           =   2052
      End
      Begin VB.TextBox txtItem 
         Height          =   270
         Index           =   1
         Left            =   1200
         MaxLength       =   20
         TabIndex        =   28
         Top             =   720
         Width           =   1572
      End
      Begin VB.ComboBox Combo1 
         Height          =   288
         Index           =   4
         Left            =   3720
         Style           =   2  'Dropdown List
         TabIndex        =   27
         Top             =   720
         Width           =   2052
      End
      Begin VB.Label Label2 
         Caption         =   "业务员:"
         Height          =   252
         Index           =   1
         Left            =   2880
         TabIndex        =   34
         Top             =   360
         Width           =   1092
      End
      Begin VB.Label Label2 
         Caption         =   "销售日期:"
         Height          =   252
         Index           =   0
         Left            =   360
         TabIndex        =   33
         Top             =   360
         Width           =   1092
      End
      Begin VB.Label Label2 
         Caption         =   "销售单号:"
         Height          =   252
         Index           =   5
         Left            =   360
         TabIndex        =   32
         Top             =   720
         Width           =   1092
      End
      Begin VB.Label Label2 
         Caption         =   "提货仓库:"
         Height          =   252
         Index           =   12
         Left            =   2880
         TabIndex        =   31
         Top             =   720
         Width           =   1092
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "客户信息:"
      Height          =   852
      Index           =   1
      Left            =   120
      TabIndex        =   21
      Top             =   1320
      Width           =   6012
      Begin VB.ComboBox Combo1 
         Height          =   288
         Index           =   1
         Left            =   3720
         Style           =   2  'Dropdown List
         TabIndex        =   23
         Top             =   360
         Width           =   2052
      End
      Begin VB.TextBox txtItem 
         Height          =   270
         Index           =   2
         Left            =   1200
         MaxLength       =   20
         TabIndex        =   22
         Top             =   360
         Width           =   1572
      End
      Begin VB.Label Label2 
         Caption         =   "客户代码:"
         Height          =   252
         Index           =   4
         Left            =   360
         TabIndex        =   25
         Top             =   360
         Width           =   1092
      End
      Begin VB.Label Label2 
         Caption         =   "客户名称:"
         Height          =   252
         Index           =   7
         Left            =   2880
         TabIndex        =   24
         Top             =   360
         Width           =   1092
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "商品信息:"
      Height          =   1452
      Index           =   2
      Left            =   120
      TabIndex        =   8
      Top             =   2280
      Width           =   6012
      Begin VB.ComboBox Combo1 
         Height          =   288
         Index           =   2
         Left            =   3720
         Style           =   2  'Dropdown List
         TabIndex        =   14
         Top             =   360
         Width           =   2052
      End
      Begin VB.TextBox txtItem 
         Height          =   270
         Index           =   3
         Left            =   1080
         MaxLength       =   20
         TabIndex        =   13
         Top             =   360
         Width           =   1572
      End
      Begin VB.TextBox txtItem 
         Height          =   270
         Index           =   4
         Left            =   1080
         MaxLength       =   20
         TabIndex        =   12
         Top             =   720
         Width           =   1572
      End
      Begin VB.TextBox txtItem 
         Height          =   270
         Index           =   5
         Left            =   3720
         MaxLength       =   20
         TabIndex        =   11
         Top             =   720
         Width           =   2052
      End
      Begin VB.TextBox txtItem 
         Height          =   270
         Index           =   6
         Left            =   1080
         MaxLength       =   20
         TabIndex        =   10
         Top             =   1080
         Width           =   1572
      End
      Begin VB.TextBox txtItem 
         Height          =   276
         Index           =   7
         Left            =   3720
         MaxLength       =   200
         MultiLine       =   -1  'True
         TabIndex        =   9
         Top             =   1080
         Width           =   2052
      End
      Begin VB.Label Label2 
         Caption         =   "商品名称:"
         Height          =   252
         Index           =   8
         Left            =   2880
         TabIndex        =   20
         Top             =   360
         Width           =   1092
      End
      Begin VB.Label Label2 
         Caption         =   "商品代码:"
         Height          =   252
         Index           =   9
         Left            =   360
         TabIndex        =   19
         Top             =   360
         Width           =   1092
      End
      Begin VB.Label Label2 
         Caption         =   "数       量:"
         Height          =   252
         Index           =   10
         Left            =   360
         TabIndex        =   18
         Top             =   720
         Width           =   1092
      End
      Begin VB.Label Label2 
         Caption         =   "销售单价:"
         Height          =   252
         Index           =   11
         Left            =   2880
         TabIndex        =   17
         Top             =   720
         Width           =   1092
      End
      Begin VB.Label Label2 
         Caption         =   "折扣比例:"
         Height          =   252
         Index           =   2
         Left            =   360
         TabIndex        =   16
         Top             =   1080
         Width           =   1092
      End
      Begin VB.Label Label2 
         Caption         =   "销售金额:"
         Height          =   252
         Index           =   6
         Left            =   2880
         TabIndex        =   15
         Top             =   1080
         Width           =   1092
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "其它信息:"
      Height          =   1452
      Index           =   3
      Left            =   120
      TabIndex        =   6
      Top             =   4560
      Width           =   6012
      Begin VB.TextBox txtItem 
         Height          =   1080
         Index           =   9
         Left            =   360
         MaxLength       =   200
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   7
         Top             =   240
         Width           =   5412
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "支付方式:"
      Height          =   612
      Index           =   4
      Left            =   120
      TabIndex        =   1
      Top             =   3840
      Width           =   6012
      Begin VB.ComboBox Combo1 
         Height          =   288
         Index           =   5
         Left            =   1080
         Style           =   2  'Dropdown List
         TabIndex        =   3
         Top             =   240
         Width           =   1572
      End
      Begin VB.TextBox txtItem 
         Height          =   276
         Index           =   8
         Left            =   3720
         MaxLength       =   200
         MultiLine       =   -1  'True
         TabIndex        =   2
         Top             =   240
         Width           =   2052
      End
      Begin VB.Label Label2 
         Caption         =   "预付比例:"
         Height          =   252
         Index           =   13
         Left            =   2880
         TabIndex        =   5
         Top             =   240
         Width           =   1092
      End
      Begin VB.Label Label2 
         Caption         =   "方式选择:"
         Height          =   252
         Index           =   14
         Left            =   360
         TabIndex        =   4
         Top             =   240
         Width           =   1092
      End
   End
   Begin VB.TextBox txtItem 
      Height          =   276
      Index           =   10
      Left            =   600
      MaxLength       =   200
      MultiLine       =   -1  'True
      TabIndex        =   0
      Top             =   6480
      Visible         =   0   'False
      Width           =   492
   End
End
Attribute VB_Name = "frmOUTH1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'是否改动过记录,ture为改过
Dim mblChange As Boolean
Dim mrc As ADODB.Recordset
Public txtSQL As String

Private Sub cmdExit_Click()
    If mblChange And cmdSave.Enabled Then
        If MsgBox("保存当前记录的变化吗?", vbOKCancel + vbExclamation, "警告") = vbOK Then
            '保存
            Call cmdSave_Click
        End If
    End If
    Unload Me
End Sub

Private Sub cmdSave_Click()
    Dim intCount As Integer
    Dim sMeg As String
    Dim MsgText As String
    Dim mrce As ADODB.Recordset
    
  
    For intCount = 1 To 7
        If Trim(txtItem(intCount) & " ") = "" Then
            Select Case intCount
                Case 1
                    sMeg = "销售单号"
                Case 2
                    sMeg = "客户代码"
                Case 3
                    sMeg = "产品代码"
                Case 4
                    sMeg = "数量"
                Case 5
                    sMeg = "销售单价"
                Case 6
                    sMeg = "折扣比例"
                Case 7
                    sMeg = "总金额"
            End Select
            sMeg = sMeg & "不能为空!"
            MsgBox sMeg, vbOKOnly + vbExclamation, "警告"
            txtItem(intCount).SetFocus
            Exit Sub
        End If
    Next intCount
    
    If txtItem(8).Visible = True Then
        If Trim(txtItem(8) & " ") = "" Then
            sMeg = "预付比例不能为空!"
            MsgBox sMeg, vbOKOnly + vbExclamation, "警告"
            txtItem(8).SetFocus
            Exit Sub
        End If
    End If

    
    For intCount = 0 To 2
        If Trim(Combo1(intCount) & " ") = "" Then
            Select Case intCount
                Case 0
                    sMeg = "业务员"
                Case 1
                    sMeg = "客户名称"
                Case 2
                    sMeg = "产品名称"
            End Select
            sMeg = sMeg & "不能为空!"
            MsgBox sMeg, vbOKOnly + vbExclamation, "警告"
            Combo1(intCount).SetFocus
            Exit Sub
        End If
    Next intCount
    
    For intCount = 4 To 5
        If Trim(Combo1(intCount) & " ") = "" Then

⌨️ 快捷键说明

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