power.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 power 
  4.    Caption         =   "PC电源"
  5.    ClientHeight    =   5880
  6.    ClientLeft      =   60
  7.    ClientTop       =   450
  8.    ClientWidth     =   7920
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   5880
  11.    ScaleWidth      =   7920
  12.    StartUpPosition =   3  '窗口缺省
  13.    Begin VB.Frame Frame1 
  14.       Caption         =   "PC电源"
  15.       Height          =   5535
  16.       Left            =   240
  17.       TabIndex        =   0
  18.       Top             =   120
  19.       Width           =   7215
  20.       Begin MSAdodcLib.Adodc Adodc1 
  21.          Height          =   495
  22.          Left            =   4680
  23.          Top             =   4680
  24.          Visible         =   0   'False
  25.          Width           =   1695
  26.          _ExtentX        =   2990
  27.          _ExtentY        =   873
  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          =   495
  70.          Left            =   2520
  71.          TabIndex        =   27
  72.          Top             =   4680
  73.          Width           =   1215
  74.       End
  75.       Begin VB.CommandButton Command1 
  76.          Caption         =   "添加"
  77.          Height          =   495
  78.          Left            =   600
  79.          TabIndex        =   26
  80.          Top             =   4680
  81.          Width           =   1215
  82.       End
  83.       Begin VB.TextBox Text12 
  84.          Height          =   375
  85.          Left            =   1320
  86.          TabIndex        =   24
  87.          Top             =   3960
  88.          Width           =   2655
  89.       End
  90.       Begin VB.TextBox Text11 
  91.          Height          =   375
  92.          Left            =   1320
  93.          TabIndex        =   23
  94.          Top             =   3360
  95.          Width           =   1815
  96.       End
  97.       Begin VB.TextBox Text10 
  98.          Height          =   375
  99.          Left            =   4440
  100.          TabIndex        =   22
  101.          Top             =   2640
  102.          Width           =   2055
  103.       End
  104.       Begin VB.TextBox Text9 
  105.          Height          =   375
  106.          Left            =   1320
  107.          TabIndex        =   21
  108.          Top             =   2640
  109.          Width           =   1815
  110.       End
  111.       Begin VB.TextBox Text8 
  112.          Height          =   375
  113.          Left            =   4440
  114.          TabIndex        =   20
  115.          Top             =   2040
  116.          Width           =   2055
  117.       End
  118.       Begin VB.TextBox Text7 
  119.          Height          =   375
  120.          Left            =   1320
  121.          TabIndex        =   19
  122.          Top             =   2040
  123.          Width           =   1815
  124.       End
  125.       Begin VB.TextBox Text6 
  126.          Height          =   375
  127.          Left            =   4440
  128.          TabIndex        =   18
  129.          Top             =   1440
  130.          Width           =   2055
  131.       End
  132.       Begin VB.TextBox Text5 
  133.          Height          =   375
  134.          Left            =   1320
  135.          TabIndex        =   17
  136.          Top             =   1440
  137.          Width           =   1815
  138.       End
  139.       Begin VB.TextBox Text4 
  140.          Height          =   375
  141.          Left            =   4440
  142.          TabIndex        =   16
  143.          Top             =   840
  144.          Width           =   2055
  145.       End
  146.       Begin VB.TextBox Text3 
  147.          Height          =   375
  148.          Left            =   1320
  149.          TabIndex        =   15
  150.          Top             =   840
  151.          Width           =   1815
  152.       End
  153.       Begin VB.TextBox Text2 
  154.          Height          =   375
  155.          Left            =   4440
  156.          TabIndex        =   14
  157.          Top             =   240
  158.          Width           =   2055
  159.       End
  160.       Begin VB.TextBox Text1 
  161.          Height          =   375
  162.          Left            =   1320
  163.          TabIndex        =   13
  164.          Top             =   240
  165.          Width           =   1815
  166.       End
  167.       Begin VB.Label Label13 
  168.          Caption         =   "注意格式:年-月-日"
  169.          Height          =   495
  170.          Left            =   4200
  171.          TabIndex        =   25
  172.          Top             =   4080
  173.          Width           =   1695
  174.       End
  175.       Begin VB.Label Label12 
  176.          Caption         =   "添加日期:"
  177.          Height          =   255
  178.          Left            =   120
  179.          TabIndex        =   12
  180.          Top             =   3960
  181.          Width           =   975
  182.       End
  183.       Begin VB.Label Label11 
  184.          Caption         =   "保护功能:"
  185.          Height          =   375
  186.          Left            =   120
  187.          TabIndex        =   11
  188.          Top             =   3360
  189.          Width           =   975
  190.       End
  191.       Begin VB.Label Label10 
  192.          Caption         =   "+5V输出:"
  193.          Height          =   375
  194.          Left            =   3360
  195.          TabIndex        =   10
  196.          Top             =   2760
  197.          Width           =   975
  198.       End
  199.       Begin VB.Label Label9 
  200.          Caption         =   "+12V输出:"
  201.          Height          =   255
  202.          Left            =   120
  203.          TabIndex        =   9
  204.          Top             =   2760
  205.          Width           =   975
  206.       End
  207.       Begin VB.Label Label8 
  208.          Caption         =   "接口描述:"
  209.          Height          =   255
  210.          Left            =   3360
  211.          TabIndex        =   8
  212.          Top             =   2160
  213.          Width           =   975
  214.       End
  215.       Begin VB.Label Label7 
  216.          Caption         =   "适用范围:"
  217.          Height          =   255
  218.          Left            =   120
  219.          TabIndex        =   7
  220.          Top             =   2160
  221.          Width           =   975
  222.       End
  223.       Begin VB.Label Label6 
  224.          Caption         =   "额定功率:"
  225.          Height          =   255
  226.          Left            =   3360
  227.          TabIndex        =   6
  228.          Top             =   1560
  229.          Width           =   975
  230.       End
  231.       Begin VB.Label Label5 
  232.          Caption         =   "电源版本:"
  233.          Height          =   375
  234.          Left            =   120
  235.          TabIndex        =   5
  236.          Top             =   1560
  237.          Width           =   975
  238.       End
  239.       Begin VB.Label Label4 
  240.          Caption         =   "数量:"
  241.          Height          =   255
  242.          Left            =   3600
  243.          TabIndex        =   4
  244.          Top             =   960
  245.          Width           =   735
  246.       End
  247.       Begin VB.Label Label3 
  248.          Caption         =   "价格:"
  249.          Height          =   255
  250.          Left            =   480
  251.          TabIndex        =   3
  252.          Top             =   960
  253.          Width           =   615
  254.       End
  255.       Begin VB.Label Label2 
  256.          Caption         =   "品牌:"
  257.          Height          =   255
  258.          Left            =   3600
  259.          TabIndex        =   2
  260.          Top             =   360
  261.          Width           =   735
  262.       End
  263.       Begin VB.Label Label1 
  264.          Caption         =   "产品名称:"
  265.          Height          =   375
  266.          Left            =   240
  267.          TabIndex        =   1
  268.          Top             =   360
  269.          Width           =   975
  270.       End
  271.    End
  272. End
  273. Attribute VB_Name = "power"
  274. Attribute VB_GlobalNameSpace = False
  275. Attribute VB_Creatable = False
  276. Attribute VB_PredeclaredId = True
  277. Attribute VB_Exposed = False
  278. Private Sub Command1_Click()
  279. Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zzu.mdb;Persist Security Info=False"
  280. 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) <> "" Then
  281.              Adodc1.RecordSource = "select * from power where GoodsName='" & Trim(Text1.Text) & " '"
  282.              Adodc1.Refresh
  283.              If Adodc1.Recordset.EOF Then
  284.                  Adodc1.Recordset.AddNew
  285.                  Adodc1.Recordset.Fields("GoodsName") = Trim(Text1.Text)
  286.                  
  287.                  Adodc1.Recordset.Fields("GoodsBrand") = Trim(Text2.Text)
  288.                  Adodc1.Recordset.Fields("MarketPrice") = Trim(Text3.Text)
  289.                  Adodc1.Recordset.Fields("GoodsUnit") = Trim(Text4.Text)
  290.                  Adodc1.Recordset.Fields("Edition") = Trim(Text5.Text)
  291.                  Adodc1.Recordset.Fields("Ratingpower") = Trim(Text6.Text)
  292.                  Adodc1.Recordset.Fields("Usearea") = Trim(Text7.Text)
  293.                  Adodc1.Recordset.Fields("Interfacedescription") = Trim(Text8.Text)
  294.                  Adodc1.Recordset.Fields("Output") = Trim(Text9.Text)
  295.                  Adodc1.Recordset.Fields("Output2") = Trim(Text10.Text)
  296.                  Adodc1.Recordset.Fields("Safeguard") = Trim(Text11.Text)
  297.                  
  298.                  Adodc1.Recordset.Fields("AddDate") = Trim(Text12.Text)
  299.                  Adodc1.Recordset.Update
  300.                  Adodc1.Refresh
  301.                 MsgBox (" 恭喜您已经添加成功到数据库!")
  302.              End If
  303.               Else
  304.             MsgBox ("请您把信息填完整,信息不能为空!")
  305. End If
  306. End Sub
  307. Private Sub Command2_Click()
  308. xsp.Show
  309. End Sub
  310. Private Sub Form_Load()
  311. Text12.Text = Format(Now, "yyyy-mm-dd")
  312. End Sub