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

SCSI/ASPI

开发平台:

Others

  1. VERSION 5.00
  2. Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
  3. Begin VB.Form harddisk 
  4.    Caption         =   "硬盘"
  5.    ClientHeight    =   5760
  6.    ClientLeft      =   60
  7.    ClientTop       =   450
  8.    ClientWidth     =   8040
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   5760
  11.    ScaleWidth      =   8040
  12.    StartUpPosition =   3  '窗口缺省
  13.    Begin VB.Frame Frame1 
  14.       Caption         =   "硬盘"
  15.       Height          =   5295
  16.       Left            =   120
  17.       TabIndex        =   0
  18.       Top             =   120
  19.       Width           =   7455
  20.       Begin MSAdodcLib.Adodc Adodc1 
  21.          Height          =   615
  22.          Left            =   5280
  23.          Top             =   4440
  24.          Visible         =   0   'False
  25.          Width           =   1455
  26.          _ExtentX        =   2566
  27.          _ExtentY        =   1085
  28.          ConnectMode     =   0
  29.          CursorLocation  =   3
  30.          IsolationLevel  =   -1
  31.          ConnectionTimeout=   15
  32.          CommandTimeout  =   30
  33.          CursorType      =   3
  34.          LockType        =   3
  35.          CommandType     =   8
  36.          CursorOptions   =   0
  37.          CacheSize       =   50
  38.          MaxRecords      =   0
  39.          BOFAction       =   0
  40.          EOFAction       =   0
  41.          ConnectStringType=   1
  42.          Appearance      =   1
  43.          BackColor       =   -2147483643
  44.          ForeColor       =   -2147483640
  45.          Orientation     =   0
  46.          Enabled         =   -1
  47.          Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zzu.mdb;Persist Security Info=False"
  48.          OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zzu.mdb;Persist Security Info=False"
  49.          OLEDBFile       =   ""
  50.          DataSourceName  =   ""
  51.          OtherAttributes =   ""
  52.          UserName        =   ""
  53.          Password        =   ""
  54.          RecordSource    =   ""
  55.          Caption         =   "Adodc1"
  56.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  57.             Name            =   "宋体"
  58.             Size            =   9
  59.             Charset         =   134
  60.             Weight          =   400
  61.             Underline       =   0   'False
  62.             Italic          =   0   'False
  63.             Strikethrough   =   0   'False
  64.          EndProperty
  65.          _Version        =   393216
  66.       End
  67.       Begin VB.CommandButton Command2 
  68.          Caption         =   "返回"
  69.          Height          =   615
  70.          Left            =   2640
  71.          TabIndex        =   23
  72.          Top             =   4440
  73.          Width           =   1455
  74.       End
  75.       Begin VB.CommandButton Command1 
  76.          Caption         =   "添加"
  77.          Height          =   615
  78.          Left            =   360
  79.          TabIndex        =   22
  80.          Top             =   4440
  81.          Width           =   1455
  82.       End
  83.       Begin VB.TextBox Text10 
  84.          Height          =   375
  85.          Left            =   1320
  86.          TabIndex        =   20
  87.          Top             =   3600
  88.          Width           =   2295
  89.       End
  90.       Begin VB.TextBox Text9 
  91.          Height          =   375
  92.          Left            =   1320
  93.          TabIndex        =   19
  94.          Top             =   3000
  95.          Width           =   1935
  96.       End
  97.       Begin VB.TextBox Text8 
  98.          Height          =   375
  99.          Left            =   4680
  100.          TabIndex        =   18
  101.          Top             =   2040
  102.          Width           =   2175
  103.       End
  104.       Begin VB.TextBox Text7 
  105.          Height          =   375
  106.          Left            =   1320
  107.          TabIndex        =   17
  108.          Top             =   2280
  109.          Width           =   1935
  110.       End
  111.       Begin VB.TextBox Text6 
  112.          Height          =   375
  113.          Left            =   4680
  114.          TabIndex        =   16
  115.          Top             =   1440
  116.          Width           =   2175
  117.       End
  118.       Begin VB.TextBox Text5 
  119.          Height          =   375
  120.          Left            =   1320
  121.          TabIndex        =   10
  122.          Top             =   1560
  123.          Width           =   1935
  124.       End
  125.       Begin VB.TextBox Text4 
  126.          Height          =   375
  127.          Left            =   4680
  128.          TabIndex        =   8
  129.          Top             =   840
  130.          Width           =   2175
  131.       End
  132.       Begin VB.TextBox Text3 
  133.          Height          =   375
  134.          Left            =   1320
  135.          TabIndex        =   6
  136.          Top             =   840
  137.          Width           =   1935
  138.       End
  139.       Begin VB.TextBox Text2 
  140.          Height          =   375
  141.          Left            =   4680
  142.          TabIndex        =   4
  143.          Top             =   240
  144.          Width           =   2175
  145.       End
  146.       Begin VB.TextBox Text1 
  147.          Height          =   375
  148.          Left            =   1320
  149.          TabIndex        =   2
  150.          Top             =   240
  151.          Width           =   1935
  152.       End
  153.       Begin VB.Label Label11 
  154.          Caption         =   "注意格式:年-月-日"
  155.          Height          =   255
  156.          Left            =   3840
  157.          TabIndex        =   21
  158.          Top             =   3600
  159.          Width           =   2175
  160.       End
  161.       Begin VB.Label Label10 
  162.          Caption         =   "添加日期:"
  163.          Height          =   375
  164.          Left            =   360
  165.          TabIndex        =   15
  166.          Top             =   3600
  167.          Width           =   975
  168.       End
  169.       Begin VB.Label Label9 
  170.          Caption         =   "磁头(个):"
  171.          Height          =   375
  172.          Left            =   360
  173.          TabIndex        =   14
  174.          Top             =   3120
  175.          Width           =   975
  176.       End
  177.       Begin VB.Label Label8 
  178.          Caption         =   "转速/分:"
  179.          Height          =   255
  180.          Left            =   3600
  181.          TabIndex        =   13
  182.          Top             =   2160
  183.          Width           =   975
  184.       End
  185.       Begin VB.Label Label7 
  186.          Caption         =   "缓存(MB):"
  187.          Height          =   255
  188.          Left            =   360
  189.          TabIndex        =   12
  190.          Top             =   2400
  191.          Width           =   975
  192.       End
  193.       Begin VB.Label Label6 
  194.          Caption         =   "接口类型:"
  195.          Height          =   375
  196.          Left            =   3720
  197.          TabIndex        =   11
  198.          Top             =   1560
  199.          Width           =   975
  200.       End
  201.       Begin VB.Label Label5 
  202.          Caption         =   "硬盘容量:"
  203.          Height          =   255
  204.          Left            =   360
  205.          TabIndex        =   9
  206.          Top             =   1680
  207.          Width           =   975
  208.       End
  209.       Begin VB.Label Label4 
  210.          Caption         =   "数量:"
  211.          Height          =   375
  212.          Left            =   3840
  213.          TabIndex        =   7
  214.          Top             =   960
  215.          Width           =   735
  216.       End
  217.       Begin VB.Label Label3 
  218.          Caption         =   "价格:"
  219.          Height          =   375
  220.          Left            =   720
  221.          TabIndex        =   5
  222.          Top             =   960
  223.          Width           =   615
  224.       End
  225.       Begin VB.Label Label2 
  226.          Caption         =   "品牌:"
  227.          Height          =   375
  228.          Left            =   3840
  229.          TabIndex        =   3
  230.          Top             =   360
  231.          Width           =   615
  232.       End
  233.       Begin VB.Label Label1 
  234.          Caption         =   "产品名称:"
  235.          Height          =   255
  236.          Left            =   360
  237.          TabIndex        =   1
  238.          Top             =   360
  239.          Width           =   975
  240.       End
  241.    End
  242. End
  243. Attribute VB_Name = "harddisk"
  244. Attribute VB_GlobalNameSpace = False
  245. Attribute VB_Creatable = False
  246. Attribute VB_PredeclaredId = True
  247. Attribute VB_Exposed = False
  248. Private Sub Command1_Click()
  249. Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zzu.mdb;Persist Security Info=False"
  250. If Trim(Text1.Text) <> "" And Trim(Text2.Text) <> "" And Trim(Text3.Text) <> "" And Trim(Text4.Text) <> "" And Trim(Text5.Text) <> "" And Trim(Text6.Text) <> "" And Trim(Text7.Text) <> "" And Trim(Text8.Text) <> "" And Trim(Text9.Text) <> "" And Trim(Text10.Text) <> "" Then
  251.              Adodc1.RecordSource = "select * from harddisk where GoodsName='" & Trim(Text1.Text) & " '"
  252.              Adodc1.Refresh
  253.              If Adodc1.Recordset.EOF Then
  254.                  Adodc1.Recordset.AddNew
  255.                  Adodc1.Recordset.Fields("GoodsName") = Trim(Text1.Text)
  256.                  
  257.                  Adodc1.Recordset.Fields("GoodsBrand") = Trim(Text2.Text)
  258.                  Adodc1.Recordset.Fields("MarketPrice") = Trim(Text3.Text)
  259.                  Adodc1.Recordset.Fields("GoodsUnit") = Trim(Text4.Text)
  260.                  Adodc1.Recordset.Fields("Content") = Trim(Text5.Text)
  261.                  Adodc1.Recordset.Fields("Interfacetype") = Trim(Text6.Text)
  262.                  Adodc1.Recordset.Fields("Cache") = Trim(Text7.Text)
  263.                  Adodc1.Recordset.Fields("Rev") = Trim(Text8.Text)
  264.                  Adodc1.Recordset.Fields("Head") = Trim(Text9.Text)
  265.                  
  266.                  Adodc1.Recordset.Fields("AddDate") = Trim(Text10.Text)
  267.                  Adodc1.Recordset.Update
  268.                  Adodc1.Refresh
  269.                  MsgBox (" 恭喜您已经添加成功到数据库!")
  270.              End If
  271.               Else
  272.             MsgBox ("请您把信息填完整,信息不能为空!")
  273. End If
  274. End Sub
  275. Private Sub Command2_Click()
  276. xsp.Show
  277. End Sub
  278. Private Sub Form_Load()
  279. Text10.Text = Format(Now, "yyyy-mm-dd ")
  280. End Sub