曝光臺 注意防騙
網曝天貓店富美金盛家居專營店坑蒙拐騙欺詐消費者
Exit Sub
End If
If Not IsDate(Trim(DataGrid1.Columns("值班截止時間").CellText(DataGrid1.Bookmark))) Then
MsgBox "請按照格式hh-mm 輸入值班截止時間", vbOKOnly + vbExclamation, ""
Exit Sub
End If
If Trim(DataGrid1.Columns("值班人").CellText(DataGrid1.Bookmark)) = "" Then
MsgBox "值班人不能為空!", vbOKOnly + vbExclamation, ""
Exit Sub
End If
rs_zhiban.Update
MsgBox "添加信息成功!", vbOKOnly + vbExclamation, ""
DataGrid1.AllowAddNew = False
DataGrid1.AllowUpdate = False
Else
MsgBox "沒有添加信息!", vbOKOnly + vbExclamation, ""
End If
cmdadd.Caption = "新增記錄"
cmddel.Enabled = True
End If
adderror:
If Err.Number <> 0 Then
MsgBox Err.Description
End If
End Sub
Private Sub cmdcancel_Click()
Unload Me
MDIForm1.Show
End Sub
Private Sub cmddel_Click()
Dim answer As String
On Error GoTo delerror
answer = MsgBox("確定要刪除嗎?", vbYesNo, "")
If answer = vbYes Then
DataGrid1.AllowDelete = True
rs_zhiban.Delete
rs_zhiban.Update
DataGrid1.Refresh
MsgBox "成功刪除!", vbOKOnly + vbExclamation, ""
DataGrid1.AllowDelete = False
Else
Exit Sub
End If
delerror:
If Err.Number <> 0 Then
MsgBox Err.Description
End If
End Sub
Private Sub Form_Load()
Dim sql As String
On Error GoTo loaderror
sql = "select * from 值班管理"
rs_zhiban.CursorLocation = adUseClient
rs_zhiban.Open sql, conn, adOpenKeyset, adLockPessimistic ' 打開數據庫
' 設定DataGrid 控件屬性
DataGrid1.AllowAddNew = False ' 不可增加
DataGrid1.AllowDelete = False ' 不可刪除
DataGrid1.AllowUpdate = False
Set DataGrid1.DataSource = rs_zhiban
Exit Sub
loaderror:
MsgBox Err.Description
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set DataGrid1.DataSource = Nothing
rs_zhiban.Close
End Sub
(8) 投訴管理子窗體代碼
投訴管理子窗體是為了對人員進行更好的管理而設置的,可以向其添加投訴的對象、時間和內容等。
投訴管理運行后的子窗體如圖45 所示。
圖45 運行的投訴管理子窗體
以下為窗體的代碼:
Private Sub Command1_Click()
On Error GoTo adderr
Text1.SetFocus
Adodc1.Recordset.AddNew
Exit Sub
adderr:
MsgBox Err.Description
End Sub
Private Sub Command2_Click()
On Error GoTo deleteerr
With Adodc1.Recordset
If Not .EOF And Not .BOF Then
If MsgBox("刪除當前記錄嗎?", vbYesNo + vbQuestion) = vbYes Then
.Delete
.MoveNext
If .EOF Then .MoveLast
End If
End If
End With
Exit Sub
deleteerr:
MsgBox Err.Description
End Sub
Private Sub Command3_Click()
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then
MsgBox "這是第一條記錄", vbOKCancel + vbQuestion
Adodc1.Recordset.MoveFirst
End If
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
MsgBox "這是最后一條記錄", vbOKCancel + vbQuestion
Adodc1.Recordset.MoveLast
End If
End Sub
Private Sub Command5_Click()
If Adodc1.Recordset.EOF Then
MsgBox "記錄空", vbOKCancel + vbQuestion
End
Else
Adodc1.Recordset.MoveFirst
End If
Exit Sub
End Sub
Private Sub Command6_Click()
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "空記錄", vbOKCancel + vbQuestion
End
Else
Adodc1.Recordset.MoveLast
End If
End Sub
Private Sub Command7_Click()
MDIForm1.Show
frmtousu.Hide
End Sub
到這里,各個窗體的界面和代碼都介紹完了。發布后可以作為一個實際的項目應用。
Digital trends are impacting airline
distribution in both China and the world
影響中國和全球航空業營銷渠道的數字化浪潮
Speaker:Fritz Demopoulos, CEO & Co-founder, Qunar.com
“去哪兒”網公司首席執行官和合伙創始人戴福瑞
Digital platforms present the aviation
industry with huge opportunities
數字化平臺給航空業帶來巨大機遇
Platform 平臺Millions 百
萬
Penetration 滲透
率Mobile Subscribers手機用戶700 51%
Internet Users互聯網用戶384 29%
Broadband Users寬帶用戶320 24%
Personal Blogs個人博客180 13%
Mobile Internet Users移動互聯網用戶160 12%
Online Shoppers網上購物用戶90 6%
Source: CNNIC, July 2009; Internet World Stats, January 2010
We’ve only just started
There is significant room for growth.
我們才剛起步,仍擁有巨大的增長空間
中國航空網 www.k6050.com
航空翻譯 www.aviation.cn
本文鏈接地址:
航空講座1(37)