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

📄 frmflwtj.frm

📁 鲜花管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "ACTSKN43.OCX"
Begin VB.Form frmflwtj 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Form1"
   ClientHeight    =   5130
   ClientLeft      =   2475
   ClientTop       =   3015
   ClientWidth     =   6075
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5130
   ScaleWidth      =   6075
   Begin VB.ComboBox Combo1 
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   2520
      TabIndex        =   12
      Top             =   1080
      Width           =   3015
   End
   Begin VB.TextBox txtid 
      Height          =   375
      Left            =   1800
      TabIndex        =   11
      Top             =   5400
      Width           =   2895
   End
   Begin VB.TextBox txtname 
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2520
      TabIndex        =   10
      Top             =   360
      Width           =   3015
   End
   Begin VB.TextBox txtmoy 
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2520
      TabIndex        =   9
      Top             =   1800
      Width           =   3015
   End
   Begin VB.TextBox txtno 
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2520
      TabIndex        =   8
      Top             =   2520
      Width           =   3015
   End
   Begin VB.TextBox txtjj 
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2520
      TabIndex        =   7
      Top             =   3240
      Width           =   3015
   End
   Begin ACTIVESKINLibCtl.Skin Skin1 
      Left            =   240
      OleObjectBlob   =   "frmflwtj.frx":0000
      Top             =   3960
   End
   Begin VB.CommandButton cmgqk 
      Caption         =   "清 空"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3600
      TabIndex        =   1
      Top             =   4200
      Width           =   1215
   End
   Begin VB.CommandButton cmdqd 
      Caption         =   "确 定"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1080
      TabIndex        =   0
      Top             =   4200
      Width           =   1215
   End
   Begin ACTIVESKINLibCtl.SkinLabel SkinLabel2 
      Height          =   345
      Left            =   360
      OleObjectBlob   =   "frmflwtj.frx":0234
      TabIndex        =   2
      Top             =   480
      Width           =   1695
   End
   Begin ACTIVESKINLibCtl.SkinLabel SkinLabel3 
      Height          =   345
      Left            =   360
      OleObjectBlob   =   "frmflwtj.frx":0297
      TabIndex        =   3
      Top             =   1200
      Width           =   1695
   End
   Begin ACTIVESKINLibCtl.SkinLabel SkinLabel4 
      Height          =   345
      Left            =   360
      OleObjectBlob   =   "frmflwtj.frx":02FA
      TabIndex        =   4
      Top             =   1920
      Width           =   1695
   End
   Begin ACTIVESKINLibCtl.SkinLabel SkinLabel5 
      Height          =   345
      Left            =   360
      OleObjectBlob   =   "frmflwtj.frx":035D
      TabIndex        =   5
      Top             =   2640
      Width           =   1695
   End
   Begin ACTIVESKINLibCtl.SkinLabel SkinLabel6 
      Height          =   345
      Left            =   360
      OleObjectBlob   =   "frmflwtj.frx":03C0
      TabIndex        =   6
      Top             =   3360
      Width           =   1695
   End
End
Attribute VB_Name = "frmflwtj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As ADODB.Recordset
Dim sql As String

Private Sub cmdqd_Click()

        '根据窗体的名字的不同,做不同的工作
    Select Case frmflwtj.Caption
        Case "添加鲜花"
            If rs.RecordCount <> 0 Then
                rs.MoveLast
                txtid.Text = Format(Right(rs.Fields("鲜花编号"), 5) + 1, "0####")

            Else
                txtid.Text = "00001"
            End If
            If txtname.Text = "" Then
                MsgBox "请输入鲜花名称!"
                Exit Sub
            End If

            If txtmoy.Text = "" Then
                MsgBox "请输入鲜花价格!"
                Exit Sub
            End If

            If txtno.Text = "" Then
                MsgBox "请输入鲜花数量!"
                Exit Sub
            End If
            rs.AddNew
            rs.Fields("鲜花编号").Value = txtid.Text
            rs.Fields("鲜花名称").Value = txtname.Text
            rs.Fields("送花原因").Value = Combo1.Text
            rs.Fields("价格").Value = txtmoy.Text
            rs.Fields("鲜花数量").Value = txtno.Text
            rs.Fields("进货日期").Value = Date
            rs.Fields("进货单价").Value = txtjj.Text
            rs.Update
            MsgBox "添加成功"
        Case "修改鲜花"
            sql = "select * from floweryy where 鲜花编号='" & txtid.Text & "'"
            Set rs = search(sql)
            If txtname.Text = "" Then
                MsgBox "请输入鲜花名称!"
                Exit Sub
            End If
            If txtmoy.Text = "" Then
                MsgBox "请输入鲜花价格!"
                Exit Sub
            End If
            If txtno.Text = "" Then
                MsgBox "请输入鲜花数量!"
                Exit Sub
            End If
            rs.Fields("鲜花编号").Value = txtid.Text
            rs.Fields("鲜花名称").Value = txtname.Text
            rs.Fields("送花原因").Value = Combo1.Text
            rs.Fields("价格").Value = txtmoy.Text
            rs.Fields("鲜花数量").Value = txtno.Text
            rs.Fields("进货日期").Value = Date
            rs.Fields("进货单价").Value = txtjj.Text
            rs.Update
            MsgBox "修改成功"
    End Select
    FrmFlowerSY.rs.Requery
End Sub

Private Sub cmgqk_Click()
    txtname.Text = ""
    txtyy.Text = ""
    txtmoy.Text = ""
    txtno.Text = ""
    txtjj.Text = ""
    txtname.SetFocus
End Sub


Private Sub Form_Load()
    Call showskin(Skin1, hwnd)
    Set rs = search("select distinct 送花原因 from floweryy")
    rs.MoveNext
    While Not rs.EOF
        Combo1.AddItem rs.Fields("送花原因").Value
        rs.MoveNext
    Wend
    Set rs = search("select * from floweryy")
End Sub

⌨️ 快捷键说明

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