?? supplierlistform.frm
字號:
Picture = "SupplierListForm.frx":6872
Key = "hf"
EndProperty
BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SupplierListForm.frx":6C0C
Key = "lx"
EndProperty
BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SupplierListForm.frx":6FA6
Key = "check"
EndProperty
BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SupplierListForm.frx":7340
Key = "Sum"
EndProperty
BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SupplierListForm.frx":76DA
Key = "Total"
EndProperty
BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SupplierListForm.frx":7A74
Key = "Detail"
EndProperty
BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "SupplierListForm.frx":7E0E
Key = "Order"
EndProperty
EndProperty
End
End
Attribute VB_Name = "SupplierListForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************
'* 模 塊 名 稱 :供應商檔案維護與管理
'* 功 能 描 述 :設置供應商檔案的基本信息
'* 程序員姓名 :黃朝和
'* 最后修改人 :
'* 最后修改時間:2005/08/19
'* 備 注:
'*******************************************************
Option Explicit
Private m_supplierDAO As supplierDAO ' 供應商數據庫操作類
Public c_suppliername1 As String ' 供應商名稱
Public c_supplierid1 As String ' 供應商編號
Private m_recordset As ADODB.Recordset ' 數據操作數據集對象
Private currentrow As Integer
Dim ret As Boolean
Private m_idList As String ' 在執行查詢時查詢到的ID列表字符串
Private q As Integer
Private Sub Command1_Click()
If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) <> "" Then
stockstorelistform.supplier_stockstore = Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) '選取MSHFlexGrid1的某一行的客戶編號
stockstorelistform.supplier_store_type = 1
stockstorelistform.show
Else
MainForm.g_msgText = "對不起您的操作有誤,請重試!!"
Call HMsgBox(MainForm.g_msgText, 0, 1)
End If
End Sub
Private Sub Command2_Click()
If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) <> "" Then
CooperateListForm.m_operateType = 3
CooperateListForm.m_productSchemeId = ""
CooperateListForm.m_psbomId = ""
CooperateListForm.m_supplierid = Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0))
CooperateListForm.m_state = ""
CooperateListForm.show
Else
MainForm.g_msgText = "對不起您的操作有誤,請重試!!"
Call HMsgBox(MainForm.g_msgText, 0, 1)
End If
End Sub
'**************************************
'* 功 能 描 述 :窗體加載函數
'* 輸 入 參 數 :無
'* 輸 出 能 數 :無
'**************************************
Private Sub Form_Load()
SetToCenter Me
Set m_supplierDAO = New supplierDAO
Set m_recordset = New ADODB.Recordset
Call showform
Call sxjl
End Sub
Private Sub Form_Resize()
MSHFlexGrid1.Height = Me.Height - 1420
MSHFlexGrid1.Width = Me.Width - 300
' Image1.Stretch = False
If (MSHFlexGrid1.Height > MSHFlexGrid1.Height - 300) Or (MSHFlexGrid1.Width > MSHFlexGrid1.Width - 200) Then
MSHFlexGrid1.Height = MSHFlexGrid1.Height + 400
MSHFlexGrid1.Width = MSHFlexGrid1.Width + 200
End If
End Sub
Private Sub MSHFlexGrid1_DblClick()
ret = yhqxpd(MainForm.g_application.m_userId, Trim(str(SUPPLIER_MODIFY))) ' 權限判斷
If Not ret Then
MainForm.g_msgText = "該功能您無權操作!"
HMsgBox MainForm.g_msgText, 0, 1
Exit Sub
End If
SupplierSingleForm.supplier_type = 0 ' 修改記錄
If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) <> "" Then
SupplierSingleForm.supplier_id = Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) '選取MSHFlexGrid1的某一行的客戶編號
SupplierSingleForm.supperliname_m_m = Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 1))
SupplierSingleForm.show 1
If q = 1 Then
RefreshQueryList
Else
sxjl
End If
Else
MainForm.g_msgText = "對不起您的操作有誤,請重試!!"
Call HMsgBox(MainForm.g_msgText, 0, 1)
Exit Sub
End If
End Sub
Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "xg" ' 修 改
ret = yhqxpd(MainForm.g_application.m_userId, Trim(str(SUPPLIER_MODIFY))) ' 權限判斷
If Not ret Then
MainForm.g_msgText = "該功能您無權操作!"
HMsgBox MainForm.g_msgText, 0, 1
Exit Sub
End If
SupplierSingleForm.supplier_type = 0
If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) <> "" Then
SupplierSingleForm.supplier_id = Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0))
SupplierSingleForm.supperliname_m_m = Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 1))
SupplierSingleForm.show 1
If q = 1 Then
RefreshQueryList
Else
sxjl
End If
Else
MainForm.g_msgText = "對不起您的操作有誤,請重試!!"
Call HMsgBox(MainForm.g_msgText, 0, 1)
Exit Sub
End If
Case "ck" ' 查看
ret = yhqxpd(MainForm.g_application.m_userId, Trim(str(SUPPLIER_CX))) ' 權限判斷
If Not ret Then
MainForm.g_msgText = "該功能您無權操作!"
HMsgBox MainForm.g_msgText, 0, 1
Exit Sub
End If
SupplierSingleForm.supplier_type = 4
If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) <> "" Then
SupplierSingleForm.supplier_id = Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0))
SupplierSingleForm.supperliname_m_m = Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 1))
SupplierSingleForm.show 1
sxjl
Else
MainForm.g_msgText = "對不起您的操作有誤,請重試!!"
Call HMsgBox(MainForm.g_msgText, 0, 1)
Exit Sub
End If
Case "sc" ' 刪 除
ret = yhqxpd(MainForm.g_application.m_userId, Trim(str(SUPPLIER_DELETE))) ' 權限判斷
If Not ret Then
MainForm.g_msgText = "該功能您無權操作!"
HMsgBox MainForm.g_msgText, 0, 1
Exit Sub
End If
Call delete
Call sxjl
Case "xz" ' 新 增
ret = yhqxpd(MainForm.g_application.m_userId, Trim(str(SUPPLIER_NEW))) ' 權限判斷
If Not ret Then
MainForm.g_msgText = "該功能您無權操作!"
HMsgBox MainForm.g_msgText, 0, 1
Exit Sub
End If
SupplierSingleForm.supplier_type = 1 ' 增加記錄
SupplierSingleForm.show 1
sxjl
Case "sx" ' 刷 新
Call sxjl
Case "tc" ' 退 出
Unload Me
Case "lx" ' 供應商跟蹤
ret = yhqxpd(MainForm.g_application.m_userId, Trim(str(SUPPLIER_GZ))) ' 權限判斷
If Not ret Then
MainForm.g_msgText = "該功能您無權操作!"
HMsgBox MainForm.g_msgText, 0, 1
Exit Sub
End If
SupplierSingleForm.supplier_type = 2
If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) <> "" Then
SupplierSingleForm.supplier_id = Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0))
SupplierSingleForm.supperliname_m_m = Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 1))
SupplierSingleForm.show 1
Else
MainForm.g_msgText = "對不起您的操作有誤,請重試!!"
Call HMsgBox(MainForm.g_msgText, 0, 1)
Exit Sub
End If
Case "lxr" ' 供應商聯系人
ret = yhqxpd(MainForm.g_application.m_userId, Trim(str(SUPPLIER_LXR))) ' 權限判斷
If Not ret Then
MainForm.g_msgText = "該功能您無權操作!"
HMsgBox MainForm.g_msgText, 0, 1
Exit Sub
End If
SupplierSingleForm.supplier_type = 3
If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) <> "" Then
SupplierSingleForm.supplier_id = Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0))
SupplierSingleForm.supperliname_m_m = Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.RowSel, 1))
SupplierSingleForm.show 1
Else
MainForm.g_msgText = "對不起您的操作有誤,請重試!!"
Call HMsgBox(MainForm.g_msgText, 0, 1)
Exit Sub
End If
Case "cx"
ret = yhqxpd(MainForm.g_application.m_userId, Trim(str(SUPPLIER_CX))) ' 權限判斷
If Not ret Then
MainForm.g_msgText = "該功能您無權操作!"
HMsgBox MainForm.g_msgText, 0, 1
Exit Sub
End If
Call cxjl
End Select
End Sub
Private Sub sxjl()
q = 0
ret = m_supplierDAO.s_Refresh(m_recordset)
MSHFlexGrid1.clear
MSHFlexGrid1.Rows = 2
Call showform
With m_recordset
currentrow = 1
Do While Not .EOF
If currentrow > MSHFlexGrid1.Rows - 1 Then
MSHFlexGrid1.AddItem ""
End If
If Trim(.Fields("deleteid")) <> "1" Then
'[>>自定義填充內容
MSHFlexGrid1.TextMatrix(currentrow, 0) = Trim(.Fields("supplierid"))
MSHFlexGrid1.TextMatrix(currentrow, 1) = Trim(.Fields("supplier"))
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -