⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frm_jgxx.frm

📁 采购管理系统使用vb6.0 加sql2000数据库 编程
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Caption         =   "保存"
         Height          =   375
         Left            =   3840
         TabIndex        =   16
         Top             =   2160
         Width           =   855
      End
      Begin VB.TextBox Text4 
         Height          =   375
         Left            =   5160
         TabIndex        =   3
         Text            =   "Text4"
         Top             =   720
         Width           =   1695
      End
      Begin VB.TextBox Text3 
         Height          =   375
         Left            =   5160
         TabIndex        =   4
         Top             =   1200
         Width           =   1695
      End
      Begin VB.Frame Frame3 
         Caption         =   "报价方"
         ForeColor       =   &H00FF00FF&
         Height          =   1695
         Left            =   480
         TabIndex        =   11
         Top             =   360
         Width           =   2535
         Begin MSDataListLib.DataCombo DataCombo2 
            Bindings        =   "frm_jgxx.frx":0000
            Height          =   330
            Left            =   960
            TabIndex        =   2
            Top             =   720
            Width           =   1335
            _ExtentX        =   2355
            _ExtentY        =   582
            _Version        =   393216
            ListField       =   "供应商名称"
            Text            =   "DataCombo2"
         End
         Begin MSDataListLib.DataCombo DataCombo1 
            Bindings        =   "frm_jgxx.frx":0015
            Height          =   330
            Left            =   960
            TabIndex        =   1
            Top             =   480
            Visible         =   0   'False
            Width           =   1335
            _ExtentX        =   2355
            _ExtentY        =   582
            _Version        =   393216
            ListField       =   "生产商名称"
            Text            =   "DataCombo1"
         End
         Begin VB.Label Label4 
            Caption         =   "供应商"
            ForeColor       =   &H00800000&
            Height          =   255
            Left            =   120
            TabIndex        =   13
            Top             =   720
            Width           =   735
         End
         Begin VB.Label Label3 
            Caption         =   "生产商"
            ForeColor       =   &H00800000&
            Height          =   255
            Left            =   120
            TabIndex        =   12
            Top             =   480
            Visible         =   0   'False
            Width           =   735
         End
      End
      Begin VB.Label Label8 
         Caption         =   "报价时间"
         ForeColor       =   &H00800000&
         Height          =   255
         Left            =   3480
         TabIndex        =   22
         Top             =   1680
         Width           =   1335
      End
      Begin VB.Label Label7 
         Caption         =   "市场调研价格(元)"
         ForeColor       =   &H000000FF&
         Height          =   375
         Left            =   3240
         TabIndex        =   20
         Top             =   240
         Width           =   1695
      End
      Begin VB.Label Label6 
         Caption         =   "报价(单位:元)"
         ForeColor       =   &H00800000&
         Height          =   255
         Left            =   3360
         TabIndex        =   15
         Top             =   1200
         Width           =   1575
      End
      Begin VB.Label Label5 
         Caption         =   "报价方"
         ForeColor       =   &H00800000&
         Height          =   255
         Left            =   4080
         TabIndex        =   14
         Top             =   720
         Width           =   615
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   5760
      Top             =   4920
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Data_cggl;Data Source=服务器"
      OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Data_cggl;Data Source=服务器"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
End
Attribute VB_Name = "frm_jgxx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim c




Private Sub Check1_Click()
 'Call main
  Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Data_cggl;Data Source=服务器"
  Adodc1.CommandType = adCmdText
  Adodc1.RecordSource = "select   *   from " & Text1 & " order by bjsj"
 ' Adodc1.Refresh
  Set DataGrid1.DataSource = Adodc1
End Sub

Private Sub Command1_Click()
If Text4.Text = "" Then MsgBox "填写或选择报价方", 33, "采购管理系统"
If Text3.Text = "" Then MsgBox "填写报价 ", "33", "采购管理系统"

If Text3.Text <> "" And Text4.Text <> "" Then

   Call main
  ' ConnectionName.CursorLocation = adUseClient
   adoCon.CursorLocation = adUseClient
   
   Set adoRs = adoCon.OpenSchema(adSchemaTables)
       adoRs.Find ("table_name='" & Text1 & "'")
      If adoRs.EOF Then
            MsgBox "新信号的价格数据添加"
            Set adoRs = adoCon.Execute("create  table  " & Text1 & " ( bj float(8) ,bjf varchar(50),bjsj datetime)")
            'Adodc1.RecordSource = " select * from " & Text1 & " "
            'If Adodc1.Recordset.RecordCount = 0 Then
            'Adodc1.Refresh
            Set adoRs = adoCon.Execute("insert into " & Text1 & " values(" & Text3 & ",'" & Text4 & "','" & DT1 & "')")
            'End If
           
        Else
      MsgBox "已有型号价格数据添加"
      Adodc1.RecordSource = " select * from " & Text1 & " where bjf ='" + Text3 + "' "
      Adodc1.Refresh
      If Adodc1.Recordset.RecordCount = 0 Then
      c = MsgBox(" 确认保存该信息吗?", 33, "采购管理系统")
      If c = vbOK Then
      Set adoRs = adoCon.Execute("insert into " & Text1 & " values( " & Text3 & ",'" & Text4 & "','" & DT1 & "')")
      MsgBox "数据保存成功!!", 32, "采购管理系统"
      Command1.Enabled = False
      End If
      End If
End If
          adoCon.Close
          End If


End Sub



Private Sub Command2_Click()
Unload Me

End Sub

Private Sub Command3_Click()
Unload Me
frm_jgxx.Refresh
frm_jgxx.Show
End Sub

Private Sub DataCombo2_Change()

Text4.Text = DataCombo2.Text
If Command1.Enabled = False Then Command1.Enabled = True


End Sub

Private Sub DataCombo1_Change()
Text4.Text = DataCombo1.Text
If Command1.Enabled = False Then Command1.Enabled = True
End Sub

Private Sub DataGrid1_Click()
  'Call main
  Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Data_cggl;Data Source=服务器"
  Adodc1.CommandType = adCmdText
  Adodc1.RecordSource = "select   *   from " & Text1 & " order by bj"
 ' Adodc1.Refresh
  Set DataGrid1.DataSource = Adodc1

End Sub

Private Sub Form_Load()


'SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE


Text6.Text = frm_xhxx.Text6.Text

Text1.Text = "table_jg" + frm_xhxx.Text1
Text2.Text = frm_xhxx.Text2
Text5.Text = frm_xhxx.Text1
DataCombo1.Text = ""
DataCombo2.Text = ""
Command1.Enabled = False

End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
If InStr(1, "0123456789.", UCase(Chr(KeyAscii)), 1) <= 0 Then
KeyAscii = 0
MsgBox "请输入报价", "33", "采购管理系统"
End If

End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer)
Command1.Enabled = True
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -