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

📄 tuanduibaozhang1.frm

📁 本系统以VB为开发工具
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form tuanduibaozhang1 
   Caption         =   "团队报账"
   ClientHeight    =   6645
   ClientLeft      =   60
   ClientTop       =   465
   ClientWidth     =   10230
   LinkTopic       =   "Form1"
   ScaleHeight     =   6645
   ScaleWidth      =   10230
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   1920
      TabIndex        =   15
      Top             =   2760
      Width           =   1575
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   1920
      TabIndex        =   14
      Top             =   840
      Width           =   1575
   End
   Begin MSComCtl2.DTPicker DTPicker1 
      Height          =   375
      Left            =   5280
      TabIndex        =   12
      Top             =   960
      Width           =   2295
      _ExtentX        =   4048
      _ExtentY        =   661
      _Version        =   393216
      Format          =   57671681
      CurrentDate     =   39224
   End
   Begin VB.TextBox Text6 
      Height          =   735
      Left            =   4680
      TabIndex        =   11
      Top             =   3600
      Width           =   2775
   End
   Begin VB.CommandButton Command2 
      BackColor       =   &H0000FFFF&
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   5280
      Style           =   1  'Graphical
      TabIndex        =   9
      Top             =   5040
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H0000FFFF&
      Caption         =   "保存"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   2280
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   5040
      Width           =   1335
   End
   Begin VB.TextBox Text5 
      Height          =   375
      Left            =   1920
      TabIndex        =   7
      Top             =   3720
      Width           =   1575
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   5280
      TabIndex        =   4
      Top             =   1680
      Width           =   2295
   End
   Begin VB.TextBox Text2 
      Height          =   390
      Left            =   1920
      Locked          =   -1  'True
      TabIndex        =   1
      Top             =   1680
      Width           =   1575
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "此处只能输入数字"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   3720
      TabIndex        =   16
      Top             =   2880
      Width           =   2175
   End
   Begin VB.Label Label8 
      BackStyle       =   0  'Transparent
      Caption         =   "备注"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   3840
      TabIndex        =   13
      Top             =   3720
      Width           =   495
   End
   Begin VB.Label Label7 
      BackStyle       =   0  'Transparent
      Caption         =   "经办人"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   600
      TabIndex        =   10
      Top             =   3840
      Width           =   735
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "团队最终收入"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   240
      TabIndex        =   6
      Top             =   2880
      Width           =   1575
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "折扣"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   4320
      TabIndex        =   5
      Top             =   1680
      Width           =   495
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "团队收款金额"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   480
      TabIndex        =   3
      Top             =   1800
      Width           =   1095
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "日期"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   4320
      TabIndex        =   2
      Top             =   960
      Width           =   495
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "团队编号"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   480
      TabIndex        =   0
      Top             =   840
      Width           =   975
   End
End
Attribute VB_Name = "tuanduibaozhang1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public rs As New ADODB.Connection, cn As New ADODB.Connection

Private Sub Combo1_Click()
Dim r As New ADODB.Recordset
r.Open "select shoukuanjine from tuanduibaozhang where tuanduibianhao='" & Combo1.Text & "'", cn, adOpenStatic
 Text2.Text = r.Fields(0).Value
 
End Sub

Private Sub Command2_Click()
Unload Me
mainfrm.Show
End Sub

Private Sub Form_Load()
cn.ConnectionString = "Driver={SQL Server};SERVER=DDK;DATABASE=lvxingshe"
cn.Open
  Dim s As New ADODB.Recordset
  Dim i As Integer
  i = 0
  s.Open "select tuanduibianhao from tuanduibaozhang", cn, adOpenStatic
  Do Until s.EOF
    Combo1.AddItem s("tuanduibianhao").Value, i
    s.MoveNext
    i = i + 1
 Loop
 DTPicker1.Value = Format(Now(), "yyyy-mm-dd")
'MsgBox "连接成功"
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Error Resume Next
    rs.Close
    Set rs = Nothing
    cn.Close
    Set cn = Nothing
End Sub
Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii < 48 And KeyAscii <> 8 Or KeyAscii > 57 Then KeyAscii = 0
End Sub
Private Sub Command1_Click()
If Combo1.Text = "" Then
   MsgBox "请选择团队编号", vbOKOnly, 提示
  

ElseIf Text4.Text = "" Then
   MsgBox "请输入团队最终收入", vbOKOnly, 提示
   Text4.SetFocus
   Exit Sub

ElseIf Text5.Text = "" Then
   MsgBox "请输入经办人姓名", vbOKOnly, 提示
   Text5.SetFocus
   Exit Sub
Else
     cn.Execute "update tuanduibaozhang set riqi='" & DTPicker1.Value & "',zhekou='" & Text3.Text & "',tuanduizuizhongshouru='" & Text4.Text & "',jingbanren='" & Text5.Text & "',beizhu='" & Text6.Text & "'where tuanduibianhao='" & Combo1.Text & "'"
      cn.Execute "insert into caiwushouzhi values('" & DTPicker1.Value & "','收入','团队报账','" & Text4.Text & "','" & Text6.Text & "','" & Text5.Text & "')"
      MsgBox "已成功保存", vbOKOnly, 提示
  End If
  
End Sub

⌨️ 快捷键说明

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