📄 add_backgoods.frm
字号:
VERSION 5.00
Begin VB.Form Add_backgoods
BorderStyle = 1 'Fixed Single
Caption = "增加商品"
ClientHeight = 3585
ClientLeft = 45
ClientTop = 330
ClientWidth = 5325
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3585
ScaleWidth = 5325
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame2
Height = 600
Left = 0
TabIndex = 15
Top = 2950
Width = 5295
Begin VB.CommandButton save_cmd
Caption = "确认(&S)"
Default = -1 'True
Height = 375
Left = 2880
TabIndex = 18
Top = 170
Width = 975
End
Begin VB.CommandButton cancel_cmd
Caption = "取消(&C)"
Height = 375
Left = 4080
TabIndex = 17
Top = 170
Width = 975
End
Begin VB.CommandButton xz_cmd
Caption = "新增(&A)"
Height = 375
Left = 1680
TabIndex = 16
Top = 170
Width = 975
End
End
Begin VB.Frame Frame1
Height = 2950
Left = 0
TabIndex = 0
Top = 0
Width = 5295
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 300
Left = 840
TabIndex = 19
Top = 240
Width = 1575
End
Begin VB.TextBox Text6
Height = 300
Left = 3480
TabIndex = 7
Top = 1200
Width = 1695
End
Begin VB.TextBox Text7
Height = 1140
Left = 840
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 6
Top = 1680
Width = 4335
End
Begin VB.TextBox Text5
Enabled = 0 'False
Height = 300
Left = 840
TabIndex = 5
Top = 1200
Width = 1575
End
Begin VB.TextBox presetprice
Height = 300
Left = 3480
TabIndex = 4
Top = 720
Width = 1695
End
Begin VB.TextBox Text3
Height = 300
Left = 840
TabIndex = 3
Top = 720
Width = 1575
End
Begin VB.TextBox bigunit
Height = 300
Left = 3480
TabIndex = 2
Top = 240
Width = 1695
End
Begin VB.TextBox goodsname1
Enabled = 0 'False
Height = 300
Left = 240
TabIndex = 1
Top = 2400
Visible = 0 'False
Width = 255
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "完成数量"
Height = 180
Left = 2640
TabIndex = 14
Top = 1200
Width = 720
End
Begin VB.Label Label15
AutoSize = -1 'True
Caption = "商品备注"
Height = 180
Left = 110
TabIndex = 13
Top = 1680
Width = 705
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "金额"
Height = 180
Left = 420
TabIndex = 12
Top = 1245
Width = 360
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "单价"
Height = 180
Left = 3000
TabIndex = 11
Top = 780
Width = 360
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "数量"
Height = 180
Left = 420
TabIndex = 10
Top = 765
Width = 360
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "单位"
Height = 180
Left = 3000
TabIndex = 9
Top = 360
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "商品名称"
ForeColor = &H00FF0000&
Height = 180
Left = 60
TabIndex = 8
Top = 285
Width = 720
End
End
End
Attribute VB_Name = "Add_backgoods"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************
'* 模 块 名 称 :商品维护与管理
'* 功 能 描 述 :添加商品的基本信息
'* 程序员姓名 :黄朝和
'* 最后修改人 :
'* 最后修改时间:2005/08/27
'* 备 注:
'*******************************************************
Option Explicit
Public good_type2 As Integer ' 0--修改 1--新增
Private good_name2 As String ' 定义一个局部变量--商品名称
Private backgoodsdetailid As String
Private m_stockorderDAO As stockorderDAO
Private s_recordset As ADODB.Recordset
Private m_backgoodsDAO As BackGoodsDAO
Private m_recordset As ADODB.Recordset
Private j As Integer
'*******************************************************
'* 功 能 描 述 :卸载窗体
'* 备 注:
'*******************************************************
Private Sub cancel_cmd_Click()
Unload Me
End Sub
Private Sub Form_Load()
SetToCenter Me
Set m_stockorderDAO = New stockorderDAO
Set s_recordset = New ADODB.Recordset
Set m_recordset = New ADODB.Recordset
Set m_backgoodsDAO = New BackGoodsDAO
If good_type2 = 0 Then ' 参数--表示修改商品记录
xz_cmd.Visible = False
Add_backgoods.caption = "修改商品"
Call xgjl
End If
If good_type2 = 1 Then ' 参数---表示增加商品记录
xz_cmd.caption = "新增(&A)"
Add_backgoods.caption = "新增商品"
End If
End Sub
Private Sub Label1_Click()
QueryFom.m_currentQuery = QUERY_GOODS
QueryFom.show 1
m_stockorderDAO.showgoods s_recordset, MainForm.g_application.m_queryResultId
With s_recordset
If Not .EOF Then
Text1.text = Trim(.Fields("name")) '商品名称
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -