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

医药行业

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
  3. Begin VB.Form frmcaoqi 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "其它库存品调拨"
  6.    ClientHeight    =   3675
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   7800
  10.    DrawStyle       =   1  'Dash
  11.    Icon            =   "caoqi.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    MaxButton       =   0   'False
  15.    MDIChild        =   -1  'True
  16.    MinButton       =   0   'False
  17.    Picture         =   "caoqi.frx":030A
  18.    ScaleHeight     =   3675
  19.    ScaleWidth      =   7800
  20.    ShowInTaskbar   =   0   'False
  21.    Begin VB.ComboBox Combo1 
  22.       ForeColor       =   &H00000000&
  23.       Height          =   300
  24.       ItemData        =   "caoqi.frx":59F9
  25.       Left            =   1560
  26.       List            =   "caoqi.frx":5A03
  27.       TabIndex        =   44
  28.       Top             =   3200
  29.       Width           =   1335
  30.    End
  31.    Begin MSAdodcLib.Adodc Adodc2 
  32.       Height          =   330
  33.       Left            =   3720
  34.       Top             =   3000
  35.       Visible         =   0   'False
  36.       Width           =   1200
  37.       _ExtentX        =   2117
  38.       _ExtentY        =   582
  39.       ConnectMode     =   0
  40.       CursorLocation  =   3
  41.       IsolationLevel  =   -1
  42.       ConnectionTimeout=   15
  43.       CommandTimeout  =   30
  44.       CursorType      =   3
  45.       LockType        =   3
  46.       CommandType     =   8
  47.       CursorOptions   =   0
  48.       CacheSize       =   50
  49.       MaxRecords      =   0
  50.       BOFAction       =   0
  51.       EOFAction       =   0
  52.       ConnectStringType=   1
  53.       Appearance      =   1
  54.       BackColor       =   -2147483643
  55.       ForeColor       =   -2147483640
  56.       Orientation     =   0
  57.       Enabled         =   -1
  58.       Connect         =   ""
  59.       OLEDBString     =   ""
  60.       OLEDBFile       =   ""
  61.       DataSourceName  =   ""
  62.       OtherAttributes =   ""
  63.       UserName        =   ""
  64.       Password        =   ""
  65.       RecordSource    =   ""
  66.       Caption         =   "Adodc2"
  67.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  68.          Name            =   "宋体"
  69.          Size            =   9
  70.          Charset         =   134
  71.          Weight          =   400
  72.          Underline       =   0   'False
  73.          Italic          =   0   'False
  74.          Strikethrough   =   0   'False
  75.       EndProperty
  76.       _Version        =   393216
  77.    End
  78.    Begin VB.TextBox Text10 
  79.       ForeColor       =   &H000000FF&
  80.       Height          =   300
  81.       Left            =   1080
  82.       TabIndex        =   43
  83.       Top             =   240
  84.       Width           =   1300
  85.    End
  86.    Begin VB.CommandButton Command1 
  87.       Caption         =   "登记&(N)"
  88.       Height          =   350
  89.       Left            =   5160
  90.       TabIndex        =   39
  91.       Top             =   3180
  92.       Width           =   1100
  93.    End
  94.    Begin VB.CommandButton Command3 
  95.       Caption         =   "关闭&(Q)"
  96.       Height          =   350
  97.       Left            =   6480
  98.       TabIndex        =   38
  99.       Top             =   3180
  100.       Width           =   1100
  101.    End
  102.    Begin VB.PictureBox Picture1 
  103.       Height          =   600
  104.       Left            =   240
  105.       Picture         =   "caoqi.frx":5A1D
  106.       ScaleHeight     =   540
  107.       ScaleWidth      =   7275
  108.       TabIndex        =   26
  109.       Top             =   2430
  110.       Width           =   7335
  111.       Begin VB.TextBox Text5 
  112.          Alignment       =   1  'Right Justify
  113.          BackColor       =   &H00FFFFFF&
  114.          ForeColor       =   &H000000FF&
  115.          Height          =   270
  116.          Left            =   6240
  117.          MaxLength       =   10
  118.          TabIndex        =   31
  119.          Top             =   120
  120.          Width           =   800
  121.       End
  122.       Begin VB.TextBox Text4 
  123.          Alignment       =   1  'Right Justify
  124.          BackColor       =   &H00FFFFFF&
  125.          ForeColor       =   &H000000FF&
  126.          Height          =   270
  127.          Left            =   4560
  128.          MaxLength       =   2
  129.          TabIndex        =   30
  130.          Top             =   120
  131.          Width           =   400
  132.       End
  133.       Begin VB.TextBox Text3 
  134.          Alignment       =   1  'Right Justify
  135.          BackColor       =   &H00FFFFFF&
  136.          ForeColor       =   &H000000FF&
  137.          Height          =   270
  138.          Left            =   3840
  139.          MaxLength       =   2
  140.          TabIndex        =   29
  141.          Top             =   120
  142.          Width           =   400
  143.       End
  144.       Begin VB.TextBox Text2 
  145.          Alignment       =   1  'Right Justify
  146.          BackColor       =   &H00FFFFFF&
  147.          ForeColor       =   &H000000FF&
  148.          Height          =   270
  149.          Left            =   3000
  150.          MaxLength       =   4
  151.          TabIndex        =   28
  152.          Top             =   120
  153.          Width           =   500
  154.       End
  155.       Begin VB.TextBox Text1 
  156.          Alignment       =   1  'Right Justify
  157.          BackColor       =   &H00FFFFFF&
  158.          ForeColor       =   &H000000FF&
  159.          Height          =   270
  160.          Left            =   1000
  161.          TabIndex        =   27
  162.          Top             =   120
  163.          Width           =   800
  164.       End
  165.       Begin VB.Label Label6 
  166.          AutoSize        =   -1  'True
  167.          BackColor       =   &H00404040&
  168.          BackStyle       =   0  'Transparent
  169.          Caption         =   "日"
  170.          ForeColor       =   &H00000000&
  171.          Height          =   180
  172.          Left            =   5025
  173.          TabIndex        =   37
  174.          Top             =   165
  175.          Width           =   180
  176.       End
  177.       Begin VB.Label Label5 
  178.          AutoSize        =   -1  'True
  179.          BackColor       =   &H00404040&
  180.          BackStyle       =   0  'Transparent
  181.          Caption         =   "月"
  182.          ForeColor       =   &H00000000&
  183.          Height          =   180
  184.          Left            =   4320
  185.          TabIndex        =   36
  186.          Top             =   165
  187.          Width           =   180
  188.       End
  189.       Begin VB.Label Label4 
  190.          AutoSize        =   -1  'True
  191.          BackColor       =   &H00404040&
  192.          BackStyle       =   0  'Transparent
  193.          Caption         =   "年"
  194.          ForeColor       =   &H00000000&
  195.          Height          =   180
  196.          Left            =   3570
  197.          TabIndex        =   35
  198.          Top             =   165
  199.          Width           =   180
  200.       End
  201.       Begin VB.Label Label3 
  202.          AutoSize        =   -1  'True
  203.          BackColor       =   &H00404040&
  204.          BackStyle       =   0  'Transparent
  205.          Caption         =   "调拨人"
  206.          ForeColor       =   &H00000000&
  207.          Height          =   180
  208.          Left            =   5640
  209.          TabIndex        =   34
  210.          Top             =   165
  211.          Width           =   540
  212.       End
  213.       Begin VB.Label Label2 
  214.          AutoSize        =   -1  'True
  215.          BackColor       =   &H00404040&
  216.          BackStyle       =   0  'Transparent
  217.          Caption         =   "调拨日期"
  218.          ForeColor       =   &H00000000&
  219.          Height          =   180
  220.          Left            =   2160
  221.          TabIndex        =   33
  222.          Top             =   165
  223.          Width           =   720
  224.       End
  225.       Begin VB.Label Label1 
  226.          AutoSize        =   -1  'True
  227.          BackColor       =   &H00404040&
  228.          BackStyle       =   0  'Transparent
  229.          Caption         =   "调出数量"
  230.          ForeColor       =   &H00000000&
  231.          Height          =   180
  232.          Left            =   240
  233.          TabIndex        =   32
  234.          Top             =   165
  235.          Width           =   720
  236.       End
  237.    End
  238.    Begin VB.PictureBox Picture2 
  239.       Height          =   1695
  240.       Left            =   240
  241.       Picture         =   "caoqi.frx":B10C
  242.       ScaleHeight     =   1635
  243.       ScaleWidth      =   7275
  244.       TabIndex        =   1
  245.       Top             =   630
  246.       Width           =   7335
  247.       Begin VB.TextBox Text6 
  248.          Alignment       =   1  'Right Justify
  249.          BackColor       =   &H00FFFFFF&
  250.          ForeColor       =   &H000000FF&
  251.          Height          =   270
  252.          Index           =   2
  253.          Left            =   4320
  254.          Locked          =   -1  'True
  255.          TabIndex        =   12
  256.          Top             =   480
  257.          Width           =   1000
  258.       End
  259.       Begin VB.TextBox Text6 
  260.          Alignment       =   1  'Right Justify
  261.          BackColor       =   &H00FFFFFF&
  262.          ForeColor       =   &H000000FF&
  263.          Height          =   270
  264.          Index           =   3
  265.          Left            =   6000
  266.          Locked          =   -1  'True
  267.          TabIndex        =   11
  268.          Top             =   480
  269.          Width           =   1000
  270.       End
  271.       Begin VB.TextBox Text6 
  272.          Alignment       =   1  'Right Justify
  273.          BackColor       =   &H00FFFFFF&
  274.          ForeColor       =   &H000000FF&
  275.          Height          =   270
  276.          Index           =   4
  277.          Left            =   840
  278.          Locked          =   -1  'True
  279.          TabIndex        =   10
  280.          Top             =   840
  281.          Width           =   1000
  282.       End
  283.       Begin VB.TextBox Text6 
  284.          Alignment       =   1  'Right Justify
  285.          BackColor       =   &H00FFFFFF&
  286.          ForeColor       =   &H000000FF&
  287.          Height          =   270
  288.          Index           =   5
  289.          Left            =   2640
  290.          Locked          =   -1  'True
  291.          TabIndex        =   9
  292.          Top             =   840
  293.          Width           =   1000
  294.       End
  295.       Begin VB.TextBox Text6 
  296.          Alignment       =   1  'Right Justify
  297.          BackColor       =   &H00FFFFFF&
  298.          ForeColor       =   &H000000FF&
  299.          Height          =   270
  300.          Index           =   7
  301.          Left            =   840
  302.          Locked          =   -1  'True
  303.          TabIndex        =   8
  304.          Top             =   1200
  305.          Width           =   1000
  306.       End
  307.       Begin VB.TextBox Text6 
  308.          Alignment       =   1  'Right Justify
  309.          BackColor       =   &H00FFFFFF&
  310.          ForeColor       =   &H000000FF&
  311.          Height          =   270
  312.          Index           =   8
  313.          Left            =   4320
  314.          Locked          =   -1  'True
  315.          TabIndex        =   7
  316.          Top             =   1200
  317.          Width           =   600
  318.       End
  319.       Begin VB.TextBox Text6 
  320.          Alignment       =   1  'Right Justify
  321.          BackColor       =   &H00FFFFFF&
  322.          ForeColor       =   &H000000FF&
  323.          Height          =   270
  324.          Index           =   9
  325.          Left            =   5280
  326.          Locked          =   -1  'True
  327.          TabIndex        =   6
  328.          Top             =   1200
  329.          Width           =   400
  330.       End
  331.       Begin VB.TextBox Text6 
  332.          Alignment       =   1  'Right Justify
  333.          BackColor       =   &H00FFFFFF&
  334.          ForeColor       =   &H000000FF&
  335.          Height          =   270
  336.          Index           =   10
  337.          Left            =   6000
  338.          Locked          =   -1  'True
  339.          TabIndex        =   5
  340.          Top             =   1200
  341.          Width           =   400
  342.       End
  343.       Begin VB.TextBox Text6 
  344.          Alignment       =   1  'Right Justify
  345.          BackColor       =   &H00FFFFFF&
  346.          ForeColor       =   &H000000FF&
  347.          Height          =   270
  348.          Index           =   6
  349.          Left            =   4320
  350.          Locked          =   -1  'True
  351.          TabIndex        =   4
  352.          Top             =   840
  353.          Width           =   2685
  354.       End
  355.       Begin VB.TextBox Text7 
  356.          Alignment       =   1  'Right Justify
  357.          BackColor       =   &H00FFFFFF&
  358.          ForeColor       =   &H000000FF&
  359.          Height          =   270
  360.          Left            =   840
  361.          TabIndex        =   3
  362.          Top             =   480
  363.          Width           =   1000
  364.       End
  365.       Begin VB.TextBox Text8 
  366.          Alignment       =   1  'Right Justify
  367.          BackColor       =   &H00FFFFFF&
  368.          ForeColor       =   &H000000FF&
  369.          Height          =   270
  370.          Left            =   2640
  371.          Locked          =   -1  'True
  372.          TabIndex        =   2
  373.          Top             =   480
  374.          Width           =   1000
  375.       End
  376.       Begin MSAdodcLib.Adodc Adodc5 
  377.          Height          =   330
  378.          Left            =   6000
  379.          Top             =   50
  380.          Visible         =   0   'False
  381.          Width           =   1200
  382.          _ExtentX        =   2117
  383.          _ExtentY        =   582
  384.          ConnectMode     =   0
  385.          CursorLocation  =   3
  386.          IsolationLevel  =   -1
  387.          ConnectionTimeout=   15
  388.          CommandTimeout  =   30
  389.          CursorType      =   3
  390.          LockType        =   3
  391.          CommandType     =   8
  392.          CursorOptions   =   0
  393.          CacheSize       =   50
  394.          MaxRecords      =   0
  395.          BOFAction       =   0
  396.          EOFAction       =   0
  397.          ConnectStringType=   1
  398.          Appearance      =   1
  399.          BackColor       =   -2147483643
  400.          ForeColor       =   -2147483640
  401.          Orientation     =   0
  402.          Enabled         =   -1
  403.          Connect         =   ""
  404.          OLEDBString     =   ""
  405.          OLEDBFile       =   ""
  406.          DataSourceName  =   ""
  407.          OtherAttributes =   ""
  408.          UserName        =   ""
  409.          Password        =   ""
  410.          RecordSource    =   ""
  411.          Caption         =   "Adodc5"
  412.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  413.             Name            =   "宋体"
  414.             Size            =   9
  415.             Charset         =   134
  416.             Weight          =   400
  417.             Underline       =   0   'False
  418.             Italic          =   0   'False
  419.             Strikethrough   =   0   'False
  420.          EndProperty
  421.          _Version        =   393216
  422.       End
  423.       Begin MSAdodcLib.Adodc Adodc4 
  424.          Height          =   330
  425.          Left            =   4680
  426.          Top             =   50
  427.          Visible         =   0   'False
  428.          Width           =   1200
  429.          _ExtentX        =   2117
  430.          _ExtentY        =   582
  431.          ConnectMode     =   0
  432.          CursorLocation  =   3
  433.          IsolationLevel  =   -1
  434.          ConnectionTimeout=   15
  435.          CommandTimeout  =   30
  436.          CursorType      =   3
  437.          LockType        =   3
  438.          CommandType     =   8
  439.          CursorOptions   =   0
  440.          CacheSize       =   50
  441.          MaxRecords      =   0
  442.          BOFAction       =   0
  443.          EOFAction       =   0
  444.          ConnectStringType=   1
  445.          Appearance      =   1
  446.          BackColor       =   -2147483643
  447.          ForeColor       =   -2147483640
  448.          Orientation     =   0
  449.          Enabled         =   -1
  450.          Connect         =   ""
  451.          OLEDBString     =   ""
  452.          OLEDBFile       =   ""
  453.          DataSourceName  =   ""
  454.          OtherAttributes =   ""
  455.          UserName        =   ""
  456.          Password        =   ""
  457.          RecordSource    =   ""
  458.          Caption         =   "Adodc4"
  459.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  460.             Name            =   "宋体"
  461.             Size            =   9
  462.             Charset         =   134
  463.             Weight          =   400
  464.             Underline       =   0   'False
  465.             Italic          =   0   'False
  466.             Strikethrough   =   0   'False
  467.          EndProperty
  468.          _Version        =   393216
  469.       End
  470.       Begin VB.Label Label7 
  471.          AutoSize        =   -1  'True
  472.          BackStyle       =   0  'Transparent
  473.          Caption         =   "编  号"
  474.          Height          =   180
  475.          Index           =   1
  476.          Left            =   240
  477.          TabIndex        =   25
  478.          Top             =   525
  479.          Width           =   540
  480.       End
  481.       Begin VB.Label Label7 
  482.          AutoSize        =   -1  'True
  483.          BackStyle       =   0  'Transparent
  484.          Caption         =   "名  称"
  485.          Height          =   180
  486.          Index           =   2
  487.          Left            =   2040
  488.          TabIndex        =   24
  489.          Top             =   530
  490.          Width           =   540
  491.       End
  492.       Begin VB.Label Label7 
  493.          AutoSize        =   -1  'True
  494.          BackStyle       =   0  'Transparent
  495.          Caption         =   "规格"
  496.          Height          =   180
  497.          Index           =   3
  498.          Left            =   3880
  499.          TabIndex        =   23
  500.          Top             =   530
  501.          Width           =   360
  502.       End
  503.       Begin VB.Label Label7 
  504.          AutoSize        =   -1  'True
  505.          BackStyle       =   0  'Transparent
  506.          Caption         =   "单位"
  507.          Height          =   180
  508.          Index           =   4
  509.          Left            =   5570
  510.          TabIndex        =   22
  511.          Top             =   525
  512.          Width           =   360
  513.       End
  514.       Begin VB.Label Label7 
  515.          AutoSize        =   -1  'True
  516.          BackStyle       =   0  'Transparent
  517.          Caption         =   "数  量"
  518.          Height          =   180
  519.          Index           =   5
  520.          Left            =   240
  521.          TabIndex        =   21
  522.          Top             =   885
  523.          Width           =   540
  524.       End
  525.       Begin VB.Label Label7 
  526.          AutoSize        =   -1  'True
  527.          BackStyle       =   0  'Transparent
  528.          Caption         =   "零售价"
  529.          Height          =   180
  530.          Index           =   6
  531.          Left            =   2040
  532.          TabIndex        =   20
  533.          Top             =   890
  534.          Width           =   540
  535.       End
  536.       Begin VB.Label Label7 
  537.          AutoSize        =   -1  'True
  538.          BackStyle       =   0  'Transparent
  539.          Caption         =   "产地"
  540.          Height          =   180
  541.          Index           =   7
  542.          Left            =   3880
  543.          TabIndex        =   19
  544.          Top             =   890
  545.          Width           =   360
  546.       End
  547.       Begin VB.Label Label7 
  548.          AutoSize        =   -1  'True
  549.          BackStyle       =   0  'Transparent
  550.          Caption         =   "批  号"
  551.          Height          =   180
  552.          Index           =   8
  553.          Left            =   240
  554.          TabIndex        =   18
  555.          Top             =   1245
  556.          Width           =   540
  557.       End
  558.       Begin VB.Label Label7 
  559.          AutoSize        =   -1  'True
  560.          BackStyle       =   0  'Transparent
  561.          Caption         =   "失效期"
  562.          Height          =   180
  563.          Index           =   9
  564.          Left            =   3720
  565.          TabIndex        =   17
  566.          Top             =   1245
  567.          Width           =   540
  568.       End
  569.       Begin VB.Label Label7 
  570.          AutoSize        =   -1  'True
  571.          BackStyle       =   0  'Transparent
  572.          Caption         =   "请输入调拨药品编号"
  573.          ForeColor       =   &H00000000&
  574.          Height          =   180
  575.          Index           =   0
  576.          Left            =   240
  577.          TabIndex        =   16
  578.          Top             =   120
  579.          Width           =   1620
  580.       End
  581.       Begin VB.Label Label8 
  582.          AutoSize        =   -1  'True
  583.          BackStyle       =   0  'Transparent
  584.          Caption         =   "年"
  585.          Height          =   180
  586.          Left            =   5025
  587.          TabIndex        =   15
  588.          Top             =   1245
  589.          Width           =   180
  590.       End
  591.       Begin VB.Label Label9 
  592.          AutoSize        =   -1  'True
  593.          BackStyle       =   0  'Transparent
  594.          Caption         =   "月"
  595.          Height          =   180
  596.          Left            =   5745
  597.          TabIndex        =   14
  598.          Top             =   1245
  599.          Width           =   180
  600.       End
  601.       Begin VB.Label Label10 
  602.          AutoSize        =   -1  'True
  603.          BackStyle       =   0  'Transparent
  604.          Caption         =   "日"
  605.          Height          =   180
  606.          Left            =   6435
  607.          TabIndex        =   13
  608.          Top             =   1245
  609.          Width           =   180
  610.       End
  611.    End
  612.    Begin VB.TextBox Text9 
  613.       BackColor       =   &H00FFFFFF&
  614.       ForeColor       =   &H000000FF&
  615.       Height          =   300
  616.       Left            =   3960
  617.       TabIndex        =   0
  618.       Top             =   240
  619.       Width           =   3615
  620.    End
  621.    Begin MSAdodcLib.Adodc Adodc1 
  622.       Height          =   330
  623.       Left            =   3720
  624.       Top             =   3360
  625.       Visible         =   0   'False
  626.       Width           =   1215
  627.       _ExtentX        =   2143
  628.       _ExtentY        =   582
  629.       ConnectMode     =   0
  630.       CursorLocation  =   3
  631.       IsolationLevel  =   -1
  632.       ConnectionTimeout=   15
  633.       CommandTimeout  =   30
  634.       CursorType      =   3
  635.       LockType        =   3
  636.       CommandType     =   8
  637.       CursorOptions   =   0
  638.       CacheSize       =   50
  639.       MaxRecords      =   0
  640.       BOFAction       =   0
  641.       EOFAction       =   0
  642.       ConnectStringType=   1
  643.       Appearance      =   1
  644.       BackColor       =   -2147483643
  645.       ForeColor       =   -2147483640
  646.       Orientation     =   0
  647.       Enabled         =   -1
  648.       Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:himshis.mdb;Persist Security Info=False"
  649.       OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:himshis.mdb;Persist Security Info=False"
  650.       OLEDBFile       =   ""
  651.       DataSourceName  =   ""
  652.       OtherAttributes =   ""
  653.       UserName        =   ""
  654.       Password        =   ""
  655.       RecordSource    =   "select * from ypdb order by ID"
  656.       Caption         =   "Adodc1"
  657.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  658.          Name            =   "宋体"
  659.          Size            =   9
  660.          Charset         =   134
  661.          Weight          =   400
  662.          Underline       =   0   'False
  663.          Italic          =   0   'False
  664.          Strikethrough   =   0   'False
  665.       EndProperty
  666.       _Version        =   393216
  667.    End
  668.    Begin VB.Label Label11 
  669.       AutoSize        =   -1  'True
  670.       BackStyle       =   0  'Transparent
  671.       Caption         =   "调拨部门"
  672.       Height          =   180
  673.       Left            =   240
  674.       TabIndex        =   42
  675.       Top             =   300
  676.       Width           =   720
  677.    End
  678.    Begin VB.Label Label12 
  679.       AutoSize        =   -1  'True
  680.       BackStyle       =   0  'Transparent
  681.       Caption         =   "调拨备注"
  682.       ForeColor       =   &H00000000&
  683.       Height          =   180
  684.       Left            =   3120
  685.       TabIndex        =   41
  686.       Top             =   300
  687.       Width           =   720
  688.    End
  689.    Begin VB.Label result 
  690.       AutoSize        =   -1  'True
  691.       BackStyle       =   0  'Transparent
  692.       Caption         =   "选择调拨数据库"
  693.       ForeColor       =   &H00000000&
  694.       Height          =   180
  695.       Left            =   240
  696.       TabIndex        =   40
  697.       Top             =   3250
  698.       Width           =   1260
  699.    End
  700. End
  701. Attribute VB_Name = "frmcaoqi"
  702. Attribute VB_GlobalNameSpace = False
  703. Attribute VB_Creatable = False
  704. Attribute VB_PredeclaredId = True
  705. Attribute VB_Exposed = False
  706. Public jiage As Currency
  707. Public shulian As Integer
  708. Public drq3 As String
  709. Public drq4 As String
  710. Public Sub dbdj()
  711. On Error GoTo err1
  712. With Adodc1
  713.     .RecordSource = "select * from " & frmmain.datas & " where 编号='" & Text7.Text & "'"
  714.     .Refresh
  715. If .Recordset.Fields("失效标记") = False Then
  716.     shuliang = Str(Text6(4).Text) - Str(Text1.Text)
  717.     .Recordset.Fields("数量") = shuliang
  718.     .Recordset.Fields("零售合计") = .Recordset.Fields("零售价") * shuliang
  719.     .Recordset.Fields("进价合计") = .Recordset.Fields("进价") * shuliang
  720.     .Recordset.Fields("差额") = .Recordset.Fields("零售合计") - .Recordset.Fields("进价合计")
  721.     .Recordset.Update
  722.     With Adodc4
  723.     .RecordSource = "select * from ypdb order by ID"
  724.     .Refresh
  725.     .Recordset.AddNew
  726.     .Recordset.Fields("编号") = Text7.Text
  727.     .Recordset.Fields("名称") = Text8.Text
  728.     .Recordset.Fields("规格") = Text6(2).Text
  729.     .Recordset.Fields("单位") = Text6(3).Text
  730.     .Recordset.Fields("数量") = Text1.Text
  731.     .Recordset.Fields("零售价") = Text6(5).Text
  732.     .Recordset.Fields("进价") = jiage
  733.     .Recordset.Fields("产地") = Text6(6).Text
  734.     .Recordset.Fields("批号") = Text6(7).Text
  735.     .Recordset.Fields("调拨部门") = Text10.Text
  736.     drq3 = Text6(8).Text & "-" & Text6(9).Text & "-" & Text6(10).Text
  737.     .Recordset.Fields("失效期") = CDate(rq3)
  738.     .Recordset.Fields("调拨人") = Text5.Text
  739.     drq4 = Text2.Text & "-" & Text3.Text & "-" & Text4.Text
  740.     .Recordset.Fields("调拨日期") = CDate(rq4)
  741.     .Recordset.Fields("备注") = Text9.Text
  742.     .Recordset.Update
  743.     End With
  744. Else
  745.     MsgBox "该产品已经失效,不能调拨!"
  746. End If
  747. End With
  748.     Command1.Enabled = False
  749. Exit Sub
  750. err1:
  751. MsgBox "当前数据库更新失败,药品或器械尚未出库!"
  752. End Sub
  753. Private Sub Combo1_Click()
  754. If Combo1.Text = "器械材料库" Then
  755.     frmmain.datas = "qixie"
  756.     frmcaoqi.Caption = "器械材料调拨登记"
  757.     Text7.Enabled = True
  758.     With Adodc1
  759.     .RecordSource = "select * from " & frmmain.datas & " where 失效标记=false"
  760.     .Refresh
  761.     For i = 0 To .Recordset.RecordCount
  762.     If Not .Recordset.EOF Then
  763.         If .Recordset.Fields("失效期") <= Date Then
  764.             .Recordset.Fields("失效标记") = True
  765.             .Recordset.Update
  766.         Else
  767.             .Recordset.Fields("失效标记") = False
  768.             .Recordset.Update
  769.         End If
  770.     .Recordset.MoveNext
  771.     End If
  772.     Next
  773.     End With
  774. End If
  775. If Combo1.Text = "中草药库" Then
  776.     frmmain.datas = "caoyao"
  777.     frmcaoqi.Caption = "中草药调拨登记"
  778.     Text7.Enabled = True
  779.     With Adodc1
  780.     .RecordSource = "select * from " & frmmain.datas & " where 失效标记=false"
  781.     .Refresh
  782.     For i = 0 To .Recordset.RecordCount
  783.     If Not .Recordset.EOF Then
  784.         If .Recordset.Fields("失效期") <= Date Then
  785.             .Recordset.Fields("失效标记") = True
  786.             .Recordset.Update
  787.         Else
  788.             .Recordset.Fields("失效标记") = False
  789.             .Recordset.Update
  790.         End If
  791.     .Recordset.MoveNext
  792.     End If
  793.     Next
  794.     End With
  795. End If
  796. If Combo1.Text <> "器械材料库" And Combo1.Text <> "中草药库" Then
  797.     Command1.Enabled = False
  798.     Text7.Enabled = False
  799.     frmcaoqi.Caption = "其它库存品调拨"
  800. End If
  801. End Sub
  802. Private Sub Command1_Click()
  803. '过滤失效药品器械
  804. On Error GoTo err2
  805. If Text10.Text <> "" Then
  806. If Str(Text1.Text) <= Str(Text6(4).Text) Then
  807.     Text9.Text = Text6(4).Text
  808.     If Text1.Text = 0 Or Text2.Text = "" Or Text5.Text = "" Then
  809.         MsgBox "调拨数量不能为零,调拨日期和调拨人必须填写!"
  810.     Else
  811.         Call dbdj
  812.     End If
  813. Else
  814.     Text9.Text = Text1.Text & Text6(4).Text
  815.     MsgBox "调出量大于库存量!当前库存量为:" & Text6(4).Text & Text6(3).Text
  816.     Command1.Enabled = False
  817. End If
  818. Else
  819. MsgBox "调拨部门必须填写!"
  820. End If
  821. Exit Sub
  822. err2:
  823. MsgBox "数据类型不匹配或库存数据出错!"
  824. End Sub
  825. Private Sub Command3_Click()
  826. Unload Me
  827. End Sub
  828. Private Sub Form_Load()
  829. On Error GoTo err3
  830. frmcaoqi.Top = (frmmain.Height - frmcaoqi.Height) / 2 - 500
  831. frmcaoqi.Left = (frmmain.Width - frmcaoqi.Width) / 2
  832. Adodc1.ConnectionString = frmlogin.conn
  833. Adodc2.ConnectionString = frmlogin.conn
  834. Adodc4.ConnectionString = frmlogin.conn
  835. Adodc5.ConnectionString = frmlogin.conn
  836. Command1.Enabled = False
  837. Text2.Text = Year(Date)
  838. Text3.Text = Month(Date)
  839. Text4.Text = Day(Date)
  840. Text9.Text = "无"
  841. Text1.Text = 0
  842. Text7.Enabled = False
  843. Exit Sub
  844. err3:
  845. MsgBox "数据库连接失败!"
  846. End Sub
  847. Private Sub Text10_Change()
  848. On Error GoTo err4
  849. Text5.Text = ""
  850. With Adodc2
  851. .RecordSource = "select 科室名称,代码 from kscode where 代码='" & Text10.Text & "'"
  852. .Refresh
  853. If .Recordset.AbsolutePosition <> adPosUnknown Then
  854. Text10.Text = .Recordset.Fields("科室名称")
  855. End If
  856. End With
  857. Exit Sub
  858. err4:
  859. MsgBox "数据库连接失败!"
  860. End Sub
  861. Private Sub Text7_Change()
  862. '库存为零时不能调拨药品
  863. On Error GoTo err4
  864. With Adodc1
  865. .RecordSource = "select * from " & frmmain.datas & " where 编号='" & Text7.Text & "' and 失效标记=false"
  866. .Refresh
  867. If .Recordset.AbsolutePosition <> adPosUnknown Then
  868. Text8.Text = .Recordset.Fields("名称")
  869. Text6(2).Text = .Recordset.Fields("规格")
  870. Text6(3).Text = .Recordset.Fields("单位")
  871. Text6(4).Text = .Recordset.Fields("数量")
  872. jiage = .Recordset.Fields("进价")
  873. Text6(5).Text = .Recordset.Fields("零售价")
  874. Text6(6).Text = .Recordset.Fields("产地")
  875. Text6(7).Text = .Recordset.Fields("批号")
  876. Text6(8).Text = Year(.Recordset.Fields("失效期"))
  877. Text6(9).Text = Month(.Recordset.Fields("失效期"))
  878. Text6(10).Text = Day(.Recordset.Fields("失效期"))
  879. Command1.Enabled = True
  880. Label7(0).Caption = ""
  881. If Text6(4).Text = 0 Then
  882. MsgBox "该产品库存已空,不能调拨!"
  883. Text1.Text = ""
  884. Command1.Enabled = False
  885. Else
  886. Command1.Enabled = True
  887. End If
  888. Else
  889. Label7(0).Caption = "提示:没有编号为“" & Text7.Text & "”的药品或器械或已失效!"
  890. Command1.Enabled = False
  891. Text8.Text = ""
  892. For i = 2 To 10
  893. Text6(i) = ""
  894. Next
  895. End If
  896. End With
  897. Exit Sub
  898. err4:
  899. MsgBox "原始数据有错或数据库连接失败!"
  900. End Sub
  901. Private Sub Form_Unload(Cancel As Integer)
  902. frmmain.StatusBar1.Panels(2) = "目前没有窗口被激活"
  903. End Sub
  904. Private Sub Form_Activate()
  905. frmmain.StatusBar1.Panels(2) = "活动窗口:" & frmcaoqi.Caption
  906. End Sub
  907. Private Sub Text1_GotFocus()
  908. Text1.SelStart = 0
  909. Text1.SelLength = Len(Text1.Text)
  910. End Sub
  911. Private Sub Text7_GotFocus()
  912. Text7.SelStart = 0
  913. Text7.SelLength = Len(Text7.Text)
  914. End Sub
  915. Private Sub Text5_Change()
  916. On Error GoTo err0
  917. With Adodc5
  918. .RecordSource = "select 姓名,代码 from dotcode where 代码='" & Text5.Text & "'"
  919. .Refresh
  920. If .Recordset.AbsolutePosition <> adPosUnknown Then
  921. Text5.Text = .Recordset.Fields("姓名")
  922. End If
  923. End With
  924. Exit Sub
  925. err0:
  926. MsgBox "数据库连接失败!"
  927. End Sub