www.pudn.com > jxc001.rar > FrmSaleSql.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 FrmSaleSql
Caption = "出库单查询(已过帐)"
ClientHeight = 7110
ClientLeft = 60
ClientTop = 345
ClientWidth = 7725
Icon = "FrmSaleSql.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 7110
ScaleWidth = 7725
Begin VB.Frame Frame2
Height = 4140
Left = 0
TabIndex = 5
Top = 2940
Width = 7695
Begin MSDataListLib.DataCombo DCboSaUser
Bindings = "FrmSaleSql.frx":0442
DataField = "sale_user"
DataMember = "ComSaleHB"
DataSource = "DEjxc"
Height = 330
Left = 6300
TabIndex = 23
Top = 660
Width = 1155
_ExtentX = 2037
_ExtentY = 582
_Version = 393216
Enabled = 0 'False
MatchEntry = -1 'True
ListField = "employee_name"
BoundColumn = "employee_id"
Text = ""
Object.DataMember = "ComEmployee"
End
Begin MSDataListLib.DataCombo DCboSaRid
Bindings = "FrmSaleSql.frx":0460
DataField = "sale_rid"
DataMember = "ComSaleHB"
DataSource = "DEjxc"
Height = 330
Left = 1020
TabIndex = 22
Top = 660
Width = 2415
_ExtentX = 4260
_ExtentY = 582
_Version = 393216
Enabled = 0 'False
Style = 2
ListField = "department_name"
BoundColumn = "department_id"
Text = ""
Object.DataMember = "ComDepartment"
End
Begin MSDataListLib.DataCombo DCboSaleType
Bindings = "FrmSaleSql.frx":047E
DataField = "sale_type_id"
DataMember = "ComSaleHB"
DataSource = "DEjxc"
Height = 330
Left = 1020
TabIndex = 21
Top = 240
Width = 1515
_ExtentX = 2672
_ExtentY = 582
_Version = 393216
Enabled = 0 'False
Style = 2
ListField = "type_name"
BoundColumn = "type_id"
Text = ""
Object.DataMember = "ComSaleType"
End
Begin VB.TextBox txtsale_demo
DataField = "sale_demo"
DataMember = "ComSaleHB"
DataSource = "DEjxc"
Enabled = 0 'False
Height = 330
Left = 3105
TabIndex = 20
Top = 1065
Width = 4335
End
Begin VB.TextBox txtsale_car
DataField = "sale_car"
DataMember = "ComSaleHB"
DataSource = "DEjxc"
Enabled = 0 'False
Height = 330
Left = 1020
TabIndex = 18
Top = 1065
Width = 1260
End
Begin VB.TextBox txtsale_maker
DataField = "sale_maker"
DataMember = "ComSaleHB"
DataSource = "DEjxc"
Enabled = 0 'False
Height = 330
Left = 4425
TabIndex = 16
Top = 660
Width = 900
End
Begin VB.TextBox txtsale_date
DataField = "sale_date"
DataMember = "ComSaleHB"
DataSource = "DEjxc"
Enabled = 0 'False
Height = 330
Left = 6105
TabIndex = 11
Top = 240
Width = 1320
End
Begin VB.TextBox txtsale_id
DataField = "sale_id"
DataMember = "ComSaleHB"
DataSource = "DEjxc"
Enabled = 0 'False
Height = 330
Left = 3645
TabIndex = 9
Top = 240
Width = 1245
End
Begin VB.TextBox Txtgrid2
Height = 270
Left = 1200
TabIndex = 7
Top = 2100
Visible = 0 'False
Width = 1215
End
Begin MSDataGridLib.DataGrid DataGrid2
Bindings = "FrmSaleSql.frx":049C
Height = 2235
Left = 420
TabIndex = 6
Top = 1440
Width = 6855
_ExtentX = 12091
_ExtentY = 3942
_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 = "ComSaleDB"
ColumnCount = 5
BeginProperty Column00
DataField = "sale_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 = "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 Column03
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 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 = 1500.095
EndProperty
BeginProperty Column03
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 1800
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 = 24
Top = 3720
Width = 6855
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "备注:"
Height = 180
Index = 7
Left = 2625
TabIndex = 19
Top = 1110
Width = 450
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "车号:"
Height = 180
Index = 6
Left = 525
TabIndex = 17
Top = 1110
Width = 450
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "制单人:"
Height = 180
Index = 5
Left = 3765
TabIndex = 15
Top = 720
Width = 630
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "领用人:"
Height = 180
Index = 4
Left = 5625
TabIndex = 14
Top = 720
Width = 630
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "对方单位:"
Height = 180
Index = 3
Left = 165
TabIndex = 13
Top = 720
Width = 810
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "单据类型:"
Height = 180
Index = 2
Left = 165
TabIndex = 12
Top = 315
Width = 810
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "单据日期:"
Height = 180
Index = 1
Left = 5265
TabIndex = 10
Top = 315
Width = 810
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "单据编号:"
Height = 180
Index = 0
Left = 2805
TabIndex = 8
Top = 315
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 = 2340
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 = "FrmSaleSql.frx":04B0
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 = "ComSaleHB"
ColumnCount = 8
BeginProperty Column00
DataField = "sale_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 = "sale_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 = "sale_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 = "sale_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 = "sale_user"
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 = "sale_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 Column06
DataField = "sale_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 Column07
DataField = "sale_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 = 705.26
EndProperty
BeginProperty Column02
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 750.047
EndProperty
BeginProperty Column03
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 750.047
EndProperty
BeginProperty Column04
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 599.811
EndProperty
BeginProperty Column05
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 599.811
EndProperty
BeginProperty Column06
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 494.929
EndProperty
BeginProperty Column07
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 1200.189
EndProperty
EndProperty
End
End
End
Attribute VB_Name = "FrmSaleSql"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private rsSaHB As ADODB.Recordset
Private rsSalDB As ADODB.Recordset
Private cmSaHB 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 = 8
FrmSql.Show vbModal
Select Case FrmSql.intNumField
Case -1
rsSaHB.Filter = Me.DataGrid1.Columns.Item(0).DataField & _
"<>''"
rsSalDB.Filter = "sale_id ='" & Me.txtsale_id.Text & "'"
Case -2
Case Else
rsSaHB.Filter = Me.DataGrid1.Columns.Item(FrmSql.intNumField).DataField & _
" like '*" & FrmSql.strSqlField & "*'"
rsSalDB.Filter = "sale_id ='" & Me.txtsale_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)
rsSalDB.Filter = "sale_id ='" & Me.txtsale_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 rsSaHB = DEjxc.rsComSaleHB
Set rsSalDB = DEjxc.rsComSaleDB
Set cmSaHB = New ADODB.Command
cmSaHB.ActiveConnection = DEjxc.Conjxc
cmSaHB.CommandType = adCmdText
rsSalDB.Filter = "sale_id ='" & Me.txtsale_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)
rsSaHB.Close
rsSalDB.Close
Set rsSaHB = Nothing
Set rsSalDB = Nothing
Set cmSaHB = Nothing
End Sub