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

📄 jinhuoguanli.frm

📁 自己做的一个商品销售信息管理的程序。 VB新手
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            RecordSource    =   "Supplier"
            Caption         =   "Adodc1"
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            _Version        =   393216
         End
         Begin MSDataGridLib.DataGrid DataGrid1 
            Height          =   2895
            Left            =   4440
            TabIndex        =   12
            Top             =   240
            Width           =   9615
            _ExtentX        =   16960
            _ExtentY        =   5106
            _Version        =   393216
            HeadLines       =   1
            RowHeight       =   15
            BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "宋体"
               Size            =   9
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "宋体"
               Size            =   9
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ColumnCount     =   2
            BeginProperty Column00 
               DataField       =   ""
               Caption         =   ""
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   2052
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column01 
               DataField       =   ""
               Caption         =   ""
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   2052
                  SubFormatType   =   0
               EndProperty
            EndProperty
            SplitCount      =   1
            BeginProperty Split0 
               BeginProperty Column00 
               EndProperty
               BeginProperty Column01 
               EndProperty
            EndProperty
         End
         Begin VB.TextBox Text5 
            DataField       =   "备注"
            DataSource      =   "Adodc1"
            Height          =   495
            Left            =   960
            TabIndex        =   10
            Top             =   2640
            Width           =   2775
         End
         Begin VB.TextBox Text3 
            DataField       =   "地址"
            DataSource      =   "Adodc1"
            Height          =   495
            Left            =   1800
            TabIndex        =   9
            Top             =   1440
            Width           =   1935
         End
         Begin VB.TextBox Text2 
            DataField       =   "供应商名"
            DataSource      =   "Adodc1"
            Height          =   495
            Left            =   1800
            TabIndex        =   8
            Top             =   840
            Width           =   1935
         End
         Begin VB.TextBox Text1 
            DataField       =   "供应商ID"
            DataSource      =   "Adodc1"
            Height          =   495
            Left            =   1800
            TabIndex        =   3
            Top             =   240
            Width           =   1935
         End
         Begin VB.Label Label5 
            Caption         =   "备注"
            Height          =   375
            Left            =   240
            TabIndex        =   11
            Top             =   2760
            Width           =   735
         End
         Begin VB.Label Label4 
            Caption         =   "电话"
            Height          =   375
            Left            =   840
            TabIndex        =   7
            Top             =   2160
            Width           =   855
         End
         Begin VB.Label Label3 
            Caption         =   "地址"
            Height          =   375
            Left            =   840
            TabIndex        =   6
            Top             =   1560
            Width           =   855
         End
         Begin VB.Label Label2 
            Caption         =   "名称"
            Height          =   375
            Left            =   840
            TabIndex        =   5
            Top             =   960
            Width           =   855
         End
         Begin VB.Label Label1 
            Caption         =   "编号"
            Height          =   375
            Left            =   840
            TabIndex        =   4
            Top             =   360
            Width           =   855
         End
      End
   End
End
Attribute VB_Name = "jinhuoguanli"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdadd_Click()
If cmdadd.Caption = "添加" Then
currentbookmark = Adodc1.Recordset.AbsolutePosition
Adodc1.Recordset.AddNew

Text1.Locked = False
Text2.Locked = False
Text3.Locked = False
Text4.Locked = False
Text5.Locked = False
'Text1.Text = ""
'Text2.Text = ""
'Text3.Text = ""
'Text4.Text = ""
'Text5.Text = ""


cmdadd.Caption = "保存"
cmdadd.Caption = "保存"
cmdModify.Enabled = False
cmddelete.Enabled = False
Else
   'Adodc1.Recordset.Update
   
   'CallProcRecordSet("sp_insertgongyingsxinxi(
   
   
   cmdadd.Caption = "添加"
   cmdModify.Enabled = True
   cmddelete.Enabled = True
   'CanInput False
   currentbookmark = 0
   
   
   
  
   
   
End If
End Sub

Private Sub cmdadd1_Click()
If cmdadd1.Caption = "添加" Then
currentbookmark = Adodc2.Recordset.AbsolutePosition
Adodc2.Recordset.AddNew
cmdadd1.Caption = "保存"
cmdadd1.Caption = "保存"
cmdModify1.Enabled = False
'cmddelete1.Enabled = False

'Text6.Locked = False
''Text7.Locked = False
'Text8.Locked = False
'Text9.Locked = False
'Text10.Locked = False
cn.Open
Set DataCombo2.RowSource = Query("select * from product")
DataCombo2.ListField = "商品名称"

Set DataCombo1.RowSource = Query("select  from supplier")
DataCombo1.ListField = "供应商ID"
cn.Close

Else
   Adodc2.Recordset.Update
   cmdadd1.Caption = "添加"
   cmdModify1.Enabled = True
   'cmddelete1.Enabled = True
   'CanInput False
   currentbookmark = 0
   
   
   
'保存时启动自动付款单
'//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 
 'cn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=lisq;Data Source=2NBPC026"
cn.Open

   Dim zongjine As Integer
   Dim shul As Integer
   Dim danj As Integer
   Dim comm As String
    shul = shuliang.Text
    danj = danjia.Text
    zongjine = shul * danj
    'zongjinge = "zongjine"
    'comm = "sp_fukuan('" & rukudan.Text & "','" & rukudan.Text & "', " & zongjine & ")"
   
  CallProcRecordSet "sp_fukuan('" & rukudanhao.Text & "','" & rukudanhao.Text & "', " & zongjine & ")"
   

   
   
   
   
   '/////////////////////////////////////////////////////////////////////////////////////////////////
   
   '启动自动入库
   Dim ruk As String
   Dim shp As String
   ruk = rukudanhao.Text
   shp = DataCombo1.Text
   
    CallProcRecordSet "sp_ruku('" & ruk & "','" & shp & "'," & shul & ")"
   
   '判断有没有商品?这一行为有。。。。。
   
 cn.Close
   
   
   
   
   
   
   
   
End If
End Sub

Private Sub cmdcancel_Click()
Unload Me
jinhuoguanli.Show
End Sub

Private Sub cmdcancel1_Click()
Unload Me
jinhuoguanli.Show

End Sub

Private Sub cmddelete_Click()
If RecordsetIsEmpty(Adodc1.Recordset) Then Exit Sub
If MsgBox("真的要删除这记录吗?", vbYesNo) = vbYes Then
  Adodc1.Recordset.Delete
 If RecordsetIsEmpty(Adodc1.Recordset) Then
 Adodc1.Refresh
  Exit Sub
End If
If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast
End If

End Sub

Private Sub cmddelete1_Click()
'If RecordsetIsEmpty(Adodc2.Recordset) Then Exit Sub
'If MsgBox("真的要删除这记录吗?", vbYesNo) = vbYes Then
 ' Adodc2.Recordset.Delete
 'If RecordsetIsEmpty(Adodc2.Recordset) Then
 'Adodc2.Refresh
  'Exit Sub
'End If
'If Adodc2.Recordset.EOF Then Adodc2.Recordset.MoveLast
'End If

End Sub

Private Sub cmdModify_Click()
If Adodc1.Recordset.AbsolutePosition < 0 Then Exit Sub
If cmdModify.Caption = "修改" Then
urrentbookmark = Adodc1.Recordset.AbsolutePosition
'CanInput True
cmdModify.Caption = "保存"
cmdModify.Enabled = True '更改
cmddelete.Enabled = False
cmdadd.Enabled = False

Text1.Locked = False
Text2.Locked = False
Text3.Locked = False
Text4.Locked = False
Text5.Locked = False

Else
  Adodc1.Recordset.Update
  cmdModify.Caption = "修改"
cmdadd.Enabled = True
cmddelete.Enabled = ture
  '  CanInput False
currentbookmark = 0

End If


End Sub

Private Sub Command2_Click()

End Sub

Private Sub cmdModify1_Click()
If Adodc2.Recordset.AbsolutePosition < 0 Then Exit Sub
If cmdModify1.Caption = "修改" Then
currentbookmark = Adodc2.Recordset.AbsolutePosition
'CanInput True
cmdModify1.Caption = "保存"
cmdModify1.Enabled = True
'cmddelete1.Enabled = False
cmdadd1.Enabled = False

'Text6.Locked = False
'Text7.Locked = False
'Text8.Locked = False
'Text9.Locked = False
'Text10.Locked = False

Else
  Adodc2.Recordset.Update
  cmdModify1.Caption = "修改"
cmdadd1.Enabled = True
'cmddelete1.Enabled = ture
  '  CanInput False
currentbookmark = 0

End If

End Sub

Private Sub Form_Load()
constr = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=lisq;Data Source=2NBPC026"

Adodc1.ConnectionString = constr
Adodc2.ConnectionString = constr



Adodc1.CommandType = adCmdTable
Adodc1.RecordSource = "supplier"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1.Recordset


Adodc2.CommandType = adCmdTable
Adodc2.RecordSource = "rukubiao"
Adodc2.Refresh
Set DataGrid2.DataSource = Adodc2.Recordset


'Text1.DataSource = Adodc1
'Text1.DataField = "编号"





'琐文本框
Text1.Locked = True
Text2.Locked = True
Text3.Locked = True
Text4.Locked = True
Text5.Locked = True

End Sub


⌨️ 快捷键说明

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