⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 supplierlistform.frm

📁 即时通讯
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            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 + -