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

📄 frm_fxzl.frm

📁 房地产管理系统 对房地产的销售做日常的管理维护等
💻 FRM
📖 第 1 页 / 共 4 页
字号:
                    Else
                    End If
                Text3(0).Text = ""
                Text3(0).SetFocus
                Else
                End If
           i = i + 1
           Loop
          If Text3(0).Text = "" Then
          Text3(0).SetFocus
          Else
          Text4(0).SetFocus
          End If
      End If
Else
End If
End Sub

Private Sub Text4_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
  Dim StrInput, temp As String
  Dim i, Length As Integer
  i = 1
  StrInput = Text4(0).Text
  Length = Len(StrInput)
         If Text4(0).Text = "" Then
         MsgBox "输入不能为空", , "提示"
         Text4(0).SetFocus
         Else
            Do While (i <= Length)
            temp = Mid$(StrInput, i, 1)
                If Asc(temp) < 48 Or Asc(temp) > 57 Then
                    If i = 1 Then
                    MsgBox "输入数据非法!!", , "提示"
                    Else
                    End If
                Text4(0).Text = ""
                Text4(0).SetFocus
                Else
                End If
           i = i + 1
           Loop
          If Text4(0).Text = "" Then
          Text4(0).SetFocus
          Else
          Text5(0).SetFocus
          End If
      End If
Else
End If
End Sub

Private Sub Text5_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
frm_FJXS.Label1 = 1
frm_FJXS.Show
frm_FJXS.Left = 3345
frm_FJXS.Top = 2300
Else
End If
End Sub

Private Sub Text6_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
  Dim StrInput, temp As String
  Dim i, Length As Integer
  i = 1
  StrInput = Text6(0).Text
  Length = Len(StrInput)
         If Text6(0).Text = "" Then
         MsgBox "输入不能为空", , "提示"
         Text6(0).SetFocus
         Else
            Do While (i <= Length)
            temp = Mid$(StrInput, i, 1)
                If Asc(temp) < 48 Or Asc(temp) > 57 Then
                    If i = 1 Then
                    MsgBox "输入数据非法!!", , "提示"
                    Else
                    End If
                Text6(0).Text = ""
                Text6(0).SetFocus
                Else
                End If
           i = i + 1
           Loop
          If Text6(0).Text = "" Then
          Text6(0).SetFocus
          Else
          Text7(0).SetFocus
          End If
      End If
Else
End If
End Sub

Private Sub Text7_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
  Dim StrInput, temp As String
  Dim i, Length As Integer
  i = 1
  StrInput = Text7(0).Text
  Length = Len(StrInput)
         If Text7(0).Text = "" Then
         MsgBox "输入不能为空", , "提示"
         Text7(0).SetFocus
         Else
            Do While (i <= Length)
            temp = Mid$(StrInput, i, 1)
                If Asc(temp) < 48 Or Asc(temp) > 57 Then
                    If i = 1 Then
                    MsgBox "输入数据非法!!", , "提示"
                    Else
                    End If
                Text7(0).Text = ""
                Text7(0).SetFocus
                Else
                End If
           i = i + 1
           Loop
          If Text7(0).Text = "" Then
          Text7(0).SetFocus
          Else
          Text8(0).SetFocus
          End If
      End If
Else
End If
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Set adoCon = New ADODB.Connection
adoCon.Open "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm"

Select Case Button.Index
Case 1
Frame1.Visible = True
Frame2.Visible = False
Text1(0).Locked = False
Text2(0).Locked = False
Text3(0).Locked = False
Text4(0).Locked = False
Text5(0).Locked = False
Text6(0).Locked = False
Text7(0).Locked = False
Text8(0).Locked = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = True
Toolbar1.Buttons(6).Enabled = False
Toolbar1.Buttons(7).Enabled = False
Toolbar1.Buttons(8).Enabled = False
Toolbar1.Buttons(9).Enabled = True
Text1(0).SetFocus
Case 2
Frame1.Visible = True
Frame2.Visible = False
Text1(0).Locked = False
Text2(0).Locked = False
Text3(0).Locked = False
Text4(0).Locked = False
Text5(0).Locked = False
Text6(0).Locked = False
Text7(0).Locked = False
Text8(0).Locked = False
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = True
Toolbar1.Buttons(6).Enabled = False
Toolbar1.Buttons(7).Enabled = False
Toolbar1.Buttons(8).Enabled = False
Toolbar1.Buttons(9).Enabled = True
Text1(0).SetFocus
Case 3
If SSTab1.Tab = 0 Then
Frame1.Visible = False
Frame2.Visible = True

If Adodc1.Recordset.EOF = False Then
Dim c
c = MsgBox("您确认要删除该记录吗?", 17, "房地产销售管理系统")
If c = vbOK Then
Adodc1.Recordset.Delete
Adodc1.Refresh
Else
End If
Else
  MsgBox "当前数据库中已经无记录可删除!!", 32, "房地产销售管理系统"
End If
ElseIf SSTab1.Tab = 1 Then
'Adodc1.Recordset.Fields("房型图片").Value = ""
 'MsgBox "图片以删除?", 17, "房地产销售管理系统"
End If
Case 4
If SSTab1.Tab = 0 Then
If Toolbar1.Buttons(1).Enabled = True Then
Adodc1.RecordSource = "select * from Table_FXXX order by ID"
Adodc1.Refresh
 If Adodc1.Recordset.RecordCount > 0 Then
 Text9.Text = Val(Adodc1.Recordset.Fields(0)) + 1
 Set adoRs = adoCon.Execute("insert into Table_FXXX values(" & Text9 & ",'" & Text1(0) & "','" & Text2(0) & "','" & Text3(0) & "','" & Text4(0) & "','" & Text5(0) & "','" & Text6(0) & "','" & Text7(0) & "','" & Text10 & "','" & Text8(0) & "')")
 MsgBox "数据保存成功!!", , "房地产销售管理系统"
 Adodc1.Refresh
 End If
Frame1.Visible = False
Frame2.Visible = True
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = False
Toolbar1.Buttons(6).Enabled = True
Toolbar1.Buttons(7).Enabled = False
Toolbar1.Buttons(8).Enabled = True
Toolbar1.Buttons(9).Enabled = True
ElseIf Toolbar1.Buttons(1).Enabled = False Then
Adodc1.Recordset.Delete
Adodc1.Refresh
Set adoRs = adoCon.Execute("insert into Table_FXXX values(" & Text9 & ",'" & Text1(0) & "','" & Text2(0) & "','" & Text3(0) & "','" & Text4(0) & "','" & Text5(0) & "','" & Text6(0) & "','" & Text7(0) & "','" & Text10 & "','" & Text8(0) & "')")
MsgBox "数据修改成功!!", , "房地产销售管理系统"
Adodc1.RecordSource = "select * from Table_FXXX "
Adodc1.Refresh
Frame1.Visible = False
Frame2.Visible = True
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = False
Toolbar1.Buttons(6).Enabled = True
Toolbar1.Buttons(7).Enabled = False
Toolbar1.Buttons(8).Enabled = True
Toolbar1.Buttons(9).Enabled = True
Else
End If
      ElseIf SSTab1.Tab = 1 Then
  If mystr <> "" Then
     Set Cn = New ADODB.Connection
     Cn.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm;Initial Catalog=Data_FDCGLXT"
     Cn.Open
     Set Rs = New ADODB.Recordset
     Adodc1.RecordSource = "select * from Table_FXXX where 房型名称='" + Text1(1) + "'"
     Adodc1.Refresh
     Set mst = New ADODB.Stream
     mst.Type = adTypeBinary
     mst.Open
     mst.LoadFromFile mystr
     Adodc1.Recordset.Fields("房型图片").Value = mst.Read
     Adodc1.Recordset.Update
     MsgBox "图片保存成功!", 64, "房地产销售管理系统"
     Unload Me
     frm_FXZL.Refresh
     Adodc1.Refresh
     frm_FXZL.Show
     frm_FXZL.Height = 7530
     frm_FXZL.Width = 10680
     frm_FXZL.Left = 630
     frm_FXZL.Top = 30
     'Adodc1.RecordSource = "select * from Table_FXXX "
     'Adodc1.Refresh
  Else
     MsgBox ("请先选择图片!")
  End If
Else
End If
Case 5
Frame1.Visible = False
Frame2.Visible = True
Text1(0).Text = ""
Text2(0).Text = ""
Text3(0).Text = ""
Text4(0).Text = ""
Text5(0).Text = ""
Text6(0).Text = ""
Text7(0).Text = ""
Text8(0).Text = ""
frm_FXZL.Toolbar1.Buttons(1).Enabled = True
frm_FXZL.Toolbar1.Buttons(2).Enabled = True
frm_FXZL.Toolbar1.Buttons(3).Enabled = True
frm_FXZL.Toolbar1.Buttons(4).Enabled = False
frm_FXZL.Toolbar1.Buttons(5).Enabled = False
frm_FXZL.Toolbar1.Buttons(6).Enabled = True
frm_FXZL.Toolbar1.Buttons(7).Enabled = False
frm_FXZL.Toolbar1.Buttons(8).Enabled = True
frm_FXZL.Toolbar1.Buttons(9).Enabled = True
Adodc1.RecordSource = "select * from Table_FXXX "
Adodc1.Refresh
Case 6
frm_FXZL.Hide
frm_FXCX.Show
Case 7
  CommonDialog1.Filter = "bmp|*.jpg;*.bmp;*.gif"
  CommonDialog1.FilterIndex = 2
  ' 显示"打开"对话框
  CommonDialog1.ShowOpen
  Picture1.Picture = LoadPicture(CommonDialog1.FileName)
  mystr = CommonDialog1.FileName
Toolbar1.Buttons(4).Enabled = True
Case 8
DataEnvironment1.rsCommand8.Open "select * from Table_FXXX "
 If DataEnvironment1.rsCommand8.RecordCount > 0 Then
 Data_FXZL.Show
 Else
   MsgBox "此设备编号不存在,请确认后重新输入"
 DataEnvironment1.rsCommand8.Close
 End If

Case 9
Unload Me
MDI_main.Toolbar1.Visible = True
End Select
End Sub

Private Sub zj_Click()
Frame1.Visible = True
Frame2.Visible = False
Text1(0).Locked = False
Text2(0).Locked = False
Text3(0).Locked = False
Text4(0).Locked = False
Text5(0).Locked = False
Text6(0).Locked = False
Text7(0).Locked = False
Text8(0).Locked = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = True
Toolbar1.Buttons(6).Enabled = False
Toolbar1.Buttons(7).Enabled = False
Toolbar1.Buttons(8).Enabled = False
Toolbar1.Buttons(9).Enabled = True
Text1(0).SetFocus
End Sub

⌨️ 快捷键说明

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