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

📄 frmtostock.frm

📁 超市的管理与及时的维护
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmToStock 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "进货 http://www.play78.com"
   ClientHeight    =   3150
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4515
   Icon            =   "frmToStock.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   210
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   301
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin MySuperMarket.FTextBox txtPrice 
      Height          =   300
      Left            =   1200
      TabIndex        =   1
      Top             =   1200
      Width           =   3075
      _ExtentX        =   5424
      _ExtentY        =   529
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      FontName        =   "宋体"
      FontSize        =   9
      Text            =   "0"
      AutoSelAll      =   -1  'True
      isNumber        =   -1  'True
      MaxLength       =   8
   End
   Begin MySuperMarket.FTextBox txtNum 
      Height          =   300
      Left            =   1200
      TabIndex        =   0
      Top             =   720
      Width           =   3075
      _ExtentX        =   5424
      _ExtentY        =   529
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      FontName        =   "宋体"
      FontSize        =   9
      Text            =   "0"
      AutoSelAll      =   -1  'True
      isNumber        =   -1  'True
      MaxLength       =   5
      afterdecimal    =   0
   End
   Begin MySuperMarket.XPButton cmdExit 
      Cancel          =   -1  'True
      Height          =   345
      Left            =   3180
      TabIndex        =   5
      Top             =   2640
      Width           =   1095
      _ExtentX        =   1931
      _ExtentY        =   609
      Caption         =   "取消"
      CapAlign        =   2
      BackStyle       =   2
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Mode            =   0
      Value           =   0   'False
      cBack           =   -2147483633
   End
   Begin MySuperMarket.XPButton cmdOK 
      Default         =   -1  'True
      Height          =   345
      Left            =   1980
      TabIndex        =   4
      Top             =   2640
      Width           =   1095
      _ExtentX        =   1931
      _ExtentY        =   609
      Caption         =   "确定"
      CapAlign        =   2
      BackStyle       =   2
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "新宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Mode            =   0
      Value           =   0   'False
      cBack           =   -2147483633
   End
   Begin MySuperMarket.FTextBox txtDate 
      Height          =   300
      Left            =   1200
      TabIndex        =   3
      Top             =   2160
      Width           =   3075
      _ExtentX        =   5424
      _ExtentY        =   529
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      FontName        =   "宋体"
      FontSize        =   9
      AutoSelAll      =   -1  'True
   End
   Begin MySuperMarket.FTextBox txtMoney 
      Height          =   300
      Left            =   1200
      TabIndex        =   2
      Top             =   1680
      Width           =   3075
      _ExtentX        =   5424
      _ExtentY        =   529
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      FontName        =   "宋体"
      FontSize        =   9
      Text            =   "0"
      AutoSelAll      =   -1  'True
      isNumber        =   -1  'True
      MaxLength       =   10
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "进货总额:"
      Height          =   180
      Left            =   240
      TabIndex        =   10
      Top             =   1755
      Width           =   900
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "进货日期:"
      Height          =   180
      Left            =   240
      TabIndex        =   9
      Top             =   2220
      Width           =   900
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "进货数量:"
      Height          =   180
      Left            =   240
      TabIndex        =   8
      Top             =   795
      Width           =   900
   End
   Begin VB.Label lbName 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "商品名称: "
      Height          =   180
      Left            =   240
      TabIndex        =   7
      Top             =   315
      Width           =   990
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "进货价格:"
      Height          =   180
      Left            =   240
      TabIndex        =   6
      Top             =   1260
      Width           =   900
   End
End
Attribute VB_Name = "frmToStock"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

' **********************************************************************
'  描  述:超市销售系统源代码
'  Play78.com : 网站导航,源码之家,绝对开源
'  海阔天空收集整理
'  主站地址:http://www.play78.com/
'  源码下载地址:http://www.play78.com/blog
'  图片下在地址:http://www.play78.com/pic
'  QQ:13355575
'  e-mail:hglai@eyou.com
'  编写日期:2005年08月14日
' **********************************************************************

Private Sub cmdExit_Click()
    Unload Me
End Sub

Private Sub cmdOK_Click()
On Error GoTo aaaa
    Dim d As Date, MID As String

    If CLng(txtNum.Text) = 0 Then
        MsgBox "进货数量必须大于0", vbInformation
        txtNum.SetFocus
        Exit Sub
    End If
    
    If CCur(txtPrice.Text) <= 0 Then
        MsgBox "进货价格必须大于0", vbInformation
        txtPrice.SetFocus
        Exit Sub
    End If
    
    If CCur(txtMoney.Text) <= 0 Then
        MsgBox "进货总额必须大于0", vbInformation
        txtMoney.SetFocus
        Exit Sub
    End If
    
    If IsDate(txtDate.Text) = False Then
        MsgBox "请输入合法的计划进货日期。", vbInformation
        txtDate.SetFocus
        Exit Sub
    End If
    d = CDate(txtDate.Text)
    
    cnMain.Execute "UPDATE Stock SET MerchPrice=" & txtPrice.Text & _
        ",MerchNum=" & txtNum.Text & ",TotalPrice=" & txtMoney.Text & _
        ",StockDate='" & txtDate.Text & "',StockState=1 Where StockID=" & Me.Tag
        frmStock.List1.ListItems.Remove frmStock.List1.SelectedItem.Index
    cnMain.Execute "UPDATE MerchInfo SET MerchNum=MerchNum+" & txtNum.Text & " Where MerchName='" & lbName.Tag & "'"
    SetSB 2, "该计划进货记录入库成功."
    Unload Me
Exit Sub
aaaa:
    MsgBox Err.Description, vbCritical
    Unload Me
End Sub

Private Sub Form_Load()
    Move frmMain.Left + (frmMain.Width - Me.Width) / 2, frmMain.Top + (frmMain.Height - Me.Height) / 2
End Sub

Private Sub txtNum_Change()
    CountSum
End Sub

Private Sub CountSum()
On Error GoTo aaaa
    Dim c As Currency
    c = CCur(txtNum.Text) * CCur(txtPrice.Text)
    txtMoney.Text = c
Exit Sub
aaaa:
    txtMoney.Text = 0
End Sub

Private Sub txtPrice_Change()
    CountSum
End Sub

⌨️ 快捷键说明

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