📄 frmco.frm
字号:
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column07
DataField = "UnitPrice"
Caption = "单价"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column08
DataField = "IsComplete"
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
BeginProperty Column02
EndProperty
BeginProperty Column03
EndProperty
BeginProperty Column04
EndProperty
BeginProperty Column05
EndProperty
BeginProperty Column06
EndProperty
BeginProperty Column07
EndProperty
BeginProperty Column08
EndProperty
EndProperty
End
Begin VB.Image Image4
Height = 300
Left = 9720
Picture = "FrmCO.frx":20EE
Top = 7920
Width = 300
End
Begin VB.Label LblBack
BackStyle = 0 'Transparent
Caption = "返回"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 10320
MouseIcon = "FrmCO.frx":250A
MousePointer = 99 'Custom
TabIndex = 5
Top = 7920
Width = 615
End
Begin VB.Image Image3
Height = 300
Left = 8280
Picture = "FrmCO.frx":2814
Top = 7920
Width = 300
End
Begin VB.Label LblDelete
BackStyle = 0 'Transparent
Caption = "删除"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 8880
MouseIcon = "FrmCO.frx":2C30
MousePointer = 99 'Custom
TabIndex = 4
Top = 7920
Width = 615
End
Begin VB.Image Image2
Height = 300
Left = 6840
Picture = "FrmCO.frx":2F3A
Top = 7920
Width = 300
End
Begin VB.Label LblModify
BackStyle = 0 'Transparent
Caption = "修改"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 7440
MouseIcon = "FrmCO.frx":3356
MousePointer = 99 'Custom
TabIndex = 3
Top = 7920
Width = 615
End
Begin VB.Image Image5
Height = 300
Left = 5280
Picture = "FrmCO.frx":3660
Top = 7920
Width = 300
End
Begin VB.Label LblAdd
BackStyle = 0 'Transparent
Caption = "添加"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5880
MouseIcon = "FrmCO.frx":3A7C
MousePointer = 99 'Custom
TabIndex = 2
Top = 7920
Width = 615
End
Begin VB.Image Image1
Height = 300
Left = 6960
Picture = "FrmCO.frx":3D86
Top = 2160
Width = 300
End
Begin VB.Label LblFind
BackStyle = 0 'Transparent
Caption = "查询订单"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 7440
MouseIcon = "FrmCO.frx":41A2
MousePointer = 99 'Custom
TabIndex = 1
Top = 2160
Width = 1095
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "CO"
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 7440
TabIndex = 6
Top = 360
Width = 615
End
End
Attribute VB_Name = "FrmCO"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
LblModify.Enabled = False
LblDelete.Enabled = False
End Sub
Private Sub ImgCOID_Click()
FrmCOIDQury.OK = 1
FrmCOIDQury.Show 1
End Sub
Private Sub LblAdd_Click()
FrmCOEdit.Modify = False
FrmCOEdit.Show 1
End Sub
Private Sub LblBack_Click()
Unload Me
End Sub
Private Sub LblDelete_Click()
If TxtCOID <> "" Then
If Adodc1.Recordset.RecordCount > 1 Then
FrmCODelete.LblDeleteCO.Caption = "删除CO单“" + TxtCOID.Text + "”"
FrmCODelete.OriCOID = TxtCOID.Text
FrmCODelete.LbDeleteCOItem.Caption = "删除CO单“" + TxtCOID.Text + "”中的CO项目“" + Adodc1.Recordset.Fields(6) + "”"
FrmCODelete.OriCOItemID = Adodc1.Recordset.Fields(6)
FrmCODelete.Show 1
Refresh_CO
Else
FrmCODelete.LblDeleteCO.Caption = "删除CO单“" + TxtCOID.Text + "”"
FrmCODelete.OriCOID = TxtCOID.Text
FrmCODelete.LbDeleteCOItem.Visible = False
FrmCODelete.Image1.Visible = False
FrmCODelete.Show 1
Unload Me
Me.Show
End If
Else
MsgBox "请选择CO单后指定要项目"
TxtCOID.Text = ""
Exit Sub
End If
End Sub
Private Sub LblFind_Click()
If LblFind.Caption = "查询订单" Then
If TxtCOID.Text = "" Then
MsgBox "请输入要查询的CO单号"
TxtCOID.SetFocus
Exit Sub
End If
'查询订单信息
Adodc1.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
Adodc1.RecordSource = "SELECT Customer.CustomerName, CO.CODate, Deliver.Country, Deliver.Province, Deliver.City, Deliver.Address, CO.COItemID, Item.Item, Item.Name, Item.Unit, CO.COQty, CO.ConsignmentDate, SalesItem.Currency1, SalesItem.UnitPrice, CO.IsComplete,Customer.CustomerID,SalesItem.SalesItemID,Deliver.DeliverID From SalesItem, Item, Deliver, CO, Customer WHERE Item.Item=SalesItem.Item and CO.SalesItemID=SalesItem.SalesItemID and Deliver.CustomerID=Customer.CustomerID and Customer.CustomerID=SalesItem.CustomerID and SalesItem.CustomerID= Deliver.CustomerID and CO.DeliverID=Deliver.DeliverID and CO.COID ='" + Trim(TxtCOID.Text) + "' order by CO.COItemID"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Set DataGrid1.DataSource = Adodc1
'填充CO基本信息
Set LblCustomer.DataSource = Adodc1
LblCustomer.DataField = "CustomerName"
Set LblDate.DataSource = Adodc1
LblDate.DataField = "CODate"
LblAddress.Caption = Adodc1.Recordset.Fields("Country") + "-" + Adodc1.Recordset.Fields("Province") + "-" + Adodc1.Recordset.Fields("City") + "--" + Adodc1.Recordset.Fields("Address")
LblModify.Enabled = True
LblDelete.Enabled = True
TxtCOID.Enabled = False
LblFind.Caption = "重新查询"
Else
MsgBox "没有此CO单号,请重新输入"
TxtCOID.SetFocus
TxtCOID.SelStart = 0
TxtCOID.SelLength = Len(TxtCOID)
End If
Else
Unload Me
Me.Show
End If
End Sub
Private Sub Refresh_CO()
Adodc1.Refresh
End Sub
Public Sub LblModify_Click()
FrmCOModifyLogIn.LblModify.Caption = "修改CO订单项目“" + Adodc1.Recordset.Fields(6) + "”"
FrmCOModifyLogIn.LblAdd.Caption = "添加订单项目到CO“" + TxtCOID.Text + "”"
FrmCOModifyLogIn.Show 1
Refresh_CO
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -