Tải bản đầy đủ (.pdf) (1,165 trang)

Xây dựng hệ phần mềm xử lý số liệu thuỷ văn vùng sông ảnh hưởng thuỷ triều HYDTID1 0 thuyết minh kỹ thuật hệ phần mềm xử lý số liệu thuỷ văn vùng sông ảnh hưởng triều hydtid1 0

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.91 MB, 1,165 trang )











































bộ tài nguyên và môi trờng
trung tâm khí tợng thuỷ văn quốc gia







chuyên đề 3
thuyết minh kỹ thuật hệ phần mềm xử
lý số liệu thuỷ văn vùng sông ảnh
hởng triều hydtid 1.0


Thuộc đề tài:
Xây dựng hệ phần mềm xử lý số liệu Thuỷ văn
vùng sông ảnh hởng thuỷ triều hydtid 1.0













7054-3
26/12/2008


hà nội 10-2007



mục lục
Trang

I Xây dựng giao diện chung chơng trình phần mềm
HYDTID 1.0 (XLSLTVVT)

1
II Xây dựng giao diện chung cho các chơng trình phần mềm
nhập và quản lý cọc và thuỷ chí

11
III Xây dựng giao diện cho các chơng trình phần mềm nhập

và quản lý nhiệt kế đo nhiệt độ nớc và nhiệt độ không khí
31
IV Xây dựng giao diện cho các chơng trình phần mềm nhập
và xử lý số liệu sổ đo sâu
64
V Xây dựng các chơng trình xử lý số liệu từ sổ gốc mực
nớc vùng không ảnh hởng triều
123
VI Xây dựng các chơng trình xử lý số liệu sổ gốc đo lu
lợng nớc và lu lợng chất lơ lửng
326
VII Xây dựng các chơng trình chỉnh biên lu lợng nớc 541
VIII Xây dựng chơng trình chỉnh biên lu lợng chất lơ lửng 852
IX Xây dựng chơng trình truyền số liệu thuỷ văn giữa các cơ
sở dữ liệu

989




1
Thuyết minh kỹ thuật
Hệ phần mềm xử lý số liệu Thuỷ văn vùng sông ảnh hởng thuỷ triều

Hệ chơng trình phần mềm dùng để xây dựng Hệ XLSL Thuỷ văn bao gồm 11 thành
phần chính sau:
I. Xây dựng giao diện chung chơng trình phần mềm HYDTID 1.0
II. Xây dựng giao diện cho các chơng trình phần mềm nhập và quản lý
cọc và thuỷ chí

III. Xây dựng các chơng trình xử lý số liệu từ sổ gốc mực nớc vùng sông
ảnh hởng triều
IV. Xây dựng giao diện cho các chơng trình phần mềm nhập và xử lý số
liệu sổ đo sâu thời kỳ ảnh hởng triều yếu
V. Xây dựng giao diện cho các chơng trình phần mềm nhập và xử lý số
liệu sổ đo sâu thời kỳ ảnh hởng triều mạnh
VI. Xây dựng các chơng trình xử lý số liệu từ sổ gốc đo đại biểu và đo chi
tiết
VII. Xây dựng các chơng trình xử lý số liệu từ sổ gốc đo lu lợng nớc và
lu lợng chất lơ lửng thời kỳ ảnh hởng triều yếu
VIII. Xây dựng chơng trình chỉnh biên lu lợng nớc thời kỳ ảnh hởng
triều mạnh
IX. Xây dựng chơng trình chỉnh biên lu lợng chất lơ lửng
X. Xây dựng chơng trình truyền số liệu thuỷ văn giữa các cơ sở dữ liệu
XI. Chơng trình trợ giúp XLSLTVVT
Sau đây là phần thuyết minh cho các thành phần của hệ phần mềm XLSLTVVT.
Mỗi một thành phần (giao diện) sẽ đợc trình bày 4 phần:
1. Chức năng nhiệm vụ của thành phần
2. Giao diện của thành phần
3. Mô tả các đối tợng với các thuộc tính (Properties) của chúng
4. Mô tả các chơng trình con có trong mỗi thành phần

I. Xây dựng giao diện chung chơng trình phần mềm HYDTID 1.0
(XLSLTVVT)
I.1 Chức năng nhiệm vụ của giao diện chung cho các chơng trình phần mềm
XLSLTVVT
Giao diện chung cho các chơng trình phần mềm XLSLTVVT có tên gọi là
MDIHYDTID có một loạt các (đối tợng) menu:
mnuSystem: Quản lý danh sách trạm, mã trạm, các yếu tố quan trắc
mnuDataProcessing: Dùng để vào các menu con XLSLTVVT

mnuStakes: Dùng để nhập và quản lý cọc và thuỷ chí
mnuCrossSectionProfileData: Dùng để nhập và xử lý số liệu sổ đo sâu

2
mnuWaterLevelMeasurementForTidalRegion: Dùng để nhập và xử lý số
liệu sổ đo mực nớc vùng ảnh hởng triều
mnuStrongAffectedTideFlow: Xử lý số liệu Q thời kỳ ảnh hởng triều mạnh
mnuTidCrossectionRatingTable: Khai toán diện tích mặt cắt ngang
mnuRepVelocityMeasurement: Đo vận tốc đại biểu và vận tốc chi tiết
mnuADCPdataEntry: Nhập số liệu thực đo Q bằng ADCP
mnuVmcVdbFitting: Xác định quan hệ Vmc=f(Vdb) và chỉnh biên Q
thời kỳ ảnh hởng triều mạnh
mnuWeakAffectedTideFlow: Xử lý số liệu Q thời kỳ ảnh hởng triều yếu
mnuFlowMeasurement: Dùng để nhập và xử lý số liệu đo lu lợng
mnuVelocityMeasurement: Dùng để nhập và xử lý số liệu đo vận tốc
mnuDischargeBook: Dùng để tính toán số liệu sổ đo lu lợng
mnuQRatingCurve: Dùng chỉnh biên tài liệu lu lợng nớc
mnuSedimentRatingCurve: Dùng chỉnh biên tài liệu lu lợng chât lơ lửng
mnuImportExportDataOfHydProcessing: Dùng Xuất/Nhập số liệu giữa các
CSDL
mnuHelp: Trợ giúp trực tuyến XLSLTVVT

Các Menu còn lại sẽ đợc dùng trong tơng lai.
I.2 Giao diện chung cho các ch
ơng trình phần mềm xử lý số liệu thuỷ văn


I.3 Mô tả các đối tợng với các Properties của Giao diện chung cho các chơng trình
phần mềm XLSLTVVT thuỷ văn ( Xem HYDTID 1.0). Sau đây là các th viện mà hệ
phần mềm đã sử dụng

Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0# \ \ \WINDOWS\system32\stdole2.tlb#OLE
Automation
Reference=*\G{56BF9020-7A2F-11D0-9482-
00A0C91110ED}#1.0#0# \ \ \WINDOWS\System32\MSBIND.DLL#Microsoft Data Binding Collection
Reference=*\G{00000200-0000-0010-8000-00AA006D2EA4}#2.0#0# \ \ \Program Files\Common
Files\System\ado\msado20.tlb#Microsoft ActiveX Data Objects 2.0 Library

3
Reference=*\G{6B263850-900B-11D0-9484-
00A0C91110ED}#1.0#0# \ \ \WINDOWS\System32\msstdfmt.dll#Microsoft Data Formatting Object Library
Reference=*\G{642AC760-AAB4-11D0-8494-
00A0C90DC8A9}#1.0#0# \ \ \WINDOWS\System32\MSDBRPTR.DLL#Microsoft Data Report Designer v6.0
Reference=*\G{BD96C556-65A3-11D0-983A-00C04FC29E30}#1.5#0# \ \ \Program Files\Common
Files\System\msadc\msadco.dll#Microsoft Remote Data Services 2.1 Library
Reference=*\G{00025E01-0000-0000-C000-000000000046}#5.0#0# \ \ \Program Files\Common Files\Microsoft
Shared\DAO\dao360.dll#Microsoft DAO 3.6 Object Library
Object={C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0; msmask32.ocx
Object={67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0; MSADODC.OCX
Object={65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0; MSCHRT20.OCX
Object={F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0; MSDATLST.OCX
Object={CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0; MSDATGRD.OCX
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; mscomctl.ocx
Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX
Object={3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0; richtx32.ocx
Object={00025600-0000-0000-C000-000000000046}#5.2#0; crystl32.ocx
Object={00028C01-0000-0000-0000-000000000046}#1.0#0; DBGRID32.OCX
Object={BB5C2B20-F30E-11D0-9DB6-00AA00A478BC}#3.0#0; mapx30.ocx
Form=HYDTID.frm

Module=Module1; TSSeries.bas
Form=Stakes.frm
Form=frmTinstrument.frm
Module=Module2; HAverage.bas
Form=frmDischargeBook.frm
Form=frmDailyData.frm
Form=frmQDischargeAndSediment.frm
Form=frmTSEntry.frm
Module=Module3; MathForHydpro.bas
Form=frmStationVarCharacteristics.frm
Form=frmQloopEntry.frm
Module=Module4; Printer.bas
Module=Module5; UserMSChart.bas
Form=frmStation.frm
Form=frmStdTSvar.frm
Module=Module6; Users.bas
Form=frmImportDataOfHydProcessing.frm
Form=frmComputSedimentLoad.frm
Form=frmVelocity.frm
Form=frmDataSummary.frm
Form=frmImportData.frm
Module=Module9; HydTidSystem.bas
Form=frmHYDTIDConnection.frm
Form=frmHydMeasurementReport.frm
Form=frmHTnTkkPmeasurement.frm
Form=vbgraph.Frm
Form=vbplot.frm
Form=vbtMultiScalegraph.frm
Module=Module8; dateconv.Bas
Module=Module10; Vbgraph.bas

Module=Module11; graphprinter.bas
Form=frmRDS.frm
Module=Module12; SPLREG.bas
Module=Module13; RatingFunc.bas
Form=frmUnitSediment.frm
Form=frmHydCharts.frm
Form=frmDocumentOfHydDataProcessing.frm
Form=frmMapOfStationNetwork.frm
Form=frmHTnTkkPEntry.frm

4
Form=frmHydSystemSetting.frm
Form=frmTimeGraphMonthSelect.frm
Form=frmSeriesStatistics.frm
Form=frmSplash.frm
Form=WaterLevelMeasurement.frm
Form=frmImportFromTextFile.frm
Form=frmExportToTextFile.frm
Form=frmDailyDataReport.frm
Form=frmComputQfronH.frm
Form=frmVmcRatingCurve.frm
Form=frmQRatingTable.frm
Form=FrmLogOn.frm
Form=vbtgraph.frm
Form=FrmHTnTkkPForTidalRegion.frm
Form=FrmHTnTkkPEntryForTidalRegion.frm
Form=frmRepresentativeVelocity.frm
Form=frmHydTimeSeriesGraph.frm
Form=frmCrossSection.frm
Module=Module7; CrossSection.bas

Form=frmTidCrossSection.frm
Form=frmSedimentRatingCurve.frm
Form=frmQRatingCurve.frm
Object={F6125AB1-8AB1-11CE-A77F-08002B2F4E98}#2.0#0; MSRDC20.OCX
IconForm="MDIHydTidDB"
Startup="Sub Main"
HelpFile=""
Title="HYDTIDDB"
ExeName32="HYDTID.exe"
Command32=""
Name="HydTid"
HelpContextID="0"
Description="HydrologicalData Processing and DataBase by LXC&LMH"
CompatibleMode="0"
MajorVer=1
MinorVer=1
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionComments="Ch−¬ng tr×nh xö lý sè liÖu thuû v¨n Hydtiddb 1.1.0"
VersionCompanyName="HMDC-Hydrological Divison"
VersionLegalCopyright="Cã b¶n quyÒn"
VersionProductName="HYDTID 1.0"
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0

FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1
DebugStartupOption=0

[MS Transaction Server]

5
AutoRefresh=1


C¸c ®èi t−îng vµ Properties cña HYDTID 1.0 ®−îc liÖt kª nh− sau:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.MDIForm MDIHydTidDB
BackColor = &H8000000C&
Caption = "Hydroprocessing and Database System For Tidal Region"
ClientHeight = 7455
ClientLeft = 165
ClientTop = 855
ClientWidth = 8820
LinkTopic = "MDIForm1"
StartUpPosition = 3 'Windows Default
Begin MSComctlLib.StatusBar HYdStatusBar
Align = 2 'Align Bottom

Height = 345
Left = 0
TabIndex = 0
Top = 7110
Width = 8820
_ExtentX = 15558
_ExtentY = 609
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 4
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 12348
MinWidth = 12348
Text = "Action"
TextSave = "Action"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 2646
MinWidth = 2646
Text = "RecNo"
TextSave = "RecNo"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 1411
MinWidth = 1411
Text = "Ready"
TextSave = "Ready"
EndProperty
BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5

Object.Width = 1411
MinWidth = 1411
Text = "Time"
TextSave = "15:42"
EndProperty
EndProperty
End
Begin VB.Menu mnuSystem
Caption = "System"
Begin VB.Menu mnuUserManager
Caption = "User Manager"
End

6
Begin VB.Menu mnuLogonServer
Caption = "Log in"
End
Begin VB.Menu mnuOpenDataBase
Caption = "Open DataBase"
End
Begin VB.Menu mnuDatabaseManager
Caption = "Database Manager"
Begin VB.Menu mnuStationCharacteristics
Caption = "Station Characteristics"
End
Begin VB.Menu mnuVarCharacteristics
Caption = "Variable Characteristics"
End
Begin VB.Menu mnuStationVarCharacteristics
Caption = "Station Variable Characteristics"

End
End
Begin VB.Menu mnuMapOfStationNetwork
Caption = "Map Of Station Network"
End
Begin VB.Menu mnuSetting
Caption = "Setting"
End
End
Begin VB.Menu mnuData
Caption = "Data"
Begin VB.Menu mnuCatchmentData
Caption = "Catchment Data"
End
Begin VB.Menu mnuHourlySeriesEntry
Caption = "Hourly Series Entry"
End
Begin VB.Menu HTnTkkP
Caption = "H_TnTkkP Entry"
Enabled = 0 'False
Visible = 0 'False
End
Begin VB.Menu HTnTkkPEntryForTidalRegion
Caption = "H_TnTkkP Entry For TidalRegion"
End
Begin VB.Menu mnuQDischargeAndSediment
Caption = "QDischarge And Sediment"
End
Begin VB.Menu mnuRatingTable
Caption = "Rating Table Entry"

End
Begin VB.Menu mnuQLoopEntry
Caption = "QLoop Entry"
End
Begin VB.Menu mnuUnitSediment
Caption = "Unit Sediment Entry"
End
Begin VB.Menu mnuDepthEntry
Caption = "Depth Entry"
End
Begin VB.Menu mnuTimeSeriesEntry
Caption = "Time Series Entry"
Begin VB.Menu mnuDailyseries

7
Caption = "Daily Series"
End
Begin VB.Menu mnuMonthlySeries
Caption = "Monthly Series"
End
Begin VB.Menu mnuYearlySeries
Caption = "Yearly Series"
End
End
Begin VB.Menu mnuStageDischargeTransformation
Caption = "Stage Discharge Transformation"
End
Begin VB.Menu mnuComputSedimentLoad
Caption = "Comput SedimentLoad"
Enabled = 0 'False

Visible = 0 'False
End
Begin VB.Menu mnuExportImportData
Caption = "Export/Import Data"
End
Begin VB.Menu mnuSaveToDatabase
Caption = "Save to Database"
End
End
Begin VB.Menu mnuDataProcessing
Caption = "DataProcessing"
Begin VB.Menu mnuStakes
Caption = "Stakes"
End
Begin VB.Menu mnuTinstrument
Caption = "Tinstrument"
End
Begin VB.Menu mnuCrossSectionProfileData
Caption = "CrossSection Profile "
End
Begin VB.Menu mnuHTnTkkPforTidalRegion
Caption = "HTnTkkP For TidalRegion"
Begin VB.Menu mnuEntryHTnTkkPforTidalRegion
Caption = "Entry HTnTkkP for TidalRegion "
End
Begin VB.Menu mnuDoubleEntryHTnTkkPforTidalRegion
Caption = "DoubleEntry HTnTkkP for TidalRegion "
End
Begin VB.Menu mnuComputHtbTntbTkktbPtbForTidalRegion
Caption = "Comput HtbTntbTkktbPtbForTidalRegion"

End
Begin VB.Menu mnuSelectHhourlyHpeakFoot
Caption = "Select HhourlyHpeakFoot"
End
End
Begin VB.Menu mnuWaterLevelMeasurement
Caption = "WaterLevel/Temprature/Rainfall Measurement"
Enabled = 0 'False
Visible = 0 'False
End
Begin VB.Menu mnuHTnTkkPMeasurement
Caption = "HTnTkkP Measurement"
Enabled = 0 'False
Visible = 0 'False

8
End
Begin VB.Menu mnuDepthMeasurement
Caption = "Depth Measurement"
End
Begin VB.Menu mnuStrongAffectedTideFlow
Caption = "StrongAffectedTideFlow"
Begin VB.Menu mnuTidCrossectionRatingTable
Caption = "Tide Crossection Rating Table"
End
Begin VB.Menu mnuRepVelocityMeasurement
Caption = "RepVelocityMeasurement"
End
Begin VB.Menu mnuADCPdataEntry
Caption = "ADCPdataEntry"

End
Begin VB.Menu mnuVmcVdbFitting
Caption = "Vmc= f(Vdb) fitting"
End
End
Begin VB.Menu mnuWeakAffectedTideFlow
Caption = "WeakAffectedTideFlow"
Begin VB.Menu mnuFlowMeasurement
Caption = "Flow Measurement"
Begin VB.Menu mnuVelocityMeasurement
Caption = "Velocity Measurement"
End
Begin VB.Menu mnuDischargeBook
Caption = "Discharge Book"
End
Begin VB.Menu mnuStageDischargeData
Caption = "Stage Discharge Data"
End
End
Begin VB.Menu mnuQDischargeAndSedimentData
Caption = "QDischarge And Sediment Data"
End
Begin VB.Menu mnuQRatingCurve
Caption = "Rating Curve"
End
Begin VB.Menu mnuEntryKT3Table
Caption = "Entry KT3 Table"
End
Begin VB.Menu mnuFloodData
Caption = "Flood Data"

End
End
Begin VB.Menu mnuExtrapolationOfRatingCurve
Caption = "Extrapolation Of RatingCurve"
End
Begin VB.Menu mnuSedimentRatingCurve
Caption = "Sediment RatingCurve And Comput R"
Begin VB.Menu mnuUnitSedimentData
Caption = "Unit Sediment Data"
End
Begin VB.Menu mnuFittingSedimentRatingCurve
Caption = "Fitting Sediment RatingCurve and Comput R"
End
End
Begin VB.Menu mnuImportExportDataofHydProcessing

9
Caption = "Import/Export Data of HydProcessing"
End
Begin VB.Menu mnuRemoteDatAccess
Caption = "Remote Data Access"
End
End
Begin VB.Menu mnuValidation
Caption = "Validation"
Begin VB.Menu mnuScreeningOfData
Caption = "Screening of Data"
Begin VB.Menu mnuListing
Caption = "Listing"
End

Begin VB.Menu mnutabulation
Caption = "Tabulation"
End
Begin VB.Menu mnuBasicStaticsAndOutliers
Caption = "Basic Statistics And Outliers"
End
Begin VB.Menu mnuComparisonTwoTimeSeries
Caption = "Comparison of Two TimeSeries"
End
Begin VB.Menu mnuLessOrGreater
Caption = "Less Or Greater"
End
End
Begin VB.Menu mnuLineGraph
Caption = "Line Graph"
Begin VB.Menu mnuTimeSeriesGrapth
Caption = "Time Series Graph"
End
Begin VB.Menu mnuResidualGrapth
Caption = "Residual"
End
End
Begin VB.Menu mnuScatterGraphServer
Caption = "Scatter Graph"
End
Begin VB.Menu mnuSeriesHomogeneityTest
Caption = "Series Homogeneity Test"
Begin VB.Menu mnuMeadianRunTest
Caption = "Meadian RunTest"
End

Begin VB.Menu mnuTurningPointTest
Caption = "Turning PointTest"
End
Begin VB.Menu mnuDifferenceSignTest
Caption = "Difference Sign Test"
End
Begin VB.Menu RankCorrelationTest
Caption = "Rank CorrelationTest"
End
Begin VB.Menu mnuRankTrendTest
Caption = "RankTrendTest"
End
Begin VB.Menu mnuSerialCorrelationCoefficient
Caption = "Serial Correlation Coefficient"
End
End

10
Begin VB.Menu mnuSpatialHomogeneityTest
Caption = "Spatial Homogeneity Test"
End
End
Begin VB.Menu mnuAnalysis
Caption = "Analysis"
Begin VB.Menu mnuGraph
Caption = "Graph"
Begin VB.Menu mnuTimeSeriesGraph
Caption = "Time Series Graph"
End
Begin VB.Menu mnuScatterGraph

Caption = "Scatter Graph"
End
Begin VB.Menu mnuCustomTimeSeries
Caption = "Custom Time Series"
End
End
Begin VB.Menu mnuInterpolation
Caption = "Interpolation"
End
Begin VB.Menu mnuRegression
Caption = "Regression"
End
Begin VB.Menu mnuAgr
Caption = "Agrre"
End
Begin VB.Menu mnuStatisticalAnalysis
Caption = "Statistical Analysis"
Begin VB.Menu mnuBasicStatistics
Caption = "BasicStatistics"
End
Begin VB.Menu mnuFittingDistribution
Caption = "Fitting Distribution"
End
End
Begin VB.Menu mnuTimeSeriesAnalysis
Caption = "Time Series Analysis"
End
End
Begin VB.Menu mnuReport
Caption = "Report"

Begin VB.Menu mnuHydDataBaseReport
Caption = "HydDataBaseReport"
Begin VB.Menu mnuRptDailyData
Caption = "Daily (Monthly) Data"
End
Begin VB.Menu mnuExportToTextFile
Caption = "Export To TextFile(time series: Hourly, Daily
)"
End
Begin VB.Menu mnuRptWaterDischargeAndSediment
Caption = "Water Discharge and Sediment"
End
Begin VB.Menu mnuRptRatingTable
Caption = "Rating Table"
End
End
Begin VB.Menu mnuDataSummary

11
Caption = "Data Summary"
End
Begin VB.Menu mnuStationVar
Caption = "Station Variable"
Begin VB.Menu mnuRptDailyWaterDischargeGraph
Caption = "Daily Water Discharge Graph"
End
Begin VB.Menu mnuRptConcentration
Caption = "Concentration"
End
End

Begin VB.Menu mnuHydProcessingReport
Caption = "HydProcessingReport"
Begin VB.Menu mnuHydMeasurementReport
Caption = "HydMeasurementReport"
End
Begin VB.Menu mnuYearlyHydProcessingReport
Caption = "YearlyHydProcessingReport"
Begin VB.Menu mnuRptStationSchema
Caption = "Station Schema"
End
Begin VB.Menu mnuRptYearlyHydrologicalDescription
Caption = "Yearly Hydrological Description"
End
Begin VB.Menu MnuAccumulation
Caption = "Accumulation Table"
End
End
Begin VB.Menu mnuDischargeAccumulation
Caption = "Discharge Accumulation "
End
End
End
Begin VB.Menu mnuTools
Caption = "Tools"
Begin VB.Menu mnuRainFallRunoff
Caption = "RainFall Runoff"
End
Begin VB.Menu mnuWaterBalance
Caption = "Water Balance"
End

End
Begin VB.Menu mnuWindows
Caption = "Windows"
WindowList = -1 'True
End
Begin VB.Menu mnuHelp
Caption = "Help"
Begin VB.Menu mnuHydtidProcessing
Caption = "HydtidProcessing"
End
End
End
Attribute VB_Name = "MDIHydTidDB"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

12
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias
"GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName
As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize
As Long, ByVal lpFileName As String) As Long


I. 4 M« t¶ c¸c ch−¬ng tr×nh con cã trong giao diÖn chÝnh
‘ Ch−¬ng tr×nh HTnTkkPEntryForTidalRegion nhËp mùc n−íc vïng triÒu

Private Sub HTnTkkPEntryForTidalRegion_Click()
FrmHTnTkkPEntryForTidalRegion.Show

End Sub

Private Sub MDIForm_Load()

Dim lpApplicationName As String
Dim lpKeyName As String
Dim lpDefault As String
Dim lpReturnedString As String
Dim nSize As Long
Dim lpFileName As String

On Error GoTo errHandler
'On Error Resume Next

' HYDSCATTERGRAPH
lpApplicationName = "HYDSCATTERGRAPH"
lpKeyName = "PrinterScatterDrawWidth"
lpDefault = "16"
nSize = 128
lpReturnedString = Space(128)
lpFileName = "c:\Users\cau\HYDTID\HYDTIDDB.ini"
iReturn = GetPrivateProfileString(lpApplicationName, lpKeyName, lpDefault,
lpReturnedString, nSize, lpFileName)
If iReturn > 0 Then
PrinterScatterDrawWidth = Val(Left(lpReturnedString, iReturn))
End If

lpApplicationName = "HYDTIMEGRAPH"
lpKeyName = "PrinterTimeDrawWidth"
lpDefault = "16"

nSize = 128
lpReturnedString = Space(128)
lpFileName = "c:\Users\cau\HYDTID\HYDTIDDB.ini"
iReturn = GetPrivateProfileString(lpApplicationName, lpKeyName, lpDefault,
lpReturnedString, nSize, lpFileName)
If iReturn > 0 Then
PrinterTimeDrawWidth = Val(Left(lpReturnedString, iReturn))
End If

If Not InitialHYDTIDPath Then
lpApplicationName = "HydPath"
lpKeyName = "HYDTIDPath"
lpDefault = "c:\Users\cau\HYDTID\HYDTIDDB.mdb"
nSize = 128
lpReturnedString = Space(128)
lpFileName = "c:\Users\cau\HYDTID\HYDTIDDB.ini"

13
iReturn = GetPrivateProfileString(lpApplicationName, lpKeyName, lpDefault,
lpReturnedString, nSize, lpFileName)
If iReturn > 0 Then
HYDTIDPath1 = Left(lpReturnedString, iReturn)
End If
' MDIHYDTIDDB.Caption = ""
msg1 = "Default HydDatabse: " & HYDTIDPath & Chr(13)
msg1 = msg1 & "Please check computer network " & Chr(13)
msg1 = msg1 & "Do you want to connect to network computer with " & Chr(13)
msg1 = msg1 & "Databse: " & HYDTIDPath1 & Chr(13)
iReturn1 = MsgBox(msg1, vbOKCancel)
If iReturn1 = 1 Then

frmHYDTIDConnection.Show
Else
MsgBox "You connect to " & HYDTIDPath
End If
End If


MDIHYDTIDDBCaption = "Hydroprocessing and Database System"
If Len(HydConnectionString) = 0 Then
MDIHydTidDB.Caption = MDIHYDTIDDBCaption & "-DataBase:
C:\Users\cau\HYDTID\HYDTIDDB.mdb"
Else
MDIHydTidDB.Caption = MDIHYDTIDDBCaption & "-DataBase: " & HYDTIDPath
End If

MDIHydTidDB.Height = Screen.Height - 1000
MDIHydTidDB.Width = Screen.Width - 400
MDIHydTidDB.Top = 200
MDIHydTidDB.Left = 200

MenuEnable AccessLevelOfUser

IsReplication = False

'IsSetCaptionFont = 1
'If IsSetCaptionFont = 1 Then SetCaptionFont Me

If IsSetVNCaptionFont = 1 Then SetVNCaptionFont Me, HydFontName, HydFontSize, 0

Exit Sub

errHandler:
MsgBox "Error with MDIHYDTIDDB :" & HydConnectionString & Chr(13) &
Err.Description
Unload Me
End Sub

‘ Modul frmQDischargeAndSediment nhËp Q vµ R thùc ®o

Private Sub mnuADCPdataEntry_Click()
frmQDischargeAndSediment.Show

End Sub

Private Sub mnuComputSedimentLoad_Click()
frmComputSedimentLoad.Show
End Sub


14
‘ Modul frmCrossSection nhËp, xö lý sè liÖu mÆt c¾t ngang

Private Sub mnuCrossSectionProfileData_Click()
frmCrossSection.Show
End Sub

Private Sub mnuDailyseries_Click()
frmDailyData.Show
End Sub

‘ Modul frmDataSummary tæng kÕt sè liÖu


Private Sub mnuDataSummary_Click()
frmDataSummary.Show
End Sub

Private Sub mnuDepthEntry_Click()
frmCrossSection.Show
End Sub

Private Sub mnuDepthMeasurement_Click()
frmCrossSection.Show

End Sub
‘ Modul frmDischargeBook tÝnh sæ gèc ®o Q

Private Sub mnuDischargeBook_Click()
frmDischargeBook.Show
End Sub
Private Sub mnuEntryHTnTkkPforTidalRegion_Click()
FrmHTnTkkPEntryForTidalRegion.Show

End Sub
‘ Modul frmQRatingTable nhËp KT2, KT3

Private Sub mnuEntryKT3Table_Click()
frmQRatingTable.Show
frmQRatingTable.Caption = " Entry KT2, KT3 Table"

End Sub
‘ Modul frmImportData xuÊt nhËp sè liÖu


Private Sub mnuExportImportData_Click()
frmImportData.Show
End Sub

‘ Modul frmExportToTextFile xuÊt sè liÖu ra file v¨n b¶n
Private Sub mnuExportToTextFile_Click()
frmExportToTextFile.Show
End Sub

Private Sub mnuFittingSedimentRatingCurve_Click()
frmSedimentRatingCurve.Show
End Sub

‘ Modul frmQLoopEntry nhËp sè liÖu trÝch lò


15
Private Sub mnuFloodData_Click()
frmQLoopEntry.Show
frmQLoopEntry.Caption = " Flood Data "
End Sub


Private Sub mnuHourlySeriesEntry_Click()
frmTSEntry.Show
End Sub

Private Sub mnuHydMeasurementReport_Click()
frmHydMeasurementReport.Show

End Sub
Modul frmImportDataOfHydProcessing nhập xuất số liệu XLSL

Private Sub mnuImportExportDataofHydProcessing_Click()
frmImportDataOfHydProcessing.Show
End Sub

Private Sub mnuLogonServer_Click()
FrmLogOn.Show

End Sub

Modul frmMapOfStationNetwork Bản đồ lới trạm dạng OLE

Private Sub mnuMapOfStationNetwork_Click()
frmMapOfStationNetwork.Show
End Sub

Private Sub mnuOpenDataBase_Click()
frmHYDTIDConnection.Show 'vbModal

End Sub

Private Sub mnuQDischargeAndSediment_Click()
frmQDischargeAndSediment.Show
End Sub

Private Sub mnuQDischargeAndSedimentData_Click()
frmQDischargeAndSediment.Show


' frmQDischargeAndSediment.Show
End Sub

Private Sub mnuQLoopEntry_Click()
frmQLoopEntry.Show
End Sub

Modul frmQRatingCurve Xác định Q=f(H) và chỉnh biên Q

Private Sub mnuQRatingCurve_Click()
frmQRatingCurve.Show
End Sub

Private Sub mnuRatingTable_Click()
frmQRatingTable.Show
End Sub

16

Private Sub mnuRemoteDatAccess_Click()
frmRDS.Show
End Sub

Modul frmRepresentativeVelocity nhập, tính Vdb, Vmc, chỉnh biên Q thời kỳ ảnh hởng
triều mạnh
Private Sub mnuRepVelocityMeasurement_Click()
frmRepresentativeVelocity.Show
End Sub

Private Sub mnuRptDailyData_Click()

frmDailyDataReport.Show
End Sub
Modul FrmHTnTkkPForTidalRegion chỉnh biên H

Private Sub mnuSelectHhourlyHpeakFoot_Click()
FrmHTnTkkPForTidalRegion.Show
End Sub

Private Sub mnuSetting_Click()
frmHydSystemSetting.Show
End Sub

Private Sub mnuStageDischargeData_Click()
'frmStageDischargeData.Show
frmQDischargeAndSediment.Show
End Sub

Private Sub mnuStageDischargeTransformation_Click()
frmComputQfromH.Show
End Sub
Modul frmStakes Quản lý cọc thuỷ chí

Private Sub mnuStakes_Click()
frmStakes.Show
End Sub
Modul FrmStation Quản lý mã trạm

Private Sub mnuStationCharacteristics_Click()
FrmStation.Show
End Sub


Private Sub mnuStationVarCharacteristics_Click()
FrmStationVarCharacteristics.Show
End Sub
Modul frmTidCrossSection Khai toán diện tích mặt cắt ngang

Private Sub mnuTidCrossectionRatingTable_Click()
frmTidCrossSection.Show
End Sub

Modul frmHydTimeSeriesGraph Vẽ đờng quá trình

Private Sub mnuTimeSeriesGraph_Click()
frmHydTimeSeriesGraph.Show
End Sub

17

Private Sub mnuTimeSeriesGrapth_Click()
frmHydTimeSeriesGraph.Show

End Sub

Modul frmUnitSediment Nhập hàm lợng chất lơ lửng đại biểu

Private Sub mnuUnitSediment_Click()
frmUnitSediment.Show
End Sub

Private Sub mnuUnitSedimentData_Click()

frmUnitSediment.Show
End Sub

Private Sub mnuVarCharacteristics_Click()
frmVariable.Show
End Sub

Modul frmVelocity Nhập V thuỷ trực

Private Sub mnuVelocityMeasurement_Click()
frmVelocity.Show
End Sub

Modul frmTidVmcRatingCurve Xác định Vmc, Vdb và chỉnh biên Q mùa ảnh hởng triều
mạnh

Private Sub mnuVmcVdbFitting_Click()
frmTidVmcRatingCurve.Show
End Sub


II. Xây dựng giao diện chung cho các chơng trình phần mềm nhập và quản lý
cọc và thuỷ chí
II.1 Chức năng nhiệm vụ các chơng trình nhập và quản lý cọc và thuỷ chí. Các
chơng trình nhập tên cọc và thuỷ chí, độ cao đầu cọc, thời đoạn sử dụng của cọc và
thuỷ chí
II.2 Giao diện các chơng trình phần mềm nhập và quản lý cọc và thuỷ chí


18




II.3 Mô tả các đối tợng với các Properties của giao diện các chơng trình phần mềm
nhập và quản lý cọc và thuỷ chí
VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmStakes
Caption = "Stakes"
ClientHeight = 4245
ClientLeft = 1110
ClientTop = 345
ClientWidth = 5745
KeyPreview = -1 'True
LinkTopic = "Form2"
ScaleHeight = 4245
ScaleWidth = 5745
Begin VB.PictureBox picButtons
Align = 2 'Align Bottom
Appearance = 0 'Flat
BorderStyle = 0 'None
ForeColor = &H80000008&

19
Height = 300
Left = 0
ScaleHeight = 300
ScaleWidth = 5745
TabIndex = 1

Top = 3615
Width = 5745
Begin VB.CommandButton cmdClose
Caption = "&Close"
Height = 300
Left = 4675
TabIndex = 6
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdRefresh
Caption = "&Refresh"
Height = 300
Left = 3521
TabIndex = 5
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdDelete
Caption = "&Delete"
Height = 300
Left = 2367
TabIndex = 4
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdUpdate
Caption = "&Update"
Height = 300
Left = 1213

TabIndex = 3
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdAdd
Caption = "&Add"
Height = 300
Left = 59
TabIndex = 2
Top = 0
Width = 1095
End
End
Begin MSAdodcLib.Adodc datPrimaryRS
Align = 2 'Align Bottom
Height = 330
Left = 0
Top = 3915
Width = 5745
_ExtentX = 10134
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1

20
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3

CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Users\Cau\HYDTID\HYDTIDDB.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Users\Cau\HYDTID\HYDTIDDB.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from HTnTkkP"
Caption = " "
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False

Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSDataGridLib.DataGrid grdDataGrid
Align = 1 'Align Top
Bindings = "frmStakes.frx":0000
Height = 3495
Left = 0
TabIndex = 0
Top = 0
Width = 5745
_ExtentX = 10134
_ExtentY = 6165
_Version = 393216
AllowUpdate = -1 'True
HeadLines = 1
RowHeight = 15
AllowAddNew = -1 'True
AllowDelete = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400

21
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False

EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 3081
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""

HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 3081
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
End
Attribute VB_Name = "frmStakes"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

II.4 Mô tả các chơng trình con có trong mỗi thành phần giao diện
các chơng trình
phần mềm nhập và quản lý cọc và thuỷ chí

22

Th«ng b¸o c¸c biÕn
Dim iCol, iRow As Integer

Dim StationID As String, StationName As String, RiverName As String
Dim CurrentMasterTable, CheckMasterTable As String
Dim CurrentDetailTable, CheckDetailTable As String
Dim DateOfStakesMeasurement As Date
Dim StartDateOfUse, EndDateOfUse As Date
Dim IsValidated As Boolean
Dim SketchYear As Integer

‘Ch−¬ng tr×nh truy cËp th«ng tin quan hÖ mét-nhiÒu cña b¶ng l−u th«ng tin cäc
Private Sub Adodc1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error,
adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
Dim StakeID As String

On Error Resume Next
If Len(Trim(CurrentDetailTable)) = 0 Then Exit Sub
With MaskEdBoxDateOfStakesMeasurement
.Mask = ""
.Text = ""
.Mask = "##/##/#### ##:##"
End With
With Adodc1
If .Recordset.RecordCount > 0 Then
tmpRec = .Recordset.RecordCount
If Not IsNull(.Recordset.Fields("StakeID")) And Not .Recordset.BOF And Not .Recordset.EOF Then
StakeID = .Recordset.Fields("StakeID")
DateOfStakesMeasurement = .Recordset.Fields("DateOfStakesMeasurement")
tmpdatestr = Trim(Str(DateOfStakesMeasurement))
If Len(tmpdatestr) = 10 Then
With MaskEdBoxDateOfStakesMeasurement
.Mask = "##/##/####"

.Text = tmpdatestr
End With
End If
If Len(tmpdatestr) >= 16 Then
tmpdatestr = Left(tmpdatestr, 16)
With MaskEdBoxDateOfStakesMeasurement
.Mask = "##/##/#### ##:##"
.Text = tmpdatestr
End With
End If
End If
.Caption = Str(.Recordset.AbsolutePosition) & "/" & Str(.Recordset.RecordCount)
Else
.Caption = "0/0"
End If
End With

'If tmpRec = 0 Then Exit Sub
strSQL = "Select * from " & CurrentDetailTable
strSQL = strSQL & " where stationID='" & StationID & "'"
strSQL = strSQL & " and StakeID='" & Trim(StakeID) & "'"
strSQL = strSQL & " Order by DateOfstakeIDUse"
Adodc2.RecordSource = strSQL
Adodc2.Refresh
With Adodc2
If .Recordset.RecordCount > 0 Then

23
.Caption = Str(.Recordset.AbsolutePosition) & "/" & Str(.Recordset.RecordCount)
Else

.Caption = "0/0"
End If
End With

With DataGrid1
.Columns(0).Visible = False
.Columns(9).Visible = False
' .Columns(10).Visible = False
.Columns(1).Width = 700
.Columns(2).Width = 700
.Columns(3).Width = 700
End With
End Sub

Chơng trình truy cập thông tin quan hệ một-nhiều của bảng lu thông tin cọc
Private Sub Adodc2_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error,
adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
With Adodc2
If .Recordset.RecordCount > 0 Then
.Caption = "Rec " & Str(.Recordset.AbsolutePosition) & "/" & Str(.Recordset.RecordCount)
End If
End With
End Sub

Chơng trình tạo bản ghi mới
Private Sub CmdAddNew_Click()
'On Error Resume Next
Adodc1.Recordset.AddNew
With MaskEdBoxDateOfStakesMeasurement
.Mask = ""

.Text = ""
.Mask = "##/##/#### ##:##"
.SetFocus
End With
End Sub

Chơng trình tạo sơ hoạ tuyến cọc
Private Sub cmdAddNewSketch_Click()
On Error Resume Next
With DataSketchOfStakesCrossSection.Recordset
.AddNew
End With

End Sub

Chơng trình thêm thời đoạn sử dụng đầu cọc mới
Private Sub cmdAddPeriod_Click()
On Error GoTo errHandler
StartDateOfUse = CDate(MaskEdBoxStartDateOfUse.Text)
EndDateOfUse = CDate(MaskEdBoxEndDateOfUse.Text)

With Adodc1.Recordset
If .BOF Or .EOF Then
MsgBox " This is Begin or End of Table"
GoTo errHandler
End If
End With

×