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

SCSI/ASPI

开发平台:

Others

  1. VERSION 5.00
  2. Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
  3. Begin VB.Form cpu 
  4.    Caption         =   "CPU"
  5.    ClientHeight    =   7830
  6.    ClientLeft      =   60
  7.    ClientTop       =   450
  8.    ClientWidth     =   7755
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   7830
  11.    ScaleWidth      =   7755
  12.    StartUpPosition =   3  '窗口缺省
  13.    Begin VB.Frame Frame1 
  14.       Caption         =   "CPU"
  15.       Height          =   6975
  16.       Left            =   120
  17.       TabIndex        =   0
  18.       Top             =   120
  19.       Width           =   7335
  20.       Begin VB.CommandButton Command2 
  21.          Caption         =   "返回"
  22.          Height          =   495
  23.          Left            =   4200
  24.          TabIndex        =   28
  25.          Top             =   6000
  26.          Width           =   1695
  27.       End
  28.       Begin VB.CommandButton Command1 
  29.          Caption         =   "添加"
  30.          Height          =   495
  31.          Left            =   1560
  32.          TabIndex        =   27
  33.          Top             =   6000
  34.          Width           =   1695
  35.       End
  36.       Begin MSAdodcLib.Adodc Adodc1 
  37.          Height          =   495
  38.          Left            =   4320
  39.          Top             =   5160
  40.          Visible         =   0   'False
  41.          Width           =   2415
  42.          _ExtentX        =   4260
  43.          _ExtentY        =   873
  44.          ConnectMode     =   0
  45.          CursorLocation  =   3
  46.          IsolationLevel  =   -1
  47.          ConnectionTimeout=   15
  48.          CommandTimeout  =   30
  49.          CursorType      =   3
  50.          LockType        =   3
  51.          CommandType     =   8
  52.          CursorOptions   =   0
  53.          CacheSize       =   50
  54.          MaxRecords      =   0
  55.          BOFAction       =   0
  56.          EOFAction       =   0
  57.          ConnectStringType=   1
  58.          Appearance      =   1
  59.          BackColor       =   -2147483643
  60.          ForeColor       =   -2147483640
  61.          Orientation     =   0
  62.          Enabled         =   -1
  63.          Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zzu.mdb;Persist Security Info=False"
  64.          OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zzu.mdb;Persist Security Info=False"
  65.          OLEDBFile       =   ""
  66.          DataSourceName  =   ""
  67.          OtherAttributes =   ""
  68.          UserName        =   ""
  69.          Password        =   ""
  70.          RecordSource    =   ""
  71.          Caption         =   "Adodc1"
  72.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  73.             Name            =   "宋体"
  74.             Size            =   9
  75.             Charset         =   134
  76.             Weight          =   400
  77.             Underline       =   0   'False
  78.             Italic          =   0   'False
  79.             Strikethrough   =   0   'False
  80.          EndProperty
  81.          _Version        =   393216
  82.       End
  83.       Begin VB.TextBox Text13 
  84.          Height          =   375
  85.          Left            =   1320
  86.          TabIndex        =   26
  87.          Top             =   4440
  88.          Width           =   2175
  89.       End
  90.       Begin VB.TextBox Text12 
  91.          Height          =   375
  92.          Left            =   4680
  93.          TabIndex        =   25
  94.          Top             =   3720
  95.          Width           =   2295
  96.       End
  97.       Begin VB.TextBox Text11 
  98.          Height          =   375
  99.          Left            =   1320
  100.          TabIndex        =   24
  101.          Top             =   3720
  102.          Width           =   2175
  103.       End
  104.       Begin VB.TextBox Text10 
  105.          Height          =   375
  106.          Left            =   4680
  107.          TabIndex        =   23
  108.          Top             =   3120
  109.          Width           =   2295
  110.       End
  111.       Begin VB.TextBox Text9 
  112.          Height          =   375
  113.          Left            =   1320
  114.          TabIndex        =   22
  115.          Top             =   3120
  116.          Width           =   2175
  117.       End
  118.       Begin VB.TextBox Text8 
  119.          Height          =   375
  120.          Left            =   4680
  121.          TabIndex        =   21
  122.          Top             =   2400
  123.          Width           =   2295
  124.       End
  125.       Begin VB.TextBox Text7 
  126.          Height          =   375
  127.          Left            =   1320
  128.          TabIndex        =   20
  129.          Top             =   2400
  130.          Width           =   2175
  131.       End
  132.       Begin VB.TextBox Text6 
  133.          Height          =   375
  134.          Left            =   4680
  135.          TabIndex        =   19
  136.          Top             =   1680
  137.          Width           =   2295
  138.       End
  139.       Begin VB.TextBox Text5 
  140.          Height          =   375
  141.          Left            =   1320
  142.          TabIndex        =   18
  143.          Top             =   1800
  144.          Width           =   2175
  145.       End
  146.       Begin VB.TextBox Text4 
  147.          Height          =   375
  148.          Left            =   4680
  149.          TabIndex        =   17
  150.          Top             =   1080
  151.          Width           =   2295
  152.       End
  153.       Begin VB.TextBox Text3 
  154.          Height          =   375
  155.          Left            =   1320
  156.          TabIndex        =   16
  157.          Top             =   1080
  158.          Width           =   2175
  159.       End
  160.       Begin VB.TextBox Text2 
  161.          Height          =   375
  162.          Left            =   4680
  163.          TabIndex        =   15
  164.          Top             =   360
  165.          Width           =   2295
  166.       End
  167.       Begin VB.TextBox Text1 
  168.          Height          =   375
  169.          Left            =   1320
  170.          TabIndex        =   14
  171.          Top             =   360
  172.          Width           =   2175
  173.       End
  174.       Begin VB.Label Label14 
  175.          Caption         =   "注意格式:年-月-日"
  176.          Height          =   375
  177.          Left            =   3840
  178.          TabIndex        =   29
  179.          Top             =   4440
  180.          Width           =   1695
  181.       End
  182.       Begin VB.Label Label13 
  183.          Caption         =   "添加日期:"
  184.          Height          =   375
  185.          Left            =   240
  186.          TabIndex        =   13
  187.          Top             =   4560
  188.          Width           =   975
  189.       End
  190.       Begin VB.Label Label12 
  191.          Caption         =   "L2缓存:"
  192.          Height          =   375
  193.          Left            =   3720
  194.          TabIndex        =   12
  195.          Top             =   3840
  196.          Width           =   855
  197.       End
  198.       Begin VB.Label Label11 
  199.          Caption         =   "L1缓存:"
  200.          Height          =   255
  201.          Left            =   240
  202.          TabIndex        =   11
  203.          Top             =   3840
  204.          Width           =   735
  205.       End
  206.       Begin VB.Label Label10 
  207.          Caption         =   "针脚数:"
  208.          Height          =   255
  209.          Left            =   3720
  210.          TabIndex        =   10
  211.          Top             =   3240
  212.          Width           =   855
  213.       End
  214.       Begin VB.Label Label9 
  215.          Caption         =   "插槽类型:"
  216.          Height          =   255
  217.          Left            =   120
  218.          TabIndex        =   9
  219.          Top             =   3240
  220.          Width           =   975
  221.       End
  222.       Begin VB.Label Label8 
  223.          Caption         =   "总线频率:"
  224.          Height          =   255
  225.          Left            =   3720
  226.          TabIndex        =   8
  227.          Top             =   2520
  228.          Width           =   975
  229.       End
  230.       Begin VB.Label Label7 
  231.          Caption         =   "主频:"
  232.          Height          =   255
  233.          Left            =   480
  234.          TabIndex        =   7
  235.          Top             =   2520
  236.          Width           =   615
  237.       End
  238.       Begin VB.Label Label6 
  239.          Caption         =   "核心数量:"
  240.          Height          =   375
  241.          Left            =   3720
  242.          TabIndex        =   6
  243.          Top             =   1800
  244.          Width           =   975
  245.       End
  246.       Begin VB.Label Label5 
  247.          Caption         =   "CPU内核:"
  248.          Height          =   255
  249.          Left            =   240
  250.          TabIndex        =   5
  251.          Top             =   1920
  252.          Width           =   855
  253.       End
  254.       Begin VB.Label Label4 
  255.          Caption         =   "数量:"
  256.          Height          =   375
  257.          Left            =   3960
  258.          TabIndex        =   4
  259.          Top             =   1200
  260.          Width           =   615
  261.       End
  262.       Begin VB.Label Label3 
  263.          Caption         =   "价格:"
  264.          Height          =   255
  265.          Left            =   600
  266.          TabIndex        =   3
  267.          Top             =   1200
  268.          Width           =   615
  269.       End
  270.       Begin VB.Label Label2 
  271.          Caption         =   "品牌:"
  272.          Height          =   375
  273.          Left            =   3960
  274.          TabIndex        =   2
  275.          Top             =   480
  276.          Width           =   615
  277.       End
  278.       Begin VB.Label Label1 
  279.          Caption         =   "产品名称:"
  280.          Height          =   375
  281.          Left            =   240
  282.          TabIndex        =   1
  283.          Top             =   480
  284.          Width           =   975
  285.       End
  286.    End
  287. End
  288. Attribute VB_Name = "cpu"
  289. Attribute VB_GlobalNameSpace = False
  290. Attribute VB_Creatable = False
  291. Attribute VB_PredeclaredId = True
  292. Attribute VB_Exposed = False
  293. Private Sub Command1_Click()
  294. Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zzu.mdb;Persist Security Info=False"
  295. 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) <> "" And Trim(Text11.Text) <> "" And Trim(Text12.Text) <> "" And Trim(Text13.Text) <> "" Then
  296.              Adodc1.RecordSource = "select * from cpu where GoodsName='" & Trim(Text1.Text) & " '"
  297.              Adodc1.Refresh
  298.              If Adodc1.Recordset.EOF Then
  299.                  Adodc1.Recordset.AddNew
  300.                  Adodc1.Recordset.Fields("GoodsName") = Trim(Text1.Text)
  301.                  
  302.                  Adodc1.Recordset.Fields("GoodsBrand") = Trim(Text2.Text)
  303.                  Adodc1.Recordset.Fields("MarketPrice") = Trim(Text3.Text)
  304.                  Adodc1.Recordset.Fields("GoodsUnit") = Trim(Text4.Text)
  305.                  Adodc1.Recordset.Fields("Kernel") = Trim(Text5.Text)
  306.                  Adodc1.Recordset.Fields("Corenumber") = Trim(Text6.Text)
  307.                  Adodc1.Recordset.Fields("Master") = Trim(Text7.Text)
  308.                  Adodc1.Recordset.Fields("Frequency") = Trim(Text8.Text)
  309.                  Adodc1.Recordset.Fields("Slot") = Trim(Text9.Text)
  310.                  Adodc1.Recordset.Fields("Pin") = Trim(Text10.Text)
  311.                  Adodc1.Recordset.Fields("L1cache") = Trim(Text11.Text)
  312.                  Adodc1.Recordset.Fields("L2cache") = Trim(Text12.Text)
  313.                  Adodc1.Recordset.Fields("AddDate") = Trim(Text13.Text)
  314.                  Adodc1.Recordset.Update
  315.                  Adodc1.Refresh
  316.                  MsgBox (" 恭喜您已经添加成功到数据库!")
  317.              End If
  318.               Else
  319.             MsgBox ("请您把信息填完整,信息不能为空!")
  320. End If
  321. End Sub
  322. Private Sub Command2_Click()
  323. xsp.Show
  324. End Sub
  325. Private Sub Form_Load()
  326. Text13.Text = Format(Now, "yyyy-mm-dd ")
  327. End Sub