Form_LogSelect.frm
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:6k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
  3. Begin VB.Form Frm_logSelect 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "过滤"
  6.    ClientHeight    =   2370
  7.    ClientLeft      =   3585
  8.    ClientTop       =   2640
  9.    ClientWidth     =   4710
  10.    Icon            =   "Form_LogSelect.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   2370
  15.    ScaleWidth      =   4710
  16.    StartUpPosition =   2  '屏幕中心
  17.    Begin VB.Frame Frame1 
  18.       Caption         =   "日期"
  19.       Height          =   675
  20.       Left            =   30
  21.       TabIndex        =   6
  22.       Top             =   150
  23.       Width           =   4605
  24.       Begin MSComCtl2.DTPicker DTPicker1 
  25.          Height          =   285
  26.          Index           =   0
  27.          Left            =   60
  28.          TabIndex        =   7
  29.          Top             =   240
  30.          Width           =   2085
  31.          _ExtentX        =   3678
  32.          _ExtentY        =   503
  33.          _Version        =   393216
  34.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  35.             Name            =   "宋体"
  36.             Size            =   9
  37.             Charset         =   134
  38.             Weight          =   400
  39.             Underline       =   0   'False
  40.             Italic          =   0   'False
  41.             Strikethrough   =   0   'False
  42.          EndProperty
  43.          CustomFormat    =   "yyyy-MM-dd HH:mm:ss"
  44.          Format          =   70516739
  45.          CurrentDate     =   36850.9999884259
  46.       End
  47.       Begin MSComCtl2.DTPicker DTPicker1 
  48.          Height          =   285
  49.          Index           =   1
  50.          Left            =   2430
  51.          TabIndex        =   8
  52.          Top             =   240
  53.          Width           =   2085
  54.          _ExtentX        =   3678
  55.          _ExtentY        =   503
  56.          _Version        =   393216
  57.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  58.             Name            =   "宋体"
  59.             Size            =   9
  60.             Charset         =   134
  61.             Weight          =   400
  62.             Underline       =   0   'False
  63.             Italic          =   0   'False
  64.             Strikethrough   =   0   'False
  65.          EndProperty
  66.          CustomFormat    =   "yyyy-MM-dd HH:mm:ss"
  67.          Format          =   70516739
  68.          CurrentDate     =   36850.9999884259
  69.       End
  70.       Begin VB.Label Label1 
  71.          AutoSize        =   -1  'True
  72.          Caption         =   "至"
  73.          Height          =   180
  74.          Left            =   2190
  75.          TabIndex        =   9
  76.          Top             =   300
  77.          Width           =   180
  78.       End
  79.    End
  80.    Begin VB.CommandButton Command1 
  81.       Caption         =   "取消&C"
  82.       Height          =   315
  83.       Index           =   1
  84.       Left            =   3390
  85.       TabIndex        =   5
  86.       Top             =   1920
  87.       Width           =   1215
  88.    End
  89.    Begin VB.CommandButton Command1 
  90.       Caption         =   "确定&D"
  91.       Height          =   315
  92.       Index           =   0
  93.       Left            =   1920
  94.       TabIndex        =   4
  95.       Top             =   1920
  96.       Width           =   1215
  97.    End
  98.    Begin VB.ComboBox Combo2 
  99.       Height          =   300
  100.       ItemData        =   "Form_LogSelect.frx":038A
  101.       Left            =   750
  102.       List            =   "Form_LogSelect.frx":0391
  103.       Style           =   2  'Dropdown List
  104.       TabIndex        =   3
  105.       Top             =   1380
  106.       Width           =   3915
  107.    End
  108.    Begin VB.ComboBox Combo1 
  109.       Height          =   300
  110.       ItemData        =   "Form_LogSelect.frx":0398
  111.       Left            =   750
  112.       List            =   "Form_LogSelect.frx":039F
  113.       Style           =   2  'Dropdown List
  114.       TabIndex        =   1
  115.       Top             =   930
  116.       Width           =   3915
  117.    End
  118.    Begin VB.Label Label3 
  119.       AutoSize        =   -1  'True
  120.       BackStyle       =   0  'Transparent
  121.       Caption         =   "子系统:"
  122.       Height          =   180
  123.       Left            =   60
  124.       TabIndex        =   2
  125.       Top             =   1440
  126.       Width           =   630
  127.    End
  128.    Begin VB.Label Label2 
  129.       AutoSize        =   -1  'True
  130.       BackStyle       =   0  'Transparent
  131.       Caption         =   "用户名:"
  132.       Height          =   180
  133.       Left            =   60
  134.       TabIndex        =   0
  135.       Top             =   990
  136.       Width           =   630
  137.    End
  138. End
  139. Attribute VB_Name = "Frm_logSelect"
  140. Attribute VB_GlobalNameSpace = False
  141. Attribute VB_Creatable = False
  142. Attribute VB_PredeclaredId = True
  143. Attribute VB_Exposed = False
  144. Private Sub Command1_Click(Index As Integer)
  145. Dim Ssql As String
  146. If Index = 1 Then Unload Me: Exit Sub
  147. Ssql = "a.GeginDate>='" & DTPicker1(0).Value & "' and a.GeginDate<='" & DTPicker1(1).Value & "' "
  148. If Trim(Combo1.Text) <> "" Then
  149. Ssql = Ssql & " and b.czymc='" & Combo1.Text & "'"
  150. End If
  151. If Trim(Combo2.Text) <> "" Then
  152. Ssql = Ssql & " and a.SystemName='" & Trim(Combo2.Text) & "'"
  153. End If
  154. Frm_Log.ListView1.Tag = Ssql
  155. Unload Me
  156. End Sub
  157. Private Sub Form_Activate()
  158. On Error GoTo error_exit
  159. Dim aDo_Log As New Recordset
  160. Set aDo_Log = Conn_System.Execute("select * from " & Me.Tag & ".dbo.Gy_Czygl order by czymc")
  161. Do While Not aDo_Log.EOF
  162.    Combo1.AddItem aDo_Log!czymc
  163.    aDo_Log.MoveNext
  164. Loop
  165. aDo_Log.Close
  166. Set aDo_Log = Conn_System.Execute("select * from " & Me.Tag & ".dbo.Xt_xtgnb  where sjgnbm = ''")
  167. Do While Not aDo_Log.EOF
  168.    If aDo_Log!gnmc <> "开发辅助工具" Then
  169.         Combo2.AddItem aDo_Log!gnmc
  170.    End If
  171.    aDo_Log.MoveNext
  172. Loop
  173. aDo_Log.Close
  174. Exit Sub
  175. error_exit:
  176. MsgBox Err.Description, 16
  177. End Sub
  178. Private Sub Form_Load()
  179.   DTPicker1(0).Value = Format(Date & " 00:00:00", "yyyy-MM-dd HH:mm:ss")
  180.   DTPicker1(1).Value = Format(Date & " 23:59:59", "yyyy-MM-dd HH:mm:ss")
  181. End Sub