www.pudn.com > Pepsi_five.rar > FrmOtherSql.frm
VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form FrmOtherSql
Caption = "其它入库单查询(已过帐)"
ClientHeight = 6900
ClientLeft = 60
ClientTop = 345
ClientWidth = 7725
ForeColor = &H00000000&
Icon = "FrmOtherSql.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 6900
ScaleWidth = 7725
Begin VB.Frame Frame2
Height = 3900
Left = 0
TabIndex = 5
Top = 2940
Width = 7695
Begin MSDataListLib.DataCombo DCboOtRid
Bindings = "FrmOtherSql.frx":0442
DataField = "other_rid"
DataMember = "ComOtHB"
DataSource = "DEjxc"
Height = 330
Left = 945
TabIndex = 21
Top = 720
Width = 1815
_ExtentX = 3201
_ExtentY = 582
_Version = 393216
Enabled = 0 'False
Style = 2
ListField = "department_name"
BoundColumn = "department_id"
Text = ""
Object.DataMember = "ComDepartment"
End
Begin MSDataListLib.DataCombo DCboOtherType
Bindings = "FrmOtherSql.frx":045E
DataField = "other_type_id"
DataMember = "ComOtHB"
DataSource = "DEjxc"
Height = 330
Left = 960
TabIndex = 20
Top = 270
Width = 1575
_ExtentX = 2778
_ExtentY = 582
_Version = 393216
Enabled = 0 'False
Style = 2
ListField = "type_name"
BoundColumn = "type_id"
Text = ""
Object.DataMember = "ComOrderType"
End
Begin VB.TextBox txtother_demo
DataField = "other_demo"
DataMember = "ComOtHB"
DataSource = "DEjxc"
Enabled = 0 'False
Height = 330
Left = 4980
TabIndex = 19
Top = 720
Width = 2535
End
Begin VB.TextBox txtother_car
DataField = "other_car"
DataMember = "ComOtHB"
DataSource = "DEjxc"
Enabled = 0 'False
Height = 330
Left = 3345
TabIndex = 17
Top = 720
Width = 1050
End
Begin VB.TextBox txtother_maker
DataField = "other_maker"
DataMember = "ComOtHB"
DataSource = "DEjxc"
Enabled = 0 'False
Height = 330
Left = 6825
TabIndex = 15
Top = 270
Width = 660
End
Begin VB.TextBox txtother_date
DataField = "other_date"
DataMember = "ComOtHB"
DataSource = "DEjxc"
Enabled = 0 'False
Height = 330
Left = 5025
TabIndex = 11
Top = 270
Width = 1020
End
Begin VB.TextBox txtother_id
DataField = "other_id"
DataMember = "ComOtHB"
DataSource = "DEjxc"
Enabled = 0 'False
Height = 330
Left = 3465
TabIndex = 9
Top = 270
Width = 945
End
Begin VB.TextBox Txtgrid2
Height = 270
Left = 1200
TabIndex = 7
Top = 2100
Visible = 0 'False
Width = 1215
End
Begin MSDataGridLib.DataGrid DataGrid2
Bindings = "FrmOtherSql.frx":047A
Height = 2295
Left = 420
TabIndex = 6
Top = 1260
Width = 6855
_ExtentX = 12091
_ExtentY = 4048
_Version = 393216
AllowUpdate = 0 'False
Enabled = -1 'True
HeadLines = 1
RowHeight = 17
FormatLocked = -1 'True
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
DataMember = "ComOrdDB"
ColumnCount = 5
BeginProperty Column00
DataField = "order_id"
Caption = "order_id"
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 = "p_id"
Caption = "物品编号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "qty"
Caption = "数量"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 1
Format = "#,##0.0000"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "unit_price"
Caption = "单价"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 1
Format = "0.00"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "price"
Caption = "金额"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 1
Format = "#,##0.00"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnAllowSizing= 0 'False
Object.Visible = 0 'False
ColumnWidth = 1275.024
EndProperty
BeginProperty Column01
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 1184.882
EndProperty
BeginProperty Column02
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 1800
EndProperty
BeginProperty Column03
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 1500.095
EndProperty
BeginProperty Column04
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 1800
EndProperty
EndProperty
End
Begin VB.Label LblStatus
BorderStyle = 1 'Fixed Single
ForeColor = &H00FF0000&
Height = 255
Left = 420
TabIndex = 22
Top = 3600
Width = 6855
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "备注:"
Height = 180
Index = 6
Left = 4485
TabIndex = 18
Top = 795
Width = 450
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "车号:"
Height = 180
Index = 5
Left = 2865
TabIndex = 16
Top = 795
Width = 450
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "制单人:"
Height = 180
Index = 4
Left = 6165
TabIndex = 14
Top = 375
Width = 630
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "对方单位:"
Height = 180
Index = 3
Left = 105
TabIndex = 13
Top = 795
Width = 810
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "单据类型:"
Height = 180
Index = 2
Left = 120
TabIndex = 12
Top = 375
Width = 810
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "日期:"
Height = 180
Index = 1
Left = 4545
TabIndex = 10
Top = 360
Width = 450
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "单据编号:"
Height = 180
Index = 0
Left = 2625
TabIndex = 8
Top = 375
Width = 810
End
End
Begin VB.Frame Frame1
Height = 2955
Left = 0
TabIndex = 0
Top = -60
Width = 7695
Begin VB.CommandButton CmdDep
Caption = "退出(&X)"
Height = 315
Index = 2
Left = 6360
TabIndex = 4
Top = 2280
Width = 1275
End
Begin VB.CommandButton CmdDep
Caption = "列表(&P)"
Height = 315
Index = 1
Left = 6360
TabIndex = 3
Top = 1335
Width = 1275
End
Begin VB.CommandButton CmdDep
Caption = "查询(&F)"
Height = 315
Index = 0
Left = 6360
TabIndex = 2
Top = 360
Width = 1275
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "FrmOtherSql.frx":048E
Height = 2655
Left = 60
TabIndex = 1
Top = 180
Width = 6255
_ExtentX = 11033
_ExtentY = 4683
_Version = 393216
AllowUpdate = 0 'False
AllowArrows = -1 'True
HeadLines = 1
RowHeight = 15
TabAcrossSplits = -1 'True
TabAction = 2
WrapCellPointer = -1 'True
FormatLocked = -1 'True
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
DataMember = "ComOtHB"
ColumnCount = 7
BeginProperty Column00
DataField = "other_id"
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 = "other_date"
Caption = "日期"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "other_type_id"
Caption = "单据类型"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "other_rid"
Caption = "对方单位"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "other_maker"
Caption = "制单人"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column05
DataField = "other_car"
Caption = "车号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column06
DataField = "other_demo"
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
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 854.929
EndProperty
BeginProperty Column01
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 794.835
EndProperty
BeginProperty Column02
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 794.835
EndProperty
BeginProperty Column03
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 794.835
EndProperty
BeginProperty Column04
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 599.811
EndProperty
BeginProperty Column05
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 900.284
EndProperty
BeginProperty Column06
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 1200.189
EndProperty
EndProperty
End
End
End
Attribute VB_Name = "FrmOtherSql"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private rsOtHB As ADODB.Recordset
Private rsOrdDB As ADODB.Recordset
Private cmOtHB As ADODB.Command
Private strMaxNum As String
Private Sub CmdDep_Click(Index As Integer)
Dim intAnswer As Integer
Dim strSQL As String
Select Case Index
Case 0
FrmSql.intNumField = 7
FrmSql.Show vbModal
Select Case FrmSql.intNumField
Case -1
rsOtHB.Filter = Me.DataGrid1.Columns.Item(0).DataField & _
"<>''"
rsOrdDB.Filter = "order_id ='" & Me.txtother_id.Text & "'"
Case -2
Case Else
rsOtHB.Filter = Me.DataGrid1.Columns.Item(FrmSql.intNumField).DataField & _
" like '*" & FrmSql.strSqlField & "*'"
rsOrdDB.Filter = "order_id ='" & Me.txtother_id.Text & "'"
End Select
Case 1
Case 2
Unload Me
End Select
End Sub
Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
rsOrdDB.Filter = "order_id ='" & Me.txtother_id.Text & "'"
End Sub
Private Sub DataGrid2_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
If CmdDep(0).Enabled = True Then
LblStatus.Caption = Product_Status(DataGrid2.Columns(1).Text)
End If
End Sub
Private Sub Form_Load()
intNumWindows = OpenWindow(intNumWindows)
Me.Height = 7305
Me.Width = 7845
Call SetFormStu(Me, frmMain)
Set rsOtHB = DEjxc.rsComOtHB
Set rsOrdDB = DEjxc.rsComOrdDB
Set cmOtHB = New ADODB.Command
cmOtHB.ActiveConnection = DEjxc.Conjxc
cmOtHB.CommandType = adCmdText
rsOrdDB.Filter = "order_id ='" & Me.txtother_id.Text & "'"
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If CmdDep(2).Enabled = False Then
MsgBox "请先退出编辑状态后再退出该程序!", , "提示"
Cancel = True
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
intNumWindows = Closewindow(intNumWindows)
rsOtHB.Close
rsOrdDB.Close
Set rsOtHB = Nothing
Set rsOrdDB = Nothing
Set cmOtHB = Nothing
End Sub