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

📄 frmstart.frm

📁 好的ERP就是要源代码
💻 FRM
字号:
VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Frmstart 
   Caption         =   "宾客开单录入"
   ClientHeight    =   5520
   ClientLeft      =   4260
   ClientTop       =   3750
   ClientWidth     =   8505
   Icon            =   "Frmstart.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   5520
   ScaleWidth      =   8505
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox Text6 
      ForeColor       =   &H000000FF&
      Height          =   315
      Left            =   6780
      Locked          =   -1  'True
      TabIndex        =   20
      Top             =   1200
      Width           =   1395
   End
   Begin VB.Frame Frame2 
      Caption         =   "选择开单种类"
      ForeColor       =   &H00FF0000&
      Height          =   975
      Left            =   360
      TabIndex        =   16
      Top             =   840
      Width           =   1335
      Begin VB.OptionButton Option4 
         Caption         =   "团体开单"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   120
         TabIndex        =   18
         Top             =   660
         Width           =   1035
      End
      Begin VB.OptionButton Option3 
         Caption         =   "单人开单"
         ForeColor       =   &H00FF0000&
         Height          =   315
         Left            =   120
         TabIndex        =   17
         Top             =   240
         Value           =   -1  'True
         Width           =   1095
      End
   End
   Begin MSDataListLib.DataCombo DataCombo1 
      Bindings        =   "Frmstart.frx":6852
      DataSource      =   "Adodc1"
      Height          =   330
      Left            =   5520
      TabIndex        =   15
      Top             =   1200
      Width           =   1095
      _ExtentX        =   1931
      _ExtentY        =   582
      _Version        =   393216
      ListField       =   "shpcode"
      BoundColumn     =   "shpcode"
      Text            =   ""
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   6240
      Top             =   0
      Visible         =   0   'False
      Width           =   2055
      _ExtentX        =   3625
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=bgxy"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "bgxy"
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from shpk"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.TextBox Text5 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   975
      Left            =   300
      TabIndex        =   14
      Text            =   "Text5"
      Top             =   2880
      Width           =   7935
   End
   Begin VB.TextBox Text4 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   375
      Left            =   5820
      TabIndex        =   13
      Text            =   "Text4"
      Top             =   2100
      Width           =   2415
   End
   Begin VB.Frame Frame1 
      Caption         =   "选择宾客类别"
      ForeColor       =   &H00FF0000&
      Height          =   975
      Left            =   2040
      TabIndex        =   10
      Top             =   840
      Width           =   2895
      Begin VB.OptionButton Option7 
         Caption         =   "棋牌室"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   1800
         TabIndex        =   23
         Top             =   600
         Width           =   975
      End
      Begin VB.OptionButton Option6 
         Caption         =   "免费"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   960
         TabIndex        =   22
         Top             =   600
         Width           =   735
      End
      Begin VB.OptionButton Option5 
         Caption         =   "外卖"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   120
         TabIndex        =   21
         Top             =   600
         Width           =   735
      End
      Begin VB.OptionButton Option2 
         Caption         =   "女"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   960
         TabIndex        =   12
         Top             =   240
         Width           =   615
      End
      Begin VB.OptionButton Option1 
         Caption         =   "男"
         ForeColor       =   &H00FF0000&
         Height          =   180
         Left            =   120
         TabIndex        =   11
         Top             =   240
         Value           =   -1  'True
         Width           =   615
      End
   End
   Begin VB.TextBox Text3 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   375
      Left            =   3420
      TabIndex        =   9
      Top             =   2100
      Width           =   855
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   375
      Left            =   1020
      TabIndex        =   8
      Text            =   "Text1"
      Top             =   2100
      Width           =   855
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退  出"
      Height          =   495
      Left            =   6780
      TabIndex        =   3
      Top             =   4620
      Width           =   1335
   End
   Begin VB.CommandButton Cmdok 
      Caption         =   "确  定"
      Height          =   495
      Left            =   4860
      TabIndex        =   2
      Top             =   4620
      Width           =   1335
   End
   Begin VB.Line Line2 
      BorderColor     =   &H00808080&
      BorderWidth     =   2
      X1              =   0
      X2              =   8580
      Y1              =   1920
      Y2              =   1920
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00FFFFFF&
      BorderWidth     =   2
      X1              =   0
      X2              =   8580
      Y1              =   1950
      Y2              =   1950
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      Caption         =   "团体编号"
      ForeColor       =   &H00FF0000&
      Height          =   180
      Left            =   6780
      TabIndex        =   19
      Top             =   960
      Visible         =   0   'False
      Width           =   720
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      Caption         =   "备  注:"
      Height          =   180
      Left            =   240
      TabIndex        =   7
      Top             =   2640
      Width           =   720
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "日期:"
      Height          =   180
      Left            =   5280
      TabIndex        =   6
      Top             =   2190
      Width           =   540
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "押金:"
      Height          =   180
      Left            =   2940
      TabIndex        =   5
      Top             =   2190
      Width           =   540
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "手牌号:"
      Height          =   180
      Left            =   300
      TabIndex        =   4
      Top             =   2190
      Width           =   720
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "选择手牌号:"
      ForeColor       =   &H00FF0000&
      Height          =   180
      Left            =   5520
      TabIndex        =   1
      Top             =   960
      Width           =   1080
   End
   Begin VB.Line Line6 
      BorderColor     =   &H00FFFFFF&
      BorderWidth     =   2
      X1              =   0
      X2              =   8580
      Y1              =   4050
      Y2              =   4050
   End
   Begin VB.Line Line5 
      BorderColor     =   &H00808080&
      BorderWidth     =   2
      X1              =   0
      X2              =   8580
      Y1              =   4020
      Y2              =   4020
   End
   Begin VB.Line Line4 
      BorderColor     =   &H00FFFFFF&
      BorderWidth     =   2
      X1              =   0
      X2              =   8580
      Y1              =   810
      Y2              =   810
   End
   Begin VB.Line Line3 
      BorderColor     =   &H00808080&
      BorderWidth     =   2
      X1              =   0
      X2              =   8580
      Y1              =   780
      Y2              =   780
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "宾 客 开 单 录 入"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   315
      Left            =   2400
      TabIndex        =   0
      Top             =   180
      Width           =   2880
   End
End
Attribute VB_Name = "Frmstart"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmdok_Click()
vnow = Format(Now, "YYYY-MM-DD hh:mm:ss")
If Text1 = "" Then
  MsgBox "手牌号不能为空,请选择手牌号!"
  Text1 = ""
  Text1.SetFocus
Else
    Dim cmd1 As ADODB.Command
'    Dim rowschanged As String
    Set cmd1 = New ADODB.Command
    cmd1.ActiveConnection = "Provider=MSDASQL.1;Persist Security Info=False;Extended Properties='DSN=bgxy;Description=bgxy;APP=Visual Basic;WSID=HXZIYU;DATABASE=bg_xy;Trusted_Connection=Yes'"
    cmd1.CommandText = "update shpk set shpstate = '占用',yajin=" & Text3.Text & ",kdtime = '" & vnow & "',bzh='" & Text5.Text & "',maincode='" & Text6.Text & "' where shpcode = '" & Text1.Text & "'"
    cmd1.CommandType = adCmdText
    cmd1.Execute
'    cmd1.Execute rowschanged
    Adodc1.RecordSource = "Select * from shpk Where (shpstate = '可供') and (sex='男') order by shpcode"
    Adodc1.Refresh
    Frmstart.Refresh
    Text1 = "": Text3 = 0: Text4 = Now: Text5 = ""
  
  
End If
End Sub

Private Sub Command2_Click()
    On Error Resume Next
    Unload Me
    FrmMain.Show
End Sub

Private Sub DataCombo1_Click(Area As Integer)
    Text1 = DataCombo1.Text
    Text3 = 0: Text4 = Now: Text5 = ""
End Sub

Private Sub Form_Load()
'    Adodc1.DatabaseName = "Provider=MSDASQL.1;Persist Security Info=False;Extended Properties='DSN=bgxy;Description=bgxy;APP=Visual Basic;WSID=HXZIYU;DATABASE=bg_xy;Trusted_Connection=Yes'"
    Adodc1.RecordSource = "Select * from shpk Where (shpstate = '可供') and (sex='男') order by shpcode"
    Adodc1.Refresh
    Text1 = "": Text3 = 0: Text4 = Now: Text5 = ""
    Text6 = Format(Now, "yyyymmddhhmmss")
End Sub

Private Sub Form_LostFocus()
    FrmMain.Show
End Sub

Private Sub Option1_Click()
    Adodc1.RecordSource = "Select * from shpk Where (shpstate = '可供') and (sex='男') order by shpcode"
    Adodc1.Refresh
End Sub

Private Sub Option2_Click()
    Adodc1.RecordSource = "Select * from shpk Where (shpstate = '可供') and (sex='女') order by shpcode"
    Adodc1.Refresh
End Sub

Private Sub Option3_Click()
Label8.Visible = True
'Label9.Visible = True
Text6.Visible = True
'DataCombo2.Visible = True
'Text7 = Now
Text6 = Format(Now, "yyyymmddhhmmss")
End Sub

Private Sub Option4_Click()
Label8.Visible = True
'Label9.Visible = True
Text6.Visible = True
'DataCombo2.Visible = True
'Text7 = Now
Text6 = Format(Now, "yyyymmddhhmmss")
End Sub

Private Sub Option5_Click()
    Adodc1.RecordSource = "Select * from shpk Where (shpstate = '可供') and (sex='外') order by shpcode"
    Adodc1.Refresh
End Sub

Private Sub Option6_Click()
    Adodc1.RecordSource = "Select * from shpk Where (shpstate = '可供') and (sex='免') order by shpcode"
    Adodc1.Refresh
End Sub

Private Sub Option7_Click()
    Adodc1.RecordSource = "Select * from shpk Where (shpstate = '可供') and (sex='棋') order by shpcode"
    Adodc1.Refresh
End Sub

Private Sub Text3_LostFocus()
If Text3 = "" Then
  MsgBox "押金不能为空,没有押金请输 0 !"
  Text3 = 0
  Text3.SetFocus
End If
End Sub

⌨️ 快捷键说明

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