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

📄 form1.frm

📁 本系统特为行业报价、订单、产品管理与客户关系管理所订制
💻 FRM
字号:
VERSION 5.00
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "actskn43.ocx"
Object = "{4F29B06F-16D9-4A0C-9C8A-2F0C02F625FE}#1.7#0"; "FlexCell.ocx"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Formsd1 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "类型设定"
   ClientHeight    =   4410
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   7320
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4410
   ScaleWidth      =   7320
   StartUpPosition =   2  '屏幕中心
   Begin ACTIVESKINLibCtl.Skin skn1 
      Left            =   6480
      OleObjectBlob   =   "Form1.frx":000C
      Top             =   600
   End
   Begin VB.CommandButton XPButton6 
      Caption         =   "刷 新"
      Height          =   375
      Left            =   5160
      TabIndex        =   4
      Top             =   3120
      Width           =   975
   End
   Begin VB.CommandButton XPButton5 
      Caption         =   "删 除"
      Height          =   375
      Left            =   5160
      TabIndex        =   3
      Top             =   2640
      Width           =   975
   End
   Begin VB.CommandButton XPButton3 
      Caption         =   "新 增"
      Height          =   375
      Left            =   5160
      TabIndex        =   2
      Top             =   2160
      Width           =   975
   End
   Begin VB.CommandButton XPButton2 
      Caption         =   "-"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   5760
      TabIndex        =   1
      Top             =   1560
      Width           =   375
   End
   Begin VB.CommandButton XPButton1 
      Caption         =   "+"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   5160
      TabIndex        =   0
      Top             =   1560
      Width           =   375
   End
   Begin FlexCell.Grid Grid1 
      Height          =   3015
      Left            =   480
      TabIndex        =   5
      Top             =   1080
      Width           =   4215
      _ExtentX        =   7435
      _ExtentY        =   5318
      Cols            =   2
      DisplayRowIndex =   -1  'True
      ExtendLastCol   =   -1  'True
      Rows            =   1
   End
   Begin MSComctlLib.TabStrip TabStrip1 
      Height          =   4095
      Left            =   120
      TabIndex        =   6
      Top             =   120
      Width           =   6855
      _ExtentX        =   12091
      _ExtentY        =   7223
      MultiRow        =   -1  'True
      _Version        =   393216
      BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628} 
         NumTabs         =   16
         BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "计量单位"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "性别"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab3 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "级别"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab4 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "包装"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab5 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "运输说明"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab6 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "付款方式"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab7 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "签定地点"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab8 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "质量标准"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab9 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "交货时间"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab10 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "运输保证"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab11 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "损耗计算"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab12 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "包装供应与回收"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab13 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "验收标准"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab14 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "样品供应方法"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab15 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "结算方式与期限"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab16 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "公司名称"
            ImageVarType    =   2
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "Formsd1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2008/05/10
'描    述:商品综合管理系统 Sql2000版
'网    站:http://www.Mndsoft.com/  (VB6源码博客)
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005)
'e-mail  :Mndsoft@163.com
'e-mail  :Mndsoft@126.com
'OICQ    :88382850
'          如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************

Dim TmpClass As String
Dim Grid_ADD As Boolean
Dim Grid_id(100) As Integer
Dim hang As Integer
Private Declare Function GetKeyState Lib "user32" _
   (ByVal nVirtKey As Long) As Integer
Private Sub Form_Load()
Skn1.LoadSkin App.Path & sknPname
Skn1.ApplySkinByName hWnd, "窗体"
Skn1.ApplySkin hWnd
Grid1.Column(0).Width = 90
Grid1.Column(1).Width = 100
SetClass
GridIni
With Grid1
    .OpenFile ("nxsd.cel")
End With
End Sub
Private Sub GridIni() '显示内容
    On Error GoTo ErrHandlor
    Grid1.Rows = 1
    Grid1.Cell(0, 0).Text = "序号"
    Grid1.Cell(0, 1).Text = "名称"
        
        Sql = "select * from unit where numberid='" & TmpClass & "'"
        Set Qy1 = cnn.Execute(Sql)
        Do While Not Qy1.EOF
           Grid1.Rows = Grid1.Rows + 1
           Grid_id(Grid1.Rows - 1) = Qy1.Fields(2)
           Grid1.Cell(Grid1.Rows - 1, 1).Text = Qy1.Fields(1)
           Qy1.MoveNext
        Loop
             Exit Sub
ErrHandlor:
    MsgBox "错误" & Err.Description, vbOKOnly, "提示"

End Sub

Private Sub Grid1_RowColChange(ByVal Row As Long, ByVal Col As Long)
hang = Row
End Sub

Private Sub Grid1_Validate(Cancel As Boolean)
    Dim nActiveRow As Long, nActiveCol As Long
    Const VK_TAB = 9

    If GetKeyState(VK_TAB) < 0 Then
        nActiveRow = Grid1.ActiveCell.Row
        nActiveCol = Grid1.ActiveCell.Col
        If nActiveCol < Grid1.Cols - 1 Then
            Grid1.Range(nActiveRow, nActiveCol + 1, _
                        nActiveRow, nActiveCol + 1).Selected
        End If
        Cancel = True
    End If
End Sub

Private Sub TabStrip1_Click()
SetClass
GridIni
End Sub

Private Sub XPButton1_Click()
Grid1.Rows = Grid1.Rows + 1
End Sub

Private Sub XPButton2_Click()
If Grid1.Rows > 2 Then
Grid1.Rows = Grid1.Rows - 1
End If
End Sub

Private Sub XPButton3_Click()
If UKeyStr <> KeyStr And KeyStr <> "" Then
MsgBox "只有注册用户才可使用!", vbInformation, "提示"
Exit Sub
End If

If Grid_ADD = False Then
'执行增加的前期工作
 Grid1.Rows = 1
 Grid1.Rows = Grid1.Rows + 1
 XPButton1.Enabled = True
 XPButton2.Enabled = True
 XPButton3.Caption = "保 存"
 Grid1.Cell(Grid1.Rows - 1, 1).SetFocus
 Grid_ADD = True
 XPButton3.Default = True
Else
'执行保存操作
 On Error GoTo finish:
  For i = 1 To Grid1.Rows - 1
    If Grid1.Cell(i, 1).Text <> "" Then
     Sql = "select * from unit where numberid='" & TmpClass & "' and ly='" & Grid1.Cell(i, 1).Text & "'"
      Set Qy1 = cnn.Execute(Sql)
     If Qy1.EOF = True Then
      Sql = "insert into unit(numberid,ly) values('" & TmpClass & "','" & Grid1.Cell(i, 1).Text & "')"
      Set Qy1 = cnn.Execute(Sql)
     End If
    End If
  Next
     MsgBox "类型已成功添加!", vbInformation, "操作成功"
     XPButton1.Enabled = False
     XPButton2.Enabled = False
     XPButton3.Caption = "新 增"
     Grid_ADD = False
     GridIni
End If
Exit Sub
finish:
MsgBox "添加到第" & i & "行时出现错误!" & vbCrLf & "错误内容:" & Err.Description
End Sub

Private Sub XPButton5_Click()
If Grid_ADD = True Or hang = 0 Then
MsgBox "当前状态不支持删除!", vbInformation, "错误"
Exit Sub
End If
Set Qy1 = cnn.Execute("delete from unit where id=" & Grid_id(hang))
MsgBox "记录成功删除!", vbInformation, "操作成功"
GridIni
End Sub

Private Sub XPButton6_Click()
    XPButton1.Enabled = False
    XPButton2.Enabled = False
    XPButton3.Caption = "新 增"
    Grid_ADD = False
    GridIni
End Sub
Private Sub SetClass()
'On Error GoTo ErrHandlor
    Select Case TabStrip1.SelectedItem.Index
        Case 1
            TmpClass = "1"
        Case 2
            TmpClass = "2"
        Case 3
            TmpClass = "3"
        Case 4
            TmpClass = "4"
        Case 5
            TmpClass = "5"
        Case 6
            TmpClass = "6"
        Case 7
            TmpClass = "7"
        Case 8
            TmpClass = "8"
        Case 9
            TmpClass = "9"
        Case 10
            TmpClass = "10"
        Case 11
            TmpClass = "11"
        Case 12
            TmpClass = "12"
        Case 13
            TmpClass = "13"
        Case 14
            TmpClass = "14"
        Case 15
            TmpClass = "15"
        Case 16
            TmpClass = "16"
    End Select
            Exit Sub
'ErrHandlor:
'    MsgBox "错误" & Err.Description, vbOKOnly, "提示"
        
End Sub

⌨️ 快捷键说明

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