www.pudn.com > 数据库作业.rar > csxx.frm


VERSION 5.00 
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX" 
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX" 
Begin VB.Form csxx  
   Caption         =   "医药信息管理系统" 
   ClientHeight    =   6495 
   ClientLeft      =   60 
   ClientTop       =   630 
   ClientWidth     =   9555 
   LinkTopic       =   "Form1" 
   ScaleHeight     =   6495 
   ScaleWidth      =   9555 
   WindowState     =   2  'Maximized 
   Begin MSDataGridLib.DataGrid DataGrid1  
      Height          =   735 
      Left            =   240 
      TabIndex        =   12 
      Top             =   1800 
      Width           =   1455 
      _ExtentX        =   2566 
      _ExtentY        =   1296 
      _Version        =   393216 
      AllowUpdate     =   0   'False 
      HeadLines       =   1 
      RowHeight       =   15 
      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 
      ColumnCount     =   2 
      BeginProperty Column00  
         DataField       =   "" 
         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       =   "" 
         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  
         EndProperty 
         BeginProperty Column01  
         EndProperty 
      EndProperty 
   End 
   Begin MSAdodcLib.Adodc Adodc1  
      Height          =   495 
      Left            =   7680 
      Top             =   840 
      Visible         =   0   'False 
      Width           =   1575 
      _ExtentX        =   2778 
      _ExtentY        =   873 
      ConnectMode     =   0 
      CursorLocation  =   3 
      IsolationLevel  =   -1 
      ConnectionTimeout=   15 
      CommandTimeout  =   30 
      CursorType      =   3 
      LockType        =   3 
      CommandType     =   1 
      CursorOptions   =   0 
      CacheSize       =   50 
      MaxRecords      =   0 
      BOFAction       =   0 
      EOFAction       =   0 
      ConnectStringType=   1 
      Appearance      =   1 
      BackColor       =   -2147483643 
      ForeColor       =   -2147483640 
      Orientation     =   0 
      Enabled         =   -1 
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=医药信息管理系统.mdb;Persist Security Info=False" 
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=医药信息管理系统.mdb;Persist Security Info=False" 
      OLEDBFile       =   "" 
      DataSourceName  =   "" 
      OtherAttributes =   "" 
      UserName        =   "" 
      Password        =   "" 
      RecordSource    =   "" 
      Caption         =   "Adodc1" 
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}  
         Name            =   "宋体" 
         Size            =   9 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      _Version        =   393216 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "Frame1" 
      Height          =   1455 
      Left            =   240 
      TabIndex        =   0 
      Top             =   120 
      Width           =   6855 
      Begin VB.CommandButton Command3  
         Caption         =   "报表" 
         Height          =   975 
         Left            =   5520 
         TabIndex        =   3 
         Top             =   240 
         Width           =   1095 
      End 
      Begin VB.TextBox Text1  
         Height          =   375 
         Left            =   840 
         TabIndex        =   4 
         Top             =   240 
         Width           =   1215 
      End 
      Begin VB.TextBox Text4  
         Height          =   375 
         Left            =   840 
         TabIndex        =   7 
         Top             =   840 
         Width           =   1215 
      End 
      Begin VB.TextBox Text3  
         Height          =   375 
         Left            =   2760 
         TabIndex        =   6 
         Top             =   840 
         Width           =   1215 
      End 
      Begin VB.TextBox Text2  
         Height          =   375 
         Left            =   2760 
         TabIndex        =   5 
         Top             =   240 
         Width           =   1215 
      End 
      Begin VB.CommandButton Command1  
         Caption         =   "查询顾客" 
         Height          =   375 
         Index           =   0 
         Left            =   4200 
         TabIndex        =   1 
         Top             =   240 
         Width           =   1095 
      End 
      Begin VB.CommandButton Command1  
         Caption         =   "查询经办人" 
         Height          =   375 
         Index           =   1 
         Left            =   4200 
         TabIndex        =   2 
         Top             =   840 
         Width           =   1095 
      End 
      Begin VB.Label Label4  
         Caption         =   "编号" 
         Height          =   255 
         Left            =   360 
         TabIndex        =   11 
         Top             =   360 
         Width           =   375 
      End 
      Begin VB.Label Label3  
         Caption         =   "年龄" 
         Height          =   255 
         Left            =   2280 
         TabIndex        =   10 
         Top             =   960 
         Width           =   375 
      End 
      Begin VB.Label Label2  
         Caption         =   "性别" 
         Height          =   255 
         Left            =   360 
         TabIndex        =   9 
         Top             =   960 
         Width           =   375 
      End 
      Begin VB.Label Label1  
         Caption         =   "姓名" 
         Height          =   255 
         Left            =   2280 
         TabIndex        =   8 
         Top             =   360 
         Width           =   375 
      End 
   End 
   Begin VB.Menu gk  
      Caption         =   " 修改顾客信息" 
   End 
   Begin VB.Menu jbr  
      Caption         =   "修改经办人信息" 
   End 
   Begin VB.Menu rh  
      Caption         =   " 修改用户信息" 
   End 
   Begin VB.Menu about  
      Caption         =   "     关于" 
   End 
   Begin VB.Menu quit  
      Caption         =   "     退出" 
   End 
End 
Attribute VB_Name = "csxx" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
 
Public d As Integer 
 
Private Sub Command1_Click(Index As Integer) 
    Select Case Index 
        Case 0 
            Dim str As String 
            Dim ad As Boolean 
            d = 0 
            Text3.Enabled = True 
            Label3.Enabled = True 
            Frame1.Caption = "顾客信息 " 
            str = "select * from 顾客信息 " 
            ad = False 
            If Text1.Text <> "" Then 
                str = str + " where 编号 ='" & Text1.Text & "'" 
                ad = True 
            End If 
            If Text2.Text <> "" Then 
                str = IIf(ad, str + " and 姓名 ='" & Text2.Text & "'", str + "where 姓名 ='" & Text2.Text & "'") 
                ad = True 
            End If 
            If Text3.Text <> "" Then 
                str = IIf(ad, str + " and 年龄 ='" & Text3.Text & "'", str + "where 年龄 ='" & Text3.Text & "'") 
                ad = True 
            End If 
            If Text4.Text <> "" Then 
                str = IIf(ad, str + " and 性别 ='" & Text4.Text & "'", str + "where 性别 ='" & Text4.Text & "'") 
            End If 
            Adodc1.RecordSource = str 
            Set DataGrid1.DataSource = Adodc1 
            Adodc1.Refresh 
        Case 1 
            Dim str1 As String 
            Dim ad1 As Boolean 
            d = 1 
            Text3.Enabled = False 
            Label3.Enabled = False 
            Frame1.Caption = "经办人信息 " 
            str1 = "select * from 经办人信息 " 
            ad1 = False 
            If Text1.Text <> "" Then 
                str1 = str1 + " where 编号 ='" & Text1.Text & "'" 
                ad1 = True 
            End If 
            If Text2.Text <> "" Then 
                str1 = IIf(ad1, str1 + " and 姓名 ='" & Text2.Text & "'", str1 + "where 姓名 ='" & Text2.Text & "'") 
                ad1 = True 
            End If 
            If Text4.Text <> "" Then 
                str1 = IIf(ad1, str1 + " and 性别 ='" & Text4.Text & "'", str1 + "where 性别 ='" & Text4.Text & "'") 
            End If 
            Adodc1.RecordSource = str1 
            Set DataGrid1.DataSource = Adodc1 
            Adodc1.Refresh 
    End Select 
End Sub 
 
Private Sub Command3_Click() 
    DataReport1.Show 1 
End Sub 
 
Private Sub DataGrid1_dblClick() 
    Select Case d 
        Case 0 
            gkxx.Show 1 
        Case 1 
            jbrxx.Show 1 
    End Select 
End Sub 
 
Private Sub Form_Load() 
    Frame1.Caption = "顾客信息 " 
    d = 0 
    Adodc1.RecordSource = "select * from 顾客信息 " 
    Set DataGrid1.DataSource = Adodc1 
End Sub 
 
Private Sub Form_Resize() 
    If csxx.WindowState <> 1 Then 
        DataGrid1.Width = csxx.Width - 480 
        DataGrid1.Height = csxx.Height - 3000 
    End If 
End Sub 
 
 
Private Sub Form_Unload(Cancel As Integer) 
    Y = MsgBox("确定要退出吗?", 36, "确定") 
    If Y = vbYes Then 
        Cancel = 0 
    Else 
        Cancel = 1 
    End If 
End Sub 
 
Private Sub gk_Click() 
    gkxx.Show 1 
End Sub 
 
Private Sub jbr_Click() 
    jbrxx.Show 1 
End Sub 
 
Private Sub quit_Click() 
    Unload Me 
End Sub 
 
Private Sub rh_Click() 
    rhxx.Show 1 
End Sub