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

📄 frmmodifysell.frm

📁 管理房地产营运
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Index           =   0
         Left            =   240
         TabIndex        =   24
         Top             =   360
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "客户编号:"
         Height          =   180
         Index           =   1
         Left            =   4200
         TabIndex        =   23
         Top             =   480
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "楼层:"
         Height          =   180
         Index           =   2
         Left            =   4200
         TabIndex        =   22
         Top             =   1035
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "单元号:"
         Height          =   180
         Index           =   3
         Left            =   240
         TabIndex        =   21
         Top             =   1515
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "房间号:"
         Height          =   180
         Index           =   4
         Left            =   4200
         TabIndex        =   20
         Top             =   1590
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "房屋朝向:"
         Height          =   180
         Index           =   5
         Left            =   240
         TabIndex        =   19
         Top             =   2085
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "销售面积:"
         Height          =   180
         Index           =   6
         Left            =   4200
         TabIndex        =   18
         Top             =   2130
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "单价:"
         Height          =   180
         Index           =   7
         Left            =   240
         TabIndex        =   17
         Top             =   2670
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "总价:"
         Height          =   180
         Index           =   8
         Left            =   4200
         TabIndex        =   16
         Top             =   2685
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "已付金额:"
         Height          =   180
         Index           =   9
         Left            =   240
         TabIndex        =   15
         Top             =   3240
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "备注:"
         Height          =   180
         Index           =   10
         Left            =   4200
         TabIndex        =   14
         Top             =   3240
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "房型名称:"
         Height          =   180
         Index           =   11
         Left            =   240
         TabIndex        =   13
         Top             =   930
         Width           =   900
      End
   End
End
Attribute VB_Name = "frmModifySell"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim objSell As clsSell


Private Sub cancelCommand_Click()
 Unload Me
End Sub

Private Sub deleteCommand_Click()
 objSell.DelRecord
 Call viewData
End Sub

Private Sub editCommand_Click()
    objSell.EditRecord
    Frame2.Enabled = False
    firstCommand.Enabled = False
    previousCommand.Enabled = False
    nextCommand.Enabled = False
    lastCommand.Enabled = False
    Dim i As Integer
    For i = 1 To 11
        txtfields(i).Enabled = True
    Next
    txtfields(5).Enabled = False
End Sub



Private Sub Form_Load()
 
   Set objSell = New clsSell
   objSell.LoadRecord
   Call viewData
   Dim i As Integer
   For i = 0 To 11
     txtfields(i).Enabled = False
   Next
End Sub

Public Sub viewData()
   Dim i As Integer
   For i = 0 To 11
   txtfields(i).Text = objSell.mrc.Fields(i + 1)
   Next
End Sub
Private Sub firstCommand_Click()
   objSell.mrc.MoveFirst
    Call viewData
End Sub
Private Sub previousCommand_Click()
 objSell.mrc.MovePrevious
    If objSell.mrc.BOF Then
        objSell.mrc.MoveLast
    End If
    Call viewData
End Sub
Private Sub nextCommand_Click()
 objSell.mrc.MoveNext
    If objSell.mrc.EOF Then
        objSell.mrc.MoveFirst
    End If
    Call viewData
End Sub
Private Sub lastCommand_Click()
 objSell.mrc.MoveLast
    Call viewData
End Sub






Private Sub txtfields_LostFocus(Index As Integer)
Dim pTitle As String
pTitle = "信息框"

If Not IsNumeric(txtfields(3).Text) And (txtfields(3).Text <> "") Then
    MsgBox "请在“楼层”中输入数字", vbExclamation + vbOKOnly, pTitle
     txtfields(3).SetFocus
     txtfields(3).SelLength = Len(txtfields(3))
     txtfields(3).SelStart = 0
End If
If Not IsNumeric(txtfields(4).Text) And (txtfields(4).Text <> "") Then
    MsgBox "请在“单元号”中输入数字", vbExclamation + vbOKOnly, pTitle
     txtfields(4).SetFocus
     txtfields(4).SelLength = Len(txtfields(4))
     txtfields(4).SelStart = 0
End If
If Not IsNumeric(txtfields(5).Text) And (txtfields(5).Text <> "") Then
    MsgBox "请在“房间号”中输入数字", vbExclamation + vbOKOnly, pTitle
     txtfields(5).SetFocus
     txtfields(5).SelLength = Len(txtfields(5))
     txtfields(5).SelStart = 0
End If


If Not IsNumeric(txtfields(7).Text) And (txtfields(7).Text <> "") Then
    MsgBox "请在“销售面积”中输入数字", vbExclamation + vbOKOnly, pTitle
     txtfields(7).SetFocus
     txtfields(7).SelLength = Len(txtfields(7))
     txtfields(7).SelStart = 0
End If
If Not IsNumeric(txtfields(8).Text) And (txtfields(8).Text <> "") Then
    MsgBox "请在“单价”中输入数字", vbExclamation + vbOKOnly, pTitle
     txtfields(8).SetFocus
     txtfields(8).SelLength = Len(txtfields(8))
     txtfields(8).SelStart = 0
End If
If Not IsNumeric(txtfields(9).Text) And (txtfields(9).Text <> "") Then
    MsgBox "请在“总价”中输入数字", vbExclamation + vbOKOnly, pTitle
     txtfields(9).SetFocus
     txtfields(9).SelLength = Len(txtfields(9))
     txtfields(9).SelStart = 0
End If
If Not IsNumeric(txtfields(10).Text) And (txtfields(10).Text <> "") Then
    MsgBox "请在“已付金额”中输入数字", vbExclamation + vbOKOnly, pTitle
     txtfields(10).SetFocus
     txtfields(10).SelLength = Len(txtfields(10))
     txtfields(10).SelStart = 0
End If
End Sub

Private Sub updateCommand_Click()
    If Not Testtxt(txtfields(1).Text) Then
        MsgBox "请输入客户编号!", vbOKOnly + vbExclamation, "警告"
        txtfields(1).SetFocus
        Exit Sub
     End If
     If Not Testtxt(txtfields(2).Text) Then
        MsgBox "请输入房型名称!", vbOKOnly + vbExclamation, "警告"
        txtfields(2).SetFocus
        Exit Sub
    End If
    If Not Testtxt(txtfields(8).Text) Then
        MsgBox "请输入单价!", vbOKOnly + vbExclamation, "警告"
        txtfields(8).SetFocus
        Exit Sub
    End If
      If Not Testtxt(txtfields(9).Text) Then
        MsgBox "请输入总价!", vbOKOnly + vbExclamation, "警告"
        txtfields(9).SetFocus
        Exit Sub
    End If
      If Not Testtxt(txtfields(10).Text) Then
        MsgBox "请输入已付金额!", vbOKOnly + vbExclamation, "警告"
        txtfields(10).SetFocus
        Exit Sub
    End If
    Dim tempString(11) As String
    Dim i As Integer
    For i = 0 To 11
        tempString(i) = txtfields(i).Text
    Next i
    objSell.Update tempString
    Call viewData
    Frame2.Enabled = True
    firstCommand.Enabled = True
    previousCommand.Enabled = True
    nextCommand.Enabled = True
    lastCommand.Enabled = True
    For i = 0 To 11
        txtfields(i).Enabled = False
    Next
End Sub

⌨️ 快捷键说明

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