frmcode.frm
上传用户:laihaixin
上传日期:2013-01-26
资源大小:1169k
文件大小:14k
源码类别:

医药行业

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
  3. Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
  4. Begin VB.Form frmcode 
  5.    BorderStyle     =   3  'Fixed Dialog
  6.    Caption         =   "药品器械代码库查看"
  7.    ClientHeight    =   4695
  8.    ClientLeft      =   45
  9.    ClientTop       =   330
  10.    ClientWidth     =   9810
  11.    Icon            =   "frmcode.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    MaxButton       =   0   'False
  15.    MDIChild        =   -1  'True
  16.    MinButton       =   0   'False
  17.    Picture         =   "frmcode.frx":030A
  18.    ScaleHeight     =   4695
  19.    ScaleWidth      =   9810
  20.    ShowInTaskbar   =   0   'False
  21.    Begin VB.CommandButton Command1 
  22.       Caption         =   "关闭&(C)"
  23.       Height          =   375
  24.       Left            =   8400
  25.       TabIndex        =   3
  26.       Top             =   4200
  27.       Width           =   1215
  28.    End
  29.    Begin MSDataGridLib.DataGrid DataGrid3 
  30.       Height          =   3970
  31.       Left            =   6600
  32.       TabIndex        =   2
  33.       Top             =   120
  34.       Width           =   3105
  35.       _ExtentX        =   5477
  36.       _ExtentY        =   7011
  37.       _Version        =   393216
  38.       AllowUpdate     =   0   'False
  39.       BackColor       =   16777215
  40.       ForeColor       =   16711680
  41.       HeadLines       =   1.5
  42.       RowHeight       =   15
  43.       BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  44.          Name            =   "宋体"
  45.          Size            =   9
  46.          Charset         =   134
  47.          Weight          =   400
  48.          Underline       =   0   'False
  49.          Italic          =   0   'False
  50.          Strikethrough   =   0   'False
  51.       EndProperty
  52.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  53.          Name            =   "宋体"
  54.          Size            =   9
  55.          Charset         =   134
  56.          Weight          =   400
  57.          Underline       =   0   'False
  58.          Italic          =   0   'False
  59.          Strikethrough   =   0   'False
  60.       EndProperty
  61.       Caption         =   "医疗器械、材料代码库"
  62.       ColumnCount     =   2
  63.       BeginProperty Column00 
  64.          DataField       =   ""
  65.          Caption         =   ""
  66.          BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  67.             Type            =   0
  68.             Format          =   ""
  69.             HaveTrueFalseNull=   0
  70.             FirstDayOfWeek  =   0
  71.             FirstWeekOfYear =   0
  72.             LCID            =   2052
  73.             SubFormatType   =   0
  74.          EndProperty
  75.       EndProperty
  76.       BeginProperty Column01 
  77.          DataField       =   ""
  78.          Caption         =   ""
  79.          BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  80.             Type            =   0
  81.             Format          =   ""
  82.             HaveTrueFalseNull=   0
  83.             FirstDayOfWeek  =   0
  84.             FirstWeekOfYear =   0
  85.             LCID            =   2052
  86.             SubFormatType   =   0
  87.          EndProperty
  88.       EndProperty
  89.       SplitCount      =   1
  90.       BeginProperty Split0 
  91.          BeginProperty Column00 
  92.          EndProperty
  93.          BeginProperty Column01 
  94.          EndProperty
  95.       EndProperty
  96.    End
  97.    Begin MSDataGridLib.DataGrid DataGrid2 
  98.       Height          =   3970
  99.       Left            =   3360
  100.       TabIndex        =   1
  101.       Top             =   120
  102.       Width           =   3105
  103.       _ExtentX        =   5477
  104.       _ExtentY        =   7011
  105.       _Version        =   393216
  106.       AllowUpdate     =   0   'False
  107.       BackColor       =   16777215
  108.       ForeColor       =   16711680
  109.       HeadLines       =   1.5
  110.       RowHeight       =   15
  111.       BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  112.          Name            =   "宋体"
  113.          Size            =   9
  114.          Charset         =   134
  115.          Weight          =   400
  116.          Underline       =   0   'False
  117.          Italic          =   0   'False
  118.          Strikethrough   =   0   'False
  119.       EndProperty
  120.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  121.          Name            =   "宋体"
  122.          Size            =   9
  123.          Charset         =   134
  124.          Weight          =   400
  125.          Underline       =   0   'False
  126.          Italic          =   0   'False
  127.          Strikethrough   =   0   'False
  128.       EndProperty
  129.       Caption         =   "中草药代码库"
  130.       ColumnCount     =   2
  131.       BeginProperty Column00 
  132.          DataField       =   ""
  133.          Caption         =   ""
  134.          BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  135.             Type            =   0
  136.             Format          =   ""
  137.             HaveTrueFalseNull=   0
  138.             FirstDayOfWeek  =   0
  139.             FirstWeekOfYear =   0
  140.             LCID            =   2052
  141.             SubFormatType   =   0
  142.          EndProperty
  143.       EndProperty
  144.       BeginProperty Column01 
  145.          DataField       =   ""
  146.          Caption         =   ""
  147.          BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  148.             Type            =   0
  149.             Format          =   ""
  150.             HaveTrueFalseNull=   0
  151.             FirstDayOfWeek  =   0
  152.             FirstWeekOfYear =   0
  153.             LCID            =   2052
  154.             SubFormatType   =   0
  155.          EndProperty
  156.       EndProperty
  157.       SplitCount      =   1
  158.       BeginProperty Split0 
  159.          BeginProperty Column00 
  160.          EndProperty
  161.          BeginProperty Column01 
  162.          EndProperty
  163.       EndProperty
  164.    End
  165.    Begin MSDataGridLib.DataGrid DataGrid1 
  166.       Height          =   3970
  167.       Left            =   120
  168.       TabIndex        =   0
  169.       Top             =   120
  170.       Width           =   3105
  171.       _ExtentX        =   5477
  172.       _ExtentY        =   7011
  173.       _Version        =   393216
  174.       AllowUpdate     =   0   'False
  175.       BackColor       =   16777215
  176.       ForeColor       =   16711680
  177.       HeadLines       =   1.5
  178.       RowHeight       =   15
  179.       BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  180.          Name            =   "宋体"
  181.          Size            =   9
  182.          Charset         =   134
  183.          Weight          =   400
  184.          Underline       =   0   'False
  185.          Italic          =   0   'False
  186.          Strikethrough   =   0   'False
  187.       EndProperty
  188.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  189.          Name            =   "宋体"
  190.          Size            =   9
  191.          Charset         =   134
  192.          Weight          =   400
  193.          Underline       =   0   'False
  194.          Italic          =   0   'False
  195.          Strikethrough   =   0   'False
  196.       EndProperty
  197.       Caption         =   "西药、中成药代码库"
  198.       ColumnCount     =   2
  199.       BeginProperty Column00 
  200.          DataField       =   ""
  201.          Caption         =   ""
  202.          BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  203.             Type            =   0
  204.             Format          =   ""
  205.             HaveTrueFalseNull=   0
  206.             FirstDayOfWeek  =   0
  207.             FirstWeekOfYear =   0
  208.             LCID            =   2052
  209.             SubFormatType   =   0
  210.          EndProperty
  211.       EndProperty
  212.       BeginProperty Column01 
  213.          DataField       =   ""
  214.          Caption         =   ""
  215.          BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  216.             Type            =   0
  217.             Format          =   ""
  218.             HaveTrueFalseNull=   0
  219.             FirstDayOfWeek  =   0
  220.             FirstWeekOfYear =   0
  221.             LCID            =   2052
  222.             SubFormatType   =   0
  223.          EndProperty
  224.       EndProperty
  225.       SplitCount      =   1
  226.       BeginProperty Split0 
  227.          BeginProperty Column00 
  228.          EndProperty
  229.          BeginProperty Column01 
  230.          EndProperty
  231.       EndProperty
  232.    End
  233.    Begin MSAdodcLib.Adodc Adodc3 
  234.       Height          =   330
  235.       Left            =   6720
  236.       Top             =   4200
  237.       Visible         =   0   'False
  238.       Width           =   1200
  239.       _ExtentX        =   2117
  240.       _ExtentY        =   582
  241.       ConnectMode     =   0
  242.       CursorLocation  =   3
  243.       IsolationLevel  =   -1
  244.       ConnectionTimeout=   15
  245.       CommandTimeout  =   30
  246.       CursorType      =   3
  247.       LockType        =   3
  248.       CommandType     =   8
  249.       CursorOptions   =   0
  250.       CacheSize       =   50
  251.       MaxRecords      =   0
  252.       BOFAction       =   0
  253.       EOFAction       =   0
  254.       ConnectStringType=   1
  255.       Appearance      =   1
  256.       BackColor       =   -2147483643
  257.       ForeColor       =   -2147483640
  258.       Orientation     =   0
  259.       Enabled         =   -1
  260.       Connect         =   ""
  261.       OLEDBString     =   ""
  262.       OLEDBFile       =   ""
  263.       DataSourceName  =   ""
  264.       OtherAttributes =   ""
  265.       UserName        =   ""
  266.       Password        =   ""
  267.       RecordSource    =   ""
  268.       Caption         =   "Adodc3"
  269.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  270.          Name            =   "宋体"
  271.          Size            =   9
  272.          Charset         =   134
  273.          Weight          =   400
  274.          Underline       =   0   'False
  275.          Italic          =   0   'False
  276.          Strikethrough   =   0   'False
  277.       EndProperty
  278.       _Version        =   393216
  279.    End
  280.    Begin MSAdodcLib.Adodc Adodc2 
  281.       Height          =   330
  282.       Left            =   5280
  283.       Top             =   4200
  284.       Visible         =   0   'False
  285.       Width           =   1200
  286.       _ExtentX        =   2117
  287.       _ExtentY        =   582
  288.       ConnectMode     =   0
  289.       CursorLocation  =   3
  290.       IsolationLevel  =   -1
  291.       ConnectionTimeout=   15
  292.       CommandTimeout  =   30
  293.       CursorType      =   3
  294.       LockType        =   3
  295.       CommandType     =   8
  296.       CursorOptions   =   0
  297.       CacheSize       =   50
  298.       MaxRecords      =   0
  299.       BOFAction       =   0
  300.       EOFAction       =   0
  301.       ConnectStringType=   1
  302.       Appearance      =   1
  303.       BackColor       =   -2147483643
  304.       ForeColor       =   -2147483640
  305.       Orientation     =   0
  306.       Enabled         =   -1
  307.       Connect         =   ""
  308.       OLEDBString     =   ""
  309.       OLEDBFile       =   ""
  310.       DataSourceName  =   ""
  311.       OtherAttributes =   ""
  312.       UserName        =   ""
  313.       Password        =   ""
  314.       RecordSource    =   ""
  315.       Caption         =   "Adodc2"
  316.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  317.          Name            =   "宋体"
  318.          Size            =   9
  319.          Charset         =   134
  320.          Weight          =   400
  321.          Underline       =   0   'False
  322.          Italic          =   0   'False
  323.          Strikethrough   =   0   'False
  324.       EndProperty
  325.       _Version        =   393216
  326.    End
  327.    Begin MSAdodcLib.Adodc Adodc1 
  328.       Height          =   330
  329.       Left            =   3720
  330.       Top             =   4200
  331.       Visible         =   0   'False
  332.       Width           =   1200
  333.       _ExtentX        =   2117
  334.       _ExtentY        =   582
  335.       ConnectMode     =   0
  336.       CursorLocation  =   3
  337.       IsolationLevel  =   -1
  338.       ConnectionTimeout=   15
  339.       CommandTimeout  =   30
  340.       CursorType      =   3
  341.       LockType        =   3
  342.       CommandType     =   8
  343.       CursorOptions   =   0
  344.       CacheSize       =   50
  345.       MaxRecords      =   0
  346.       BOFAction       =   0
  347.       EOFAction       =   0
  348.       ConnectStringType=   1
  349.       Appearance      =   1
  350.       BackColor       =   -2147483643
  351.       ForeColor       =   -2147483640
  352.       Orientation     =   0
  353.       Enabled         =   -1
  354.       Connect         =   ""
  355.       OLEDBString     =   ""
  356.       OLEDBFile       =   ""
  357.       DataSourceName  =   ""
  358.       OtherAttributes =   ""
  359.       UserName        =   ""
  360.       Password        =   ""
  361.       RecordSource    =   ""
  362.       Caption         =   "Adodc1"
  363.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  364.          Name            =   "宋体"
  365.          Size            =   9
  366.          Charset         =   134
  367.          Weight          =   400
  368.          Underline       =   0   'False
  369.          Italic          =   0   'False
  370.          Strikethrough   =   0   'False
  371.       EndProperty
  372.       _Version        =   393216
  373.    End
  374.    Begin VB.Label Label1 
  375.       AutoSize        =   -1  'True
  376.       BackStyle       =   0  'Transparent
  377.       ForeColor       =   &H00000000&
  378.       Height          =   180
  379.       Left            =   360
  380.       TabIndex        =   4
  381.       Top             =   4320
  382.       Width           =   90
  383.    End
  384. End
  385. Attribute VB_Name = "frmcode"
  386. Attribute VB_GlobalNameSpace = False
  387. Attribute VB_Creatable = False
  388. Attribute VB_PredeclaredId = True
  389. Attribute VB_Exposed = False
  390. Private Sub Command1_Click()
  391. Unload Me
  392. End Sub
  393. Private Sub DataGrid1_GotFocus()
  394. Label1.Caption = "目前已编制药品代码" & Adodc1.Recordset.RecordCount & "种。"
  395. End Sub
  396. Private Sub DataGrid2_GotFocus()
  397. Label1.Caption = "目前已编制中草药代码" & Adodc2.Recordset.RecordCount & "种。"
  398. End Sub
  399. Private Sub DataGrid3_GotFocus()
  400. Label1.Caption = "目前已编制器械材料代码" & Adodc3.Recordset.RecordCount & "种。"
  401. End Sub
  402. Private Sub Form_Load()
  403. On Error GoTo err1
  404. frmcode.Top = (frmmain.Height - frmcode.Height) / 2 - 500
  405. frmcode.Left = (frmmain.Width - frmcode.Width) / 2
  406. Adodc1.ConnectionString = frmlogin.conn
  407. Adodc2.ConnectionString = frmlogin.conn
  408. Adodc3.ConnectionString = frmlogin.conn
  409. Adodc1.RecordSource = "select 编号,代码,药品名称,规格 from ypcode order by 编号"
  410. Adodc1.Refresh
  411. Set DataGrid1.DataSource = Adodc1
  412. DataGrid1.Columns(1).Width = 1000
  413. DataGrid1.Columns(2).Width = 1000
  414. DataGrid1.Columns(3).Width = 1000
  415. DataGrid1.Columns(0).Width = 1000
  416. Adodc2.RecordSource = "select 编号,代码,名称,规格 from cycode order by 编号"
  417. Adodc2.Refresh
  418. Set DataGrid2.DataSource = Adodc2
  419. DataGrid2.Columns(1).Width = 1000
  420. DataGrid2.Columns(2).Width = 1000
  421. DataGrid2.Columns(3).Width = 1000
  422. DataGrid2.Columns(0).Width = 1000
  423. Adodc3.RecordSource = "select 编号,代码,名称,规格 from qxcode order by 编号"
  424. Adodc3.Refresh
  425. Set DataGrid3.DataSource = Adodc3
  426. DataGrid3.Columns(1).Width = 1000
  427. DataGrid3.Columns(2).Width = 1000
  428. DataGrid3.Columns(3).Width = 1000
  429. DataGrid3.Columns(0).Width = 1000
  430. Exit Sub
  431. err1:
  432. MsgBox "数据库连接失败!"
  433. End Sub
  434. Private Sub Form_Unload(Cancel As Integer)
  435. frmmain.StatusBar1.Panels(2) = "目前没有窗口被激活"
  436. End Sub
  437. Private Sub Form_Activate()
  438. frmmain.StatusBar1.Panels(2) = "活动窗口:" & frmcode.Caption
  439. End Sub