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

SCSI/ASPI

开发平台:

Others

  1. VERSION 5.00
  2. Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
  3. Begin VB.Form box 
  4.    Caption         =   "机箱"
  5.    ClientHeight    =   7350
  6.    ClientLeft      =   60
  7.    ClientTop       =   450
  8.    ClientWidth     =   6255
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   7350
  11.    ScaleWidth      =   6255
  12.    StartUpPosition =   3  '窗口缺省
  13.    Begin VB.Frame Frame1 
  14.       Caption         =   "机箱"
  15.       Height          =   6615
  16.       Left            =   120
  17.       TabIndex        =   0
  18.       Top             =   120
  19.       Width           =   5775
  20.       Begin VB.CommandButton Command2 
  21.          Caption         =   "返回"
  22.          Height          =   495
  23.          Left            =   3480
  24.          TabIndex        =   21
  25.          Top             =   5880
  26.          Width           =   1335
  27.       End
  28.       Begin MSAdodcLib.Adodc Adodc1 
  29.          Height          =   375
  30.          Left            =   3720
  31.          Top             =   4440
  32.          Visible         =   0   'False
  33.          Width           =   1575
  34.          _ExtentX        =   2778
  35.          _ExtentY        =   661
  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            =   720
  79.          TabIndex        =   19
  80.          Top             =   5880
  81.          Width           =   1455
  82.       End
  83.       Begin VB.TextBox Text9 
  84.          Height          =   375
  85.          Left            =   1440
  86.          TabIndex        =   18
  87.          Top             =   5160
  88.          Width           =   1935
  89.       End
  90.       Begin VB.TextBox Text8 
  91.          Height          =   375
  92.          Left            =   1440
  93.          TabIndex        =   17
  94.          Top             =   4560
  95.          Width           =   1935
  96.       End
  97.       Begin VB.TextBox Text7 
  98.          Height          =   375
  99.          Left            =   1440
  100.          TabIndex        =   16
  101.          Top             =   3960
  102.          Width           =   1980
  103.       End
  104.       Begin VB.TextBox Text6 
  105.          Height          =   375
  106.          Left            =   1440
  107.          TabIndex        =   15
  108.          Top             =   3360
  109.          Width           =   1935
  110.       End
  111.       Begin VB.TextBox Text5 
  112.          Height          =   375
  113.          Left            =   1440
  114.          TabIndex        =   14
  115.          Top             =   2760
  116.          Width           =   2775
  117.       End
  118.       Begin VB.TextBox Text4 
  119.          Height          =   375
  120.          Left            =   1440
  121.          TabIndex        =   13
  122.          Top             =   2160
  123.          Width           =   1935
  124.       End
  125.       Begin VB.TextBox Text3 
  126.          Height          =   375
  127.          Left            =   1440
  128.          TabIndex        =   12
  129.          Top             =   1560
  130.          Width           =   1935
  131.       End
  132.       Begin VB.TextBox Text2 
  133.          Height          =   375
  134.          Left            =   1440
  135.          TabIndex        =   11
  136.          Top             =   960
  137.          Width           =   1935
  138.       End
  139.       Begin VB.TextBox Text1 
  140.          Height          =   375
  141.          Left            =   1440
  142.          TabIndex        =   2
  143.          Top             =   360
  144.          Width           =   1935
  145.       End
  146.       Begin VB.Label Label10 
  147.          Caption         =   "注意格式:年-月-日"
  148.          Height          =   375
  149.          Left            =   3600
  150.          TabIndex        =   20
  151.          Top             =   5160
  152.          Width           =   1815
  153.       End
  154.       Begin VB.Label Label9 
  155.          Caption         =   "添加日期:"
  156.          Height          =   255
  157.          Left            =   240
  158.          TabIndex        =   10
  159.          Top             =   5280
  160.          Width           =   975
  161.       End
  162.       Begin VB.Label Label8 
  163.          Caption         =   "机箱尺寸:"
  164.          Height          =   375
  165.          Left            =   240
  166.          TabIndex        =   9
  167.          Top             =   4560
  168.          Width           =   1095
  169.       End
  170.       Begin VB.Label Label7 
  171.          Caption         =   "机箱样式:"
  172.          Height          =   255
  173.          Left            =   240
  174.          TabIndex        =   8
  175.          Top             =   3960
  176.          Width           =   1095
  177.       End
  178.       Begin VB.Label Label6 
  179.          Caption         =   "机箱接口:"
  180.          Height          =   375
  181.          Left            =   240
  182.          TabIndex        =   7
  183.          Top             =   3360
  184.          Width           =   975
  185.       End
  186.       Begin VB.Label Label5 
  187.          Caption         =   "机箱结构:"
  188.          Height          =   375
  189.          Left            =   240
  190.          TabIndex        =   6
  191.          Top             =   2760
  192.          Width           =   975
  193.       End
  194.       Begin VB.Label Label4 
  195.          Caption         =   "数量:"
  196.          Height          =   375
  197.          Left            =   600
  198.          TabIndex        =   5
  199.          Top             =   2160
  200.          Width           =   615
  201.       End
  202.       Begin VB.Label Label3 
  203.          Caption         =   "价格:"
  204.          Height          =   255
  205.          Left            =   600
  206.          TabIndex        =   4
  207.          Top             =   1560
  208.          Width           =   615
  209.       End
  210.       Begin VB.Label Label2 
  211.          Caption         =   "品牌:"
  212.          Height          =   255
  213.          Left            =   600
  214.          TabIndex        =   3
  215.          Top             =   960
  216.          Width           =   615
  217.       End
  218.       Begin VB.Label Label1 
  219.          Caption         =   "产品名称:"
  220.          Height          =   375
  221.          Left            =   360
  222.          TabIndex        =   1
  223.          Top             =   360
  224.          Width           =   975
  225.       End
  226.    End
  227. End
  228. Attribute VB_Name = "box"
  229. Attribute VB_GlobalNameSpace = False
  230. Attribute VB_Creatable = False
  231. Attribute VB_PredeclaredId = True
  232. Attribute VB_Exposed = False
  233. Private Sub Command1_Click()
  234. Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zzu.mdb;Persist Security Info=False"
  235. 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) <> "" Then
  236.              Adodc1.RecordSource = "select * from box where GoodsName='" & Trim(Text1.Text) & " '"
  237.              Adodc1.Refresh
  238.              If Adodc1.Recordset.EOF Then
  239.                  Adodc1.Recordset.AddNew
  240.                  Adodc1.Recordset.Fields("GoodsName") = Trim(Text1.Text)
  241.                  Adodc1.Recordset.Fields("GoodsBrand") = Trim(Text2.Text)
  242.                  Adodc1.Recordset.Fields("MarketPrice") = Trim(Text3.Text)
  243.                  Adodc1.Recordset.Fields("GoodsUnit") = Trim(Text4.Text)
  244.                  Adodc1.Recordset.Fields("Structure") = Trim(Text5.Text)
  245.                  Adodc1.Recordset.Fields("boxinterface") = Trim(Text6.Text)
  246.                  Adodc1.Recordset.Fields("Manner") = Trim(Text7.Text)
  247.                  Adodc1.Recordset.Fields("Size") = Trim(Text8.Text)
  248.                  Adodc1.Recordset.Fields("AddDate") = Trim(Text9.Text)
  249.                  
  250.                  Adodc1.Recordset.Update
  251.                  Adodc1.Refresh
  252.                  MsgBox (" 恭喜您已经添加成功到数据库!")
  253.              End If
  254.               Else
  255.             MsgBox ("请您把信息填完整,信息不能为空!")
  256. End If
  257. End Sub
  258. Private Sub Command2_Click()
  259. xsp.Show
  260. End Sub
  261. Private Sub Form_Load()
  262. Text9.Text = Format(Now, "yyyy-mm-dd ")
  263. End Sub