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

📄 gyslb.frm

📁 即时通讯
💻 FRM
字号:
VERSION 5.00
Begin VB.Form gyslb 
   Caption         =   "Form1"
   ClientHeight    =   3375
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3375
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame2 
      Height          =   735
      Left            =   0
      TabIndex        =   7
      Top             =   2640
      Width           =   4695
      Begin VB.CommandButton c_cancel 
         Caption         =   "退出"
         Height          =   375
         Left            =   3720
         TabIndex        =   10
         Top             =   240
         Width           =   855
      End
      Begin VB.CommandButton c_save 
         Caption         =   "保存"
         Height          =   375
         Left            =   2640
         TabIndex        =   9
         Top             =   240
         Width           =   855
      End
      Begin VB.CommandButton c_new 
         Caption         =   "新增"
         Height          =   375
         Left            =   1560
         TabIndex        =   8
         Top             =   240
         Width           =   855
      End
   End
   Begin VB.Frame Frame1 
      Height          =   2775
      Left            =   0
      TabIndex        =   0
      Top             =   -120
      Width           =   4695
      Begin VB.TextBox Text2 
         Height          =   1200
         Left            =   1320
         MaxLength       =   255
         MultiLine       =   -1  'True
         TabIndex        =   3
         Top             =   1320
         Width           =   3135
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Left            =   1320
         MaxLength       =   100
         TabIndex        =   2
         Top             =   840
         Width           =   3135
      End
      Begin VB.TextBox Text3 
         Height          =   300
         Left            =   1320
         MaxLength       =   4
         TabIndex        =   1
         Text            =   "Text3"
         Top             =   360
         Width           =   3135
      End
      Begin VB.Label Label3 
         Caption         =   "备    注:"
         Height          =   255
         Left            =   360
         TabIndex        =   6
         Top             =   1440
         Width           =   975
      End
      Begin VB.Label Label2 
         Caption         =   "供应商类别:"
         Height          =   255
         Left            =   190
         TabIndex        =   5
         Top             =   960
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "序    号:"
         Height          =   255
         Left            =   360
         TabIndex        =   4
         Top             =   480
         Width           =   975
      End
   End
End
Attribute VB_Name = "gyslb"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**************************************
'*    模 块 名 称 :供应商类别设置用户操作界面
'*    功 能 描 述 :供应商类别设置用户操作界面
'*    程序员姓名  : 石春晓
'*    最后修改人  : 石春晓
'*    最后修改时间:2005/10/11
'**************************************
Option Explicit
Public m_operatorType As Integer       ' 操作类型 0 - 新增 1 - 修改
Public m_gyslbid  As String        ' 修改时其它窗体传递过来的参数
Private m_gyslbDAO As gyslbDAO    ' 数据库操作类
Private m_recordset As ADODB.Recordset ' 数据操作数据集对象
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 Newgyslb
           Call clear
        End If
    ElseIf m_operatorType = 1 Then
        Call Modifygyslb
        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 Newgyslb
        End If
    ElseIf m_operatorType = 1 Then
        If f = "0" Then
           Exit Sub
        Else
           Call Modifygyslb
        End If
    End If
    Unload Me
End Sub

Private Sub Form_Load()
    Set m_gyslbDAO = New gyslbDAO
    Set m_recordset = New ADODB.Recordset
    

    Me.Height = 3930
    Me.Width = 4800
    SetToCenter Me
    If m_operatorType = 0 Then
        Me.caption = "供应商类别_新增"
        
        clear
    Else
        Me.caption = "供应商类别_修改"
        
        FindByIdRefresh
    End If
End Sub
'**************************************
'*    功 能 描 述 :供应商类别数据处理函数
'*    输 入 参 数 :无
'*    输 出 能 数 :无
'**************************************
Private Sub Newgyslb()
    '
    Dim ret As Boolean
    
    
    ret = m_gyslbDAO.Newgyslb(m_recordset, Trim(Text3.text), Trim(Text1.text), _
                   Trim(Text2.text))
End Sub
'**************************************
'*    功 能 描 述 :修改供应商类别处理函数
'*    输 入 参 数 :无
'*    输 出 能 数 :无
'**************************************
Private Sub Modifygyslb()
    '
    Dim ret As Boolean
    
    
    ret = m_gyslbDAO.Modifygyslb(m_recordset, Trim(Text3.text), Trim(Text1.text), _
                   Trim(Text2.text), m_gyslbid)
End Sub
'**************************************
'*    功 能 描 述 :检验数据的合法性
'*    输 入 参 数 :无
'*    输 出 能 数 :无
'**************************************
Private Sub Check()
    f = "1"
    If Trim(Text1.text) = "" Then
        MainForm.g_msgText = "供应商类别不能为空!"
        HMsgBox MainForm.g_msgText, 0, 1
        Text1.SetFocus
        f = "0"
        Exit Sub
        
    End If
    If Trim(Text3.text) = "" Or Not IsNumeric(Trim(Text3.text)) Then
        MainForm.g_msgText = "序号不能为空或者序号类型不正确!"
        HMsgBox MainForm.g_msgText, 0, 1
        Text3.SetFocus
        f = "0"
        Exit Sub
        
    End If
      
End Sub
'**************************************
'*    功 能 描 述 :根据供应商类别ID找到供应商类别资料并显示在界面上
'*    输 入 参 数 :无
'*    输 出 能 数 :无
'**************************************
Private Sub FindByIdRefresh()
    Dim ret As Boolean
    
    ret = m_gyslbDAO.FindgyslbId(m_recordset, m_gyslbid)
    
    If ret Then
      With m_recordset
            Text3.text = Trim(.Fields("序号"))
            Text1.text = Trim(.Fields("供应商类别"))
            Text2.text = Trim(.Fields("备注"))
            m_recordset.Close
      End With
    Else
        MainForm.g_msgText = "供应商类别ID不正确,请重新操作!"
        HMsgBox MainForm.g_msgText, 0, 1
        Unload Me
    End If
End Sub
'**************************************
'*    功 能 描 述 :清除界面上文本框里的所有内容
'*    输 入 参 数 :无
'*    输 出 能 数 :无
'**************************************
Private Sub clear()
            Text1.text = ""
            Text2.text = ""
            Text3.text = ""

End Sub

⌨️ 快捷键说明

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