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

📄 frmprojedit.frm

📁 Visual Basic + Oracle 9i数据库应用系统开发与实例《小区物业管理系统》,界面还行
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmProjEdit 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "编辑小区工程信息"
   ClientHeight    =   3990
   ClientLeft      =   45
   ClientTop       =   345
   ClientWidth     =   6510
   Icon            =   "FrmProjEdit.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3990
   ScaleWidth      =   6510
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmd_Cancel 
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   400
      Left            =   3685
      MouseIcon       =   "FrmProjEdit.frx":0CCA
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   3360
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_OK 
      Caption         =   "确 定"
      Height          =   400
      Left            =   1525
      MouseIcon       =   "FrmProjEdit.frx":0FD4
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   3360
      Width           =   1300
   End
   Begin VB.Frame Frame1 
      Height          =   3015
      Left            =   360
      TabIndex        =   9
      Top             =   120
      Width           =   5895
      Begin VB.TextBox txtMaterialfee 
         Height          =   270
         Left            =   4080
         MaxLength       =   20
         TabIndex        =   6
         Top             =   2520
         Width           =   1575
      End
      Begin VB.TextBox txtWorkfee 
         Height          =   270
         Left            =   1200
         MaxLength       =   200
         TabIndex        =   5
         Top             =   2520
         Width           =   1575
      End
      Begin VB.TextBox txtOrg 
         Height          =   270
         Left            =   1200
         MaxLength       =   100
         TabIndex        =   1
         Top             =   645
         Width           =   4455
      End
      Begin VB.TextBox txtEnd 
         Height          =   270
         Left            =   4080
         MaxLength       =   10
         TabIndex        =   3
         Top             =   1095
         Width           =   1575
      End
      Begin VB.TextBox txtStart 
         Height          =   270
         Left            =   1200
         MaxLength       =   10
         TabIndex        =   2
         Top             =   1095
         Width           =   1575
      End
      Begin VB.TextBox txtName 
         Height          =   270
         Left            =   1200
         MaxLength       =   100
         TabIndex        =   0
         Top             =   210
         Width           =   4455
      End
      Begin VB.TextBox txtDescribe 
         Height          =   735
         Left            =   1200
         MaxLength       =   100
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   4
         Top             =   1560
         Width           =   4455
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "材料费用"
         Height          =   180
         Left            =   3120
         TabIndex        =   16
         Top             =   2565
         Width           =   720
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "施工费用"
         Height          =   180
         Left            =   240
         TabIndex        =   15
         Top             =   2565
         Width           =   720
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "施工单位"
         Height          =   180
         Left            =   240
         TabIndex        =   14
         Top             =   690
         Width           =   720
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "完工日期"
         Height          =   180
         Left            =   3120
         TabIndex        =   13
         Top             =   1140
         Width           =   720
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "开工日期"
         Height          =   180
         Left            =   240
         TabIndex        =   12
         Top             =   1140
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "工程名称"
         Height          =   180
         Left            =   240
         TabIndex        =   11
         Top             =   240
         Width           =   720
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "备注信息"
         Height          =   180
         Left            =   240
         TabIndex        =   10
         Top             =   1590
         Width           =   720
      End
   End
End
Attribute VB_Name = "FrmProjEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriId As Long
Public OriName As String

Private Function Check() As Boolean
  If Trim(txtName) = "" Then
    MsgBox "请输入工程名称"
    txtName.SetFocus
    Check = False
    Exit Function
  End If
  
  Check = True
End Function

Private Sub Cmd_OK_Click()
  If Check = False Then
    Exit Sub
  End If
  
  With MyProj
  .ProjName = MakeStr(txtName)
  .ProjOrg = MakeStr(txtOrg)
  .StartDate = MakeStr(txtStart)
  .EndDate = MakeStr(txtEnd)
  .ProjMemo = MakeStr(txtDescribe)
  .Workfee = Val(txtWorkfee)
  .Materialfee = Val(txtMaterialfee)
  
  '判断项目名称是否存在
  If Modify = False Or OriName <> Trim(txtName) Then
    If .In_DB(MakeStr(txtName)) = True Then
      MsgBox "项目名称已经存在,请重新输入"
      txtName.SetFocus
      txtName.SelStart = 0
      txtName.SelLength = Len(txtName)
      Exit Sub
    End If
  End If
  If Modify = False Then
    .Insert
  Else
    .Update (OriId)
  End If
    
  End With
  Unload Me
End Sub

Private Sub Cmd_Cancel_Click()
  Unload Me
End Sub

Private Sub txtDescribe_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtEnd_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtMaterialfee_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
  If In_Single(KeyAscii) = False Then
    KeyAscii = 0
  End If
End Sub

Private Sub txtName_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtOrg_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtStart_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtWorkfee_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
  If In_Single(KeyAscii) = False Then
    KeyAscii = 0
  End If
End Sub

⌨️ 快捷键说明

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