cd-rom.frm
上传用户:vtryaojia
上传日期:2020-04-18
资源大小:1214k
文件大小:7k
源码类别:

SCSI/ASPI

开发平台:

Others

  1. VERSION 5.00
  2. Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
  3. Begin VB.Form cd 
  4.    Caption         =   "光驱"
  5.    ClientHeight    =   5520
  6.    ClientLeft      =   60
  7.    ClientTop       =   450
  8.    ClientWidth     =   6045
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   5520
  11.    ScaleWidth      =   6045
  12.    StartUpPosition =   3  '窗口缺省
  13.    Begin VB.Frame Frame1 
  14.       Caption         =   "光驱"
  15.       Height          =   5175
  16.       Left            =   120
  17.       TabIndex        =   0
  18.       Top             =   120
  19.       Width           =   5535
  20.       Begin VB.CommandButton Command2 
  21.          Caption         =   "返回"
  22.          Height          =   495
  23.          Left            =   2160
  24.          TabIndex        =   15
  25.          Top             =   4440
  26.          Width           =   1095
  27.       End
  28.       Begin MSAdodcLib.Adodc Adodc1 
  29.          Height          =   495
  30.          Left            =   3600
  31.          Top             =   4440
  32.          Visible         =   0   'False
  33.          Width           =   1575
  34.          _ExtentX        =   2778
  35.          _ExtentY        =   873
  36.          ConnectMode     =   0
  37.          CursorLocation  =   3
  38.          IsolationLevel  =   -1
  39.          ConnectionTimeout=   15
  40.          CommandTimeout  =   30
  41.          CursorType      =   3
  42.          LockType        =   3
  43.          CommandType     =   8
  44.          CursorOptions   =   0
  45.          CacheSize       =   50
  46.          MaxRecords      =   0
  47.          BOFAction       =   0
  48.          EOFAction       =   0
  49.          ConnectStringType=   1
  50.          Appearance      =   1
  51.          BackColor       =   -2147483643
  52.          ForeColor       =   -2147483640
  53.          Orientation     =   0
  54.          Enabled         =   -1
  55.          Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zzu.mdb;Persist Security Info=False"
  56.          OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zzu.mdb;Persist Security Info=False"
  57.          OLEDBFile       =   ""
  58.          DataSourceName  =   ""
  59.          OtherAttributes =   ""
  60.          UserName        =   ""
  61.          Password        =   ""
  62.          RecordSource    =   ""
  63.          Caption         =   "Adodc1"
  64.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  65.             Name            =   "宋体"
  66.             Size            =   9
  67.             Charset         =   134
  68.             Weight          =   400
  69.             Underline       =   0   'False
  70.             Italic          =   0   'False
  71.             Strikethrough   =   0   'False
  72.          EndProperty
  73.          _Version        =   393216
  74.       End
  75.       Begin VB.CommandButton Command1 
  76.          Caption         =   "添加"
  77.          Height          =   495
  78.          Left            =   360
  79.          TabIndex        =   14
  80.          Top             =   4440
  81.          Width           =   1215
  82.       End
  83.       Begin VB.TextBox Text6 
  84.          Height          =   375
  85.          Left            =   1320
  86.          TabIndex        =   12
  87.          Top             =   3480
  88.          Width           =   2055
  89.       End
  90.       Begin VB.TextBox Text5 
  91.          Height          =   375
  92.          Left            =   1320
  93.          TabIndex        =   11
  94.          Top             =   2880
  95.          Width           =   2055
  96.       End
  97.       Begin VB.TextBox Text4 
  98.          Height          =   375
  99.          Left            =   1320
  100.          TabIndex        =   10
  101.          Top             =   2280
  102.          Width           =   2055
  103.       End
  104.       Begin VB.TextBox Text3 
  105.          Height          =   375
  106.          Left            =   1320
  107.          TabIndex        =   9
  108.          Top             =   1560
  109.          Width           =   2055
  110.       End
  111.       Begin VB.TextBox Text2 
  112.          Height          =   375
  113.          Left            =   1320
  114.          TabIndex        =   8
  115.          Top             =   960
  116.          Width           =   2055
  117.       End
  118.       Begin VB.TextBox Text1 
  119.          Height          =   375
  120.          Left            =   1320
  121.          TabIndex        =   7
  122.          Top             =   240
  123.          Width           =   2055
  124.       End
  125.       Begin VB.Label Label7 
  126.          Caption         =   "注意格式:年-月-日"
  127.          Height          =   375
  128.          Left            =   3600
  129.          TabIndex        =   13
  130.          Top             =   3600
  131.          Width           =   1695
  132.       End
  133.       Begin VB.Label Label6 
  134.          Caption         =   "添加日期:"
  135.          Height          =   375
  136.          Left            =   240
  137.          TabIndex        =   6
  138.          Top             =   3600
  139.          Width           =   975
  140.       End
  141.       Begin VB.Label Label5 
  142.          Caption         =   "光驱种类:"
  143.          Height          =   375
  144.          Left            =   240
  145.          TabIndex        =   5
  146.          Top             =   3000
  147.          Width           =   1095
  148.       End
  149.       Begin VB.Label Label4 
  150.          Caption         =   "数量:"
  151.          Height          =   375
  152.          Left            =   600
  153.          TabIndex        =   4
  154.          Top             =   2280
  155.          Width           =   615
  156.       End
  157.       Begin VB.Label Label3 
  158.          Caption         =   "价格:"
  159.          Height          =   375
  160.          Left            =   600
  161.          TabIndex        =   3
  162.          Top             =   1680
  163.          Width           =   615
  164.       End
  165.       Begin VB.Label Label2 
  166.          Caption         =   "品牌:"
  167.          Height          =   375
  168.          Left            =   600
  169.          TabIndex        =   2
  170.          Top             =   960
  171.          Width           =   615
  172.       End
  173.       Begin VB.Label Label1 
  174.          Caption         =   "产品名称:"
  175.          Height          =   375
  176.          Left            =   240
  177.          TabIndex        =   1
  178.          Top             =   360
  179.          Width           =   1215
  180.       End
  181.    End
  182. End
  183. Attribute VB_Name = "cd"
  184. Attribute VB_GlobalNameSpace = False
  185. Attribute VB_Creatable = False
  186. Attribute VB_PredeclaredId = True
  187. Attribute VB_Exposed = False
  188. Private Sub Command1_Click()
  189. Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zzu.mdb;Persist Security Info=False"
  190. If Trim(Text1.Text) <> "" And Trim(Text2.Text) <> "" And Trim(Text3.Text) <> "" And Trim(Text4.Text) <> "" And Trim(Text5.Text) <> "" And Trim(Text6.Text) <> "" Then
  191.              Adodc1.RecordSource = "select * from cd-rom where GoodsName='" & Trim(Text1.Text) & " '"
  192.              Adodc1.Refresh
  193.              If Adodc1.Recordset.EOF Then
  194.                  Adodc1.Recordset.AddNew
  195.                  Adodc1.Recordset.Fields("GoodsName") = Trim(Text1.Text)
  196.                  Adodc1.Recordset.Fields("GoodsBrand") = Trim(Text2.Text)
  197.                  Adodc1.Recordset.Fields("MarketPrice") = Trim(Text3.Text)
  198.                  Adodc1.Recordset.Fields("GoodsUnit") = Trim(Text4.Text)
  199.                  Adodc1.Recordset.Fields("Breed") = Trim(Text5.Text)
  200.                  
  201.                  Adodc1.Recordset.Fields("AddDate") = Trim(Text6.Text)
  202.                  
  203.                  Adodc1.Recordset.Update
  204.                  Adodc1.Refresh
  205.                  MsgBox (" 恭喜您已经添加成功到数据库!")
  206.              End If
  207.               Else
  208.             MsgBox ("请您把信息填完整,信息不能为空!")
  209. End If
  210. End Sub
  211. Private Sub Command2_Click()
  212. xsp.Show
  213. End Sub
  214. Private Sub Form_Load()
  215. Text6.Text = Format(Now, "yyyy-mm-dd ")
  216. End Sub