📄 frm通信运行.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
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 frm通信运行
Caption = "Form1"
ClientHeight = 5430
ClientLeft = 60
ClientTop = 345
ClientWidth = 8340
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 5430
ScaleWidth = 8340
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 3600
TabIndex = 13
Top = 4800
Width = 1215
End
Begin VB.TextBox Text4
BackColor = &H00C0C0C0&
Height = 375
Left = 7200
TabIndex = 11
Top = 610
Width = 850
End
Begin VB.TextBox Text3
BackColor = &H00C0C0C0&
Height = 375
Left = 5160
TabIndex = 9
Top = 610
Width = 850
End
Begin VB.TextBox Text2
BackColor = &H00C0C0C0&
Height = 375
Left = 3120
TabIndex = 7
Top = 610
Width = 850
End
Begin VB.TextBox Text1
BackColor = &H00C0C0C0&
Height = 375
Left = 1080
TabIndex = 5
Top = 610
Width = 850
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1320
TabIndex = 3
Text = "Combo1"
Top = 80
Width = 1215
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 6000
TabIndex = 0
Top = 40
Width = 1455
_ExtentX = 2566
_ExtentY = 661
_Version = 393216
CustomFormat = "yyyy-MM"
Format = 61145091
UpDown = -1 'True
CurrentDate = 37918
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "frm通信运行.frx":0000
Height = 3495
Left = 0
TabIndex = 12
Top = 1215
Width = 8295
_ExtentX = 14631
_ExtentY = 6165
_Version = 393216
BackColor = 8454016
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
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 = 2052
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 = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 3480
Top = 2400
Width = 1455
_ExtentX = 2566
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
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 = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label6
Caption = "运行率"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 6240
TabIndex = 10
Top = 700
Width = 735
End
Begin VB.Label Label5
Caption = "平均时间"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 4200
TabIndex = 8
Top = 705
Width = 855
End
Begin VB.Label Label4
Caption = "故障时间"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 2160
TabIndex = 6
Top = 705
Width = 855
End
Begin VB.Label Label3
Caption = "考核数量"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 4
Top = 705
Width = 855
End
Begin VB.Label Label2
Caption = "名 称"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 2
Top = 130
Width = 735
End
Begin VB.Label Label1
Caption = "月 份"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 4680
TabIndex = 1
Top = 130
Width = 735
End
End
Attribute VB_Name = "frm通信运行"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error Resume Next
Call Open_link
sql1 = "select * from xdgl_ddyb_txyx where rq='" & DTPicker1.Value & "' and mc='" & Trim(Combo1.Text) & "'"
Set RS = ZHCX.Execute(sql1, 0)
If RS.EOF Then
sql1 = "insert xdgl_ddyb_txyx (rq,mc,khsl,gzsj,pjgzsj,yxl) values('" & DTPicker1.Value & "','" & Trim(Combo1.Text) & "','" & Trim(Text1.Text) & "'," & Trim(Text2.Text) & "," & Trim(Text3.Text) & "," & Trim(Text4.Text) & ")"
Else
sql1 = "update xdgl_ddyb_txyx set mc='" & Trim(Combo1.Text) & "',khsj=" & Text1.Text & ",gzsj=" & Text2.Text & ",pjgzsj=" & Text3.Text & ",yxl=" & Text4.Text & " where rq='" & DTPicker1.Value & "' and mc='" & Trim(Combo1.Text) & "'"
End If
If RS.State Then
RS.Close
End If
Set RS = ZHCX.Execute(sql1, 0)
If RS.State Then
RS.Close
End If
Call Close_link
Adodc1.Refresh
Call sx
End Sub
Private Sub DTPicker1_Change()
Adodc1.RecordSource = "select * from xdgl_ddyb_txyx where rq='" & DTPicker1.Value & "' "
Adodc1.Refresh
Call sx
End Sub
Private Sub DTPicker1_Click()
Adodc1.RecordSource = "select * from xdgl_ddyb_txyx where rq='" & DTPicker1.Value & "' "
Adodc1.Refresh
Call sx
End Sub
Private Sub Form_Load()
On Error Resume Next
DTPicker1.Value = Format(Now, "yyyy-mm-01")
Adodc1.ConnectionString = "PROVIDER=MSDASQL;dsn=ddmis;uid=mis;pwd=mis005;database=zhcx"
Adodc1.RecordSource = "SELECT * FROM XDGL_DDYB_TXYX where rq='" & DTPicker1.Value & "' "
Combo1.AddItem "光纤"
Combo1.AddItem "载波"
Combo1.AddItem "总机"
Combo1.AddItem "微波"
Combo1.Text = ""
Adodc1.Refresh
Call sx
End Sub
Sub sx()
DataGrid1.Columns(0).Visible = False
DataGrid1.Columns(1).Caption = " 名 称"
DataGrid1.Columns(1).Width = 1300
DataGrid1.Columns(2).Caption = " 考核数量"
DataGrid1.Columns(2).Width = 1300
DataGrid1.Columns(3).Caption = " 故障时间"
DataGrid1.Columns(3).Width = 1300
DataGrid1.Columns(4).Caption = " 平均故障时间"
DataGrid1.Columns(4).Width = 1300
DataGrid1.Columns(5).Caption = " 运行率"
DataGrid1.Columns(5).Width = 1300
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -