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

📄 productionsingleform.frm

📁 即时通讯
💻 FRM
📖 第 1 页 / 共 3 页
字号:
      Begin VB.Label Label1 
         Caption         =   "销售提成:"
         Height          =   255
         Index           =   11
         Left            =   120
         TabIndex        =   32
         Top             =   5010
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "产品型号:"
         Height          =   255
         Index           =   10
         Left            =   3480
         TabIndex        =   31
         Top             =   3510
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "产品全称:"
         Height          =   255
         Index           =   9
         Left            =   120
         TabIndex        =   30
         Top             =   990
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "产品类别:"
         Height          =   255
         Index           =   8
         Left            =   3480
         TabIndex        =   29
         Top             =   3120
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "最低销售价:"
         Height          =   255
         Index           =   7
         Left            =   3300
         TabIndex        =   28
         Top             =   5100
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "最低经销价:"
         Height          =   255
         Index           =   6
         Left            =   3300
         TabIndex        =   27
         Top             =   4710
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "一级经销价:"
         Height          =   255
         Index           =   5
         Left            =   0
         TabIndex        =   26
         Top             =   3510
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "外 销 价:"
         Height          =   255
         Index           =   4
         Left            =   120
         TabIndex        =   25
         Top             =   4005
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "产品单价:"
         Height          =   255
         Index           =   3
         Left            =   120
         TabIndex        =   24
         Top             =   3000
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "产品名称:"
         Height          =   255
         Index           =   2
         Left            =   120
         TabIndex        =   23
         Top             =   480
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "代    号:"
         Height          =   255
         Index           =   1
         Left            =   120
         TabIndex        =   22
         Top             =   1995
         Width           =   975
      End
   End
   Begin VB.Label Label1 
      Caption         =   "bomid"
      Height          =   255
      Index           =   15
      Left            =   3480
      TabIndex        =   38
      Top             =   4800
      Visible         =   0   'False
      Width           =   975
   End
End
Attribute VB_Name = "productionsingleform"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**************************************
'*    模 块 名 称 :产品资料管理用户操作界面
'*    功 能 描 述 :产品资料管理用户操作界面
'*    程序员姓名  : 石春晓
'*    最后修改人  : 石春晓
'*    最后修改时间:2005/09/05
'**************************************
Option Explicit
Public m_operatorType As Integer       ' 操作类型 0 - 新增 1 - 修改
Public m_productionId  As String        ' 修改时其它窗体传递过来的参数
Private m_productionDAO As productionDAO ' 数据库操作类
Private m_recordset As ADODB.Recordset ' 数据操作数据集对象
Private g_recordset As ADODB.Recordset
Private m_dao As ImageDAO
Private pictureid As String
Private imageDataArr() As Byte      ' 图像文件读入后保存的字节数组
Private imageName As String         ' 图像文件名
Public f As String


Private Sub c_cancel_Click()
    Unload Me
End Sub

Private Sub c_new_Click()
    Call Check
    If m_operatorType = 0 Then
        If f = "0" Then
           Exit Sub
        Else
           Call Newproduction
           clear
        End If
    ElseIf m_operatorType = 1 Then
        Call Modifyproduction
        clear
        m_operatorType = 0
    End If

End Sub

Private Sub c_save_Click()
    Call Check
    If m_operatorType = 0 Then
        If f = "0" Then
           Exit Sub
        Else
           Call Newproduction
        End If
    ElseIf m_operatorType = 1 Then
        If f = "0" Then
           Exit Sub
        Else
           Call Modifyproduction
        End If
    End If
    Unload Me
End Sub

Private Sub Combo1_Click()
        m_productionDAO.show m_recordset            '获得产品类别ID列表

    With m_recordset

        Do While Not .EOF
            If Combo1.text = Trim(.Fields(1)) Then
               Combo1.Tag = .Fields(0)
            End If
            .MoveNext
        Loop
    End With
    m_recordset.Close
End Sub
'Private Sub Combo2_Click()
'        m_productionDAO.show_checkstandard m_recordset            '获得产品类别ID列表
'
'    With m_recordset
'
'        Do While Not .EOF
'            If Combo2.text = Trim(.Fields(1)) Then
'               Combo2.Tag = .Fields(0)
'            End If
'            .MoveNext
'        Loop
'    End With
'    m_recordset.Close
'End Sub
'Private Sub Combo3_Click()
'        m_productionDAO.show_checkvaluegroup m_recordset            '获得产品类别ID列表
'
'    With m_recordset
'
'        Do While Not .EOF
'            If Combo3.text = Trim(.Fields(1)) Then
'               Combo3.Tag = .Fields(0)
'            End If
'            .MoveNext
'        Loop
'    End With
'    m_recordset.Close
'End Sub
'Private Sub Combo4_Click()
'        m_productionDAO.show_checkoptiongroup m_recordset            '获得产品类别ID列表
'
'    With m_recordset
'
'        Do While Not .EOF
'            If Combo4.text = Trim(.Fields(1)) Then
'               Combo4.Tag = .Fields(0)
'            End If
'            .MoveNext
'        Loop
'    End With
'    m_recordset.Close
'End Sub
'**************************************
'*    功 能 描 述 :图片处理按钮处理理
'*    输 入 参 数 :无
'*    输 出 能 数 :无
'**************************************
Private Sub Command1_Click()
    ' 图片处理按钮处理
    Dim imf As ImageManageForm    ' 图片管理窗体变量
    
    Set imf = New ImageManageForm
    imf.m_imageId = pictureid
    imf.show 1
    If pictureid = "" Then pictureid = MainForm.g_application.m_queryResultId
End Sub

Private Sub Command2_Click()
    Dim filename1 As String            ' 用户选择的文件的路径及文件名字符串
    Dim fileLen As Long                ' 文件长度
    Dim file_num As Long               ' 文件数据
    Dim bufferfile As Long
    Dim current As String


    
    CommonDialog1.FileName = ""
    CommonDialog1.ShowOpen                      '显示打开文件对话框
    filename1 = CommonDialog1.FileName          '获取所选择的文件名
    If Trim(filename1) = "" Then
        Exit Sub
    End If
    file_num = FreeFile()
    Open filename1 For Binary Access Read As #file_num
    
    fileLen = LOF(file_num) '求文件长度
    ReDim imageDataArr(fileLen) '根据文件长度定义动态数组大小
    Get #file_num, , imageDataArr '将一个已打开的磁盘文件读入数组变量之中
    
    bufferfile = FreeFile()
    Open "tempfile.bmp" For Binary Access Read Write As #bufferfile '打开一个临时文件
    Put bufferfile, , imageDataArr '将动态数组FileArr中的数据写入临时文件tempfile中
    current = CurDir & "\tempfile.bmp" '获取临时文件的全路径
'    WebBrowser1.Navigate current '在WebBrowser控件中显示文件内容
    Picture1.Picture = LoadPicture(current)

EXITSUB:
End Sub

Private Sub Form_Load()
    Set m_productionDAO = New productionDAO
    Set m_recordset = New ADODB.Recordset
    Set g_recordset = New ADODB.Recordset
    SetToCenter Me
    Set m_dao = New ImageDAO
    
    CommonDialog1.Filter = "*.gif|*.gif|*.jpg|*.jpg"
    If m_operatorType = 0 Then
        Me.caption = "产品资料_新增"
        
        clear
    Else
        Me.caption = "产品资料_修改"
        
        FindByIdRefresh
    End If
    
    m_productionDAO.show m_recordset           '获得产品类别ID列表
    With m_recordset

        Do While Not .EOF
            Combo1.AddItem Trim(.Fields(1))
            .MoveNext
        Loop
    End With
    m_recordset.Close
        
'    m_productionDAO.show_checkstandard m_recordset           '获得产品类别ID列表
'    With m_recordset
'
'        Do While Not .EOF
'            Combo2.AddItem Trim(.Fields(1))
'            .MoveNext
'        Loop
'    End With
'    m_recordset.Close
'
'    m_productionDAO.show_checkvaluegroup m_recordset           '获得产品类别ID列表
'    With m_recordset
'
'        Do While Not .EOF
'            Combo3.AddItem Trim(.Fields(1))
'            .MoveNext
'        Loop
'    End With
'    m_recordset.Close
'
'    m_productionDAO.show_checkoptiongroup m_recordset           '获得产品类别ID列表
'    With m_recordset
'
'        Do While Not .EOF
'            Combo4.AddItem Trim(.Fields(1))
'            .MoveNext
'        Loop
'    End With
'    m_recordset.Close
 LoadPictureid pictureid


End Sub
'**************************************
'*    功 能 描 述 :新增产品数据处理函数
'*    输 入 参 数 :无
'*    输 出 能 数 :无
'**************************************
Private Sub Newproduction()
    '
    Dim ret As Boolean
    Dim imageId As String
    
    If pictureid = "" Then     ' 新增一条记录
        imageId = m_dao.NewImage("a.bmp", imageDataArr)
        pictureid = imageId
    Else                       ' 修改一条记录

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -