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

📄 tjzy.frm

📁 计件工资统计系统 我的毕业设计 包含论文
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form form_tjzy 
   Caption         =   "添加职员"
   ClientHeight    =   6255
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   8010
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   6255
   ScaleWidth      =   8010
   WindowState     =   2  'Maximized
   Begin VB.CommandButton Command2 
      Caption         =   "删除"
      Height          =   375
      Left            =   4080
      TabIndex        =   11
      Top             =   5760
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "修改"
      Height          =   375
      Left            =   2640
      TabIndex        =   10
      Top             =   5760
      Visible         =   0   'False
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   360
      TabIndex        =   5
      Top             =   5040
      Width           =   1335
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1920
      TabIndex        =   4
      Top             =   5040
      Width           =   1335
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   5040
      TabIndex        =   3
      Top             =   5040
      Width           =   1935
   End
   Begin VB.CommandButton button_add 
      Caption         =   "添加"
      Height          =   375
      Left            =   1320
      TabIndex        =   2
      Top             =   5760
      Width           =   975
   End
   Begin VB.ComboBox Combo_gx 
      Height          =   300
      Left            =   3480
      TabIndex        =   1
      Top             =   5040
      Width           =   1455
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "tjzy.frx":0000
      Height          =   4575
      Left            =   240
      TabIndex        =   0
      Top             =   0
      Width           =   7695
      _ExtentX        =   13573
      _ExtentY        =   8070
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   330
      Left            =   6840
      Top             =   1080
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _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=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 工序表"
      Caption         =   "Adodc2"
      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 MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   6840
      Top             =   1440
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   661
      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=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 职员表"
      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.Label Label1 
      Caption         =   "职员号"
      Height          =   255
      Left            =   360
      TabIndex        =   9
      Top             =   4680
      Width           =   735
   End
   Begin VB.Label Label2 
      Caption         =   "职员姓名"
      Height          =   255
      Left            =   2040
      TabIndex        =   8
      Top             =   4680
      Width           =   855
   End
   Begin VB.Label Label3 
      Caption         =   "备注"
      Height          =   255
      Left            =   5040
      TabIndex        =   7
      Top             =   4680
      Width           =   735
   End
   Begin VB.Label Label4 
      Caption         =   "工序"
      Height          =   255
      Left            =   3480
      TabIndex        =   6
      Top             =   4680
      Width           =   615
   End
End
Attribute VB_Name = "form_tjzy"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim gx() As String
Dim temp As Integer
Function panduan() As String
flag = 1
  If Text1.text = "" Then
   MsgBox "职员号不能为空"
   flag = 0
  End If
  If Text2.text = "" And flag = 1 Then
    MsgBox "职员姓名不能为空"
    flag = 0
  End If
  If Combo_gx.text = "" And flag = 1 Then
    MsgBox "工序不能为空"
    flag = 0
  End If
  panduan = flag
End Function

Private Sub button_add_Click()
'Dim temp As Integer
temp = Combo_gx.ListIndex + 1
If panduan() = 1 Then
  Adodc1.Refresh
  Adodc1.Recordset.Find ("职员号='" + Text1.text + "'")
  
  If Adodc1.Recordset.EOF Then
  Adodc1.Recordset.AddNew

  
  Adodc1.Recordset.Fields("职员号") = Text1.text
  Adodc1.Recordset.Fields("职员名") = Text2.text
  
  Adodc1.Recordset.Fields("工序号") = gx(1, temp)
  
  Adodc1.Recordset.Fields("备注") = Text3.text + " "
  Adodc1.Recordset.Update
  'MsgBox "职员信息添加成功"
  Text1.text = ""
  Text2.text = ""
  Combo_gx.text = ""
  Text3.text = ""
  Text1.SetFocus
Else
  MsgBox "该职员号已存在", vbInformation, "提示"
End If
  
End If
End Sub


Private Sub Command1_Click()
If Adodc1.Recordset.EOF = False And Adodc1.Recordset.BOF = False Then
 Text1.text = Adodc1.Recordset.Fields("职员号")
Combo_gx.text = Adodc1.Recordset.Fields("工序号")

Text3.text = Adodc1.Recordset.Fields("备注")
End If
End Sub

Private Sub Command2_Click()
If Adodc1.Recordset.EOF = False And Adodc1.Recordset.BOF = False Then
If MsgBox("真的要删除该记录吗", vbOKCancel + vbQuestion, "您将删除一条记录") = vbOK Then
    If MsgBox("删除该记录会删除该员工所有的工资信息,是否继续", vbYesNo + vbQuestion, "提示") = vbYes Then
      sql = "delete from 统计表 where 职员号='" & Adodc1.Recordset.Fields("职员号") + "'"
      delsql (sql)
      Adodc1.Recordset.Delete
      Adodc1.Refresh
    End If
End If
End If
Adodc1.Refresh
End Sub

Private Sub Form_Load()
Adodc2.Refresh
Dim cout As Integer
cout = Adodc2.Recordset.RecordCount
ReDim gx(2, cout)
  For I = 1 To cout
    gx(1, I) = Adodc2.Recordset.Fields("工序号")
    gx(2, I) = Adodc2.Recordset.Fields("工序名")
    Adodc2.Recordset.MoveNext
  Next
  
  For I = 1 To cout
    Combo_gx.AddItem (gx(2, I))
    
  Next
End Sub

Private Sub Form_Resize()
DataGrid1.Width = Me.Width - DataGrid1.Left * 2
End Sub

⌨️ 快捷键说明

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