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

📄 form59.frm

📁 办公自动化 vb+server2
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      BackStyle       =   0  'Transparent
      Caption         =   "姓名:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   960
      TabIndex        =   20
      Top             =   120
      Width           =   615
   End
   Begin VB.Label Label15 
      BackStyle       =   0  'Transparent
      Caption         =   "工程名称:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   720
      TabIndex        =   19
      Top             =   840
      Width           =   975
   End
   Begin VB.Label Label7 
      BackStyle       =   0  'Transparent
      Caption         =   "结算额:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   6720
      TabIndex        =   18
      Top             =   480
      Width           =   855
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "欠款额:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   6720
      TabIndex        =   17
      Top             =   840
      Width           =   735
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "进款额:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   840
      TabIndex        =   16
      Top             =   1920
      Width           =   735
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "合同额:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   840
      TabIndex        =   15
      Top             =   1560
      Width           =   735
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "系数:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   6720
      TabIndex        =   14
      Top             =   120
      Width           =   855
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "建设单位:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   720
      TabIndex        =   13
      Top             =   1200
      Width           =   975
   End
   Begin VB.Label Label1 
      BackColor       =   &H8000000B&
      BackStyle       =   0  'Transparent
      Caption         =   "工程编号:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   720
      TabIndex        =   12
      Top             =   480
      Width           =   975
   End
   Begin VB.Line Line2 
      X1              =   120
      X2              =   11880
      Y1              =   -120
      Y2              =   -120
   End
   Begin VB.Line Line1 
      X1              =   120
      X2              =   11880
      Y1              =   360
      Y2              =   360
   End
   Begin VB.Line Line3 
      X1              =   120
      X2              =   11880
      Y1              =   720
      Y2              =   720
   End
   Begin VB.Line Line4 
      X1              =   120
      X2              =   11880
      Y1              =   1080
      Y2              =   1080
   End
   Begin VB.Line Line5 
      X1              =   120
      X2              =   11880
      Y1              =   1440
      Y2              =   1440
   End
   Begin VB.Line Line6 
      X1              =   120
      X2              =   11880
      Y1              =   1800
      Y2              =   1800
   End
   Begin VB.Line Line7 
      X1              =   120
      X2              =   11880
      Y1              =   2160
      Y2              =   2160
   End
   Begin VB.Line Line8 
      X1              =   11880
      X2              =   11880
      Y1              =   2160
      Y2              =   0
   End
   Begin VB.Line Line10 
      X1              =   120
      X2              =   120
      Y1              =   2160
      Y2              =   0
   End
   Begin VB.Line Line11 
      X1              =   120
      X2              =   11880
      Y1              =   0
      Y2              =   0
   End
End
Attribute VB_Name = "Form59"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim i, m, n, o, l, j, r As Integer
Dim g
Dim da As Date
For i = 1 To 10
    If Text1(i) = "" Then
       Text1(i) = 0
    End If
Next
hzrs.CursorLocation = adUseClient
hzrs.Open "select * from 经营人员结算单", hzconn, adOpenKeyset, adLockPessimistic
    

  For r = 1 To hzrs.RecordCount
     g = hzrs.Fields(2).Value
     If Form59.Text1(2).Text = g Then
     For j = 1 To 7
        Text1(j).Text = ""
     Next
     Text1(10).Text = ""
       ln = MsgBox("工程编号已存在,请重新输入!", vbInformation, "提示")
        hzrs.Close
       Exit Sub
       End If
       hzrs.MoveNext
   Next
  If Form59.Text1(2).Text = "0" Then
     For j = 1 To 7
        Text1(j).Text = ""
     Next
     Text1(10).Text = ""
     ln = MsgBox("工程编号不能为空,请重新输入!", vbInformation, "提示")
        hzrs.Close
       Exit Sub
  End If
With hzrs
     .AddNew
     .Fields(1) = Combo1.Text
     For m = 2 To 6
     .Fields(m) = Text1(m - 1).Text
     Next
     .Fields(7) = Combo2.Text
     .Fields(8) = Text1(6).Text
     .Fields(9) = Text1(7).Text
     .Fields(10) = Text1(8).Text
     .Fields(11) = Text1(9).Text
     .Fields(12) = Text1(10).Text
     .Fields(13) = "0"
     .Fields(14) = "0"
     .Fields(15) = "0"
     .Fields(16) = "0"
End With
   hzrs.Update
   hzrs.Close
   
  Form59.ListView1.ListItems.Clear
    hzrs.CursorLocation = adUseClient
    hzrs.Open "select * from 经营人员结算单 order by ID", hzconn, adOpenKeyset, adLockPessimistic
     For o = 1 To hzrs.RecordCount
               l = l + 1
                Form59.ListView1.ListItems.Add , , hzrs.Fields(1).Value
             For m = 2 To 12
                 Form59.ListView1.ListItems.Item(o).SubItems(m - 1) = hzrs.Fields(m).Value
             Next
              hzrs.MoveNext
     Next
    hzrs.Close
If l > 0 Then
 Form59.ListView1.ListItems(Form59.ListView1.ListItems.Count).Selected = True
 Form59.ListView1.SelectedItem.EnsureVisible
 Form59.ListView1.Refresh
End If
da = Date
     For j = 1 To 7
        Text1(j).Text = ""
     Next
     Text1(8).Text = username
     Text1(9).Text = da
     Text1(10).Text = ""

End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim da As Date
Dim i, j, l, m, o As Integer
With Me
    .Height = 8010
    .left = 2332
    .top = 2600
    .Width = 12160
End With

With Combo1
   .AddItem ("李成军") 'Form8.Combo1.AddItem (rs.Fields(i).Name)
   .AddItem ("李右新")
   .AddItem ("张文玉")
   .AddItem ("韩成武")
   .AddItem ("付波")
   .AddItem ("其他")
End With
With Combo2
   .AddItem ("0.08") 'Form8.Combo1.AddItem (rs.Fields(i).Name)
   .AddItem ("0.09")
End With
da = Date
Form59.Text1(8).Text = username
Form59.Text1(9).Text = da
  Form59.ListView1.ListItems.Clear
    hzrs.CursorLocation = adUseClient
    hzrs.Open "select * from 经营人员结算单 order by ID", hzconn, adOpenKeyset, adLockPessimistic
     For o = 1 To hzrs.RecordCount
               l = l + 1
                Form59.ListView1.ListItems.Add , , hzrs.Fields(1).Value
             For m = 2 To 12
                 Form59.ListView1.ListItems.Item(o).SubItems(m - 1) = hzrs.Fields(m).Value
             Next
              hzrs.MoveNext
     Next
    hzrs.Close
If l > 0 Then
 Form59.ListView1.ListItems(Form59.ListView1.ListItems.Count).Selected = True
 Form59.ListView1.SelectedItem.EnsureVisible
 Form59.ListView1.Refresh
End If
End Sub
Private Sub Timer1_Timer()
Dim i, j, l, m As Integer
Dim a As String
For i = 4 To 7
 If Text1(i).Text = "" Then
   ll(i) = 0
 Else
   ll(i) = Val(Text1(i).Text)
 End If
Next


   Text1(6).Text = Val(ll(5)) * Val(Combo2.Text)
   If Text1(6).Text = 0 Then
      Text1(6).Text = ""
   End If
   
   Text1(7).Text = Val(ll(4)) - Val(ll(5))
   If Text1(7).Text = 0 Then
      Text1(7).Text = ""
   End If
 End Sub

⌨️ 快捷键说明

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