www.pudn.com > jxc001.rar > FrmFindPro.frm


VERSION 5.00 
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX" 
Begin VB.Form FrmFindPro  
   BorderStyle     =   3  'Fixed Dialog 
   Caption         =   "物品列表" 
   ClientHeight    =   4545 
   ClientLeft      =   45 
   ClientTop       =   330 
   ClientWidth     =   7005 
   ControlBox      =   0   'False 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   4545 
   ScaleWidth      =   7005 
   ShowInTaskbar   =   0   'False 
   StartUpPosition =   2  '屏幕中心 
   Begin VB.CommandButton CmdFind  
      Cancel          =   -1  'True 
      Caption         =   "取消(&C)" 
      Height          =   315 
      Index           =   1 
      Left            =   5640 
      TabIndex        =   2 
      Top             =   1200 
      Width           =   1155 
   End 
   Begin VB.CommandButton CmdFind  
      Caption         =   "确定(&O)" 
      Default         =   -1  'True 
      Height          =   315 
      Index           =   0 
      Left            =   5640 
      TabIndex        =   1 
      Top             =   480 
      Width           =   1155 
   End 
   Begin MSDataGridLib.DataGrid DataGrid1  
      Bindings        =   "FrmFindPro.frx":0000 
      Height          =   4515 
      Left            =   0 
      TabIndex        =   0 
      Top             =   0 
      Width           =   5415 
      _ExtentX        =   9551 
      _ExtentY        =   7964 
      _Version        =   393216 
      AllowUpdate     =   0   'False 
      AllowArrows     =   -1  'True 
      HeadLines       =   1 
      RowHeight       =   15 
      TabAcrossSplits =   -1  'True 
      TabAction       =   2 
      WrapCellPointer =   -1  'True 
      FormatLocked    =   -1  'True 
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}  
         Name            =   "宋体" 
         Size            =   9 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}  
         Name            =   "宋体" 
         Size            =   9 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      DataMember      =   "ComProduct" 
      ColumnCount     =   5 
      BeginProperty Column00  
         DataField       =   "p_id" 
         Caption         =   "物品编号" 
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}  
            Type            =   0 
            Format          =   "" 
            HaveTrueFalseNull=   0 
            FirstDayOfWeek  =   0 
            FirstWeekOfYear =   0 
            LCID            =   2052 
            SubFormatType   =   0 
         EndProperty 
      EndProperty 
      BeginProperty Column01  
         DataField       =   "product_name" 
         Caption         =   "物品名称" 
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}  
            Type            =   0 
            Format          =   "" 
            HaveTrueFalseNull=   0 
            FirstDayOfWeek  =   0 
            FirstWeekOfYear =   0 
            LCID            =   2052 
            SubFormatType   =   0 
         EndProperty 
      EndProperty 
      BeginProperty Column02  
         DataField       =   "product_model" 
         Caption         =   "规格型号" 
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}  
            Type            =   0 
            Format          =   "" 
            HaveTrueFalseNull=   0 
            FirstDayOfWeek  =   0 
            FirstWeekOfYear =   0 
            LCID            =   2052 
            SubFormatType   =   0 
         EndProperty 
      EndProperty 
      BeginProperty Column03  
         DataField       =   "type_id" 
         Caption         =   "类别" 
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}  
            Type            =   0 
            Format          =   "" 
            HaveTrueFalseNull=   0 
            FirstDayOfWeek  =   0 
            FirstWeekOfYear =   0 
            LCID            =   2052 
            SubFormatType   =   0 
         EndProperty 
      EndProperty 
      BeginProperty Column04  
         DataField       =   "unit" 
         Caption         =   "单位" 
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}  
            Type            =   0 
            Format          =   "" 
            HaveTrueFalseNull=   0 
            FirstDayOfWeek  =   0 
            FirstWeekOfYear =   0 
            LCID            =   2052 
            SubFormatType   =   0 
         EndProperty 
      EndProperty 
      SplitCount      =   1 
      BeginProperty Split0  
         BeginProperty Column00  
            ColumnAllowSizing=   0   'False 
            ColumnWidth     =   794.835 
         EndProperty 
         BeginProperty Column01  
            ColumnAllowSizing=   0   'False 
            ColumnWidth     =   1500.095 
         EndProperty 
         BeginProperty Column02  
            ColumnAllowSizing=   0   'False 
            ColumnWidth     =   1500.095 
         EndProperty 
         BeginProperty Column03  
            ColumnAllowSizing=   0   'False 
            ColumnWidth     =   450.142 
         EndProperty 
         BeginProperty Column04  
            ColumnAllowSizing=   0   'False 
            ColumnWidth     =   494.929 
         EndProperty 
      EndProperty 
   End 
End 
Attribute VB_Name = "FrmFindPro" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Option Explicit 
Private rsPro As ADODB.Recordset 
Public strFindPro As String 
 
Private Sub CmdFind_Click(Index As Integer) 
    Select Case Index 
        Case 0 
            strFindPro = DataGrid1.Columns.Item(0).Value 
        Case 1 
            strFindPro = "" 
    End Select 
    Unload Me 
End Sub 
 
Private Sub Form_Load() 
    Set rsPro = DEjxc.rsComProduct 
    If strFindPro = "" Then 
        rsPro.Filter = "p_id<>''" 
    Else 
        rsPro.Filter = "p_id like '*" & strFindPro & "*'" 
    End If 
    If rsPro.RecordCount = 0 Then 
        CmdFind(0).Enabled = False 
    Else 
        CmdFind(0).Enabled = True 
    End If 
End Sub 
 
Private Sub Form_Unload(Cancel As Integer) 
    rsPro.Close 
    Set rsPro = Nothing 
End Sub