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

📄 chanshushez.frm

📁 自己做的一个商品销售信息管理的程序。 VB新手
💻 FRM
📖 第 1 页 / 共 3 页
字号:
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   2052
                  SubFormatType   =   0
               EndProperty
            EndProperty
            SplitCount      =   1
            BeginProperty Split0 
               BeginProperty Column00 
               EndProperty
               BeginProperty Column01 
               EndProperty
            EndProperty
         End
         Begin VB.Label Label12 
            Caption         =   "出库日期"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   720
            TabIndex        =   32
            Top             =   3360
            Width           =   855
         End
         Begin VB.Label Label11 
            Caption         =   "商品出库后,将在库存表里减去相同数量的商品!"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00FF8080&
            Height          =   375
            Left            =   7920
            TabIndex        =   30
            Top             =   3240
            Width           =   4695
         End
         Begin VB.Label Label6 
            Caption         =   "出库单ID"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   720
            TabIndex        =   18
            Top             =   360
            Width           =   855
         End
         Begin VB.Label Label7 
            Caption         =   "商品数量"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   720
            TabIndex        =   17
            Top             =   2160
            Width           =   855
         End
         Begin VB.Label Label8 
            Caption         =   "客户ID"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   720
            TabIndex        =   16
            Top             =   1560
            Width           =   855
         End
         Begin VB.Label Label9 
            Caption         =   "商品名称"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   720
            TabIndex        =   15
            Top             =   960
            Width           =   855
         End
         Begin VB.Label Label10 
            Caption         =   "销售价格"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   720
            TabIndex        =   14
            Top             =   2760
            Width           =   855
         End
      End
   End
End
Attribute VB_Name = "chuhuoguanli"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Picture1_Click()

End Sub

Private Sub cmdadd_Click()
If cmdadd.Caption = "添加" Then
currentbookmark = Adodc1.Recordset.AbsolutePosition
Adodc1.Recordset.AddNew
cmdadd.Caption = "保存"
cmdadd.Caption = "保存"
cmdModify.Enabled = False
cmddelete.Enabled = False
Else
   Adodc1.Recordset.Update
   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

cn.Open
Set DataCombo1.RowSource = Query("select * from product")
DataCombo1.ListField = "商品名称"

Set DataCombo2.RowSource = Query("select * from buyer")
DataCombo2.ListField = "客户ID"


Set DataList1.RowSource = Query("select * from product")
DataList1.ListField = "商品名称"

cn.Close



Else
   Adodc2.Recordset.Update
   cmdadd1.Caption = "添加"
   cmdModify1.Enabled = True
'   cmddelete1.Enabled = True
   'CanInput False
   currentbookmark = 0
   
   '出库后,商品将从库存里减去
   '///////////////////////////////////////////////////////////////////////启动回款单
   cn.Open
   Dim zongjine%
   
   zongjine = shuliang.Text * jiage.Text
   CallProcRecordSet "sp_huikuan('" & chukudanhao.Text & "','" & chukudanhao.Text & "'," & zongjine & ")"
   
   
   '启动库存单变化
   
   Dim shul%
   shul = shuliang.Text
   
   CallProcRecordSet "sp_chuku_kucun('" & DataCombo1.Text & "'," & shul & ")"

   
 cn.Close
   
   
   
   
   
   
   
   
   
   
End If

End Sub

Private Sub cmdcancel_Click()
 If currentbookmark <> 0 Then
  Adodc1.Refresh
 If currentbookmark > 0 Then
    Adodc1.Recordset.AbsolutePosition = currentbookmark
End If
cmdadd.Caption = "添加"
cmdModify.Caption = "修改"
cmdadd.Enabled = ture
cmdModify.Enabled = ture
cmddelete.Enabled = ture
currentbookmark = 0
'CanInput False
End If
End Sub

Private Sub cmdcancel1_Click()
Unload Me
chuhuoguanli.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()

End Sub

Private Sub cmdModify_Click()

If Adodc1.Recordset.AbsolutePosition < 0 Then Exit Sub
If cmdModify.Caption = "修改" Then
currentbookmark = Adodc1.Recordset.AbsolutePosition
'CanInput True
cmdModify.Caption = "保存"
'cmdModify.Enabled = True
cmddelete.Enabled = False
cmdadd.Enabled = False

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

End If



End Sub

Private Sub Command4_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 = "保存"
cmdadd1.Enabled = False

'cmdModify1.Enabled = False
'cmddelete1.Enabled = 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()
'Adodc1.ConnectionString = contr '"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=lisq;Data Source=2NBPC026"

'Adodc1.CommandType = adCmdTable
'Adodc1.RecordSource = "buyer"
'Adodc1.Refresh
'Set DataGrid1.DataSource = Adodc1.Recordset
Adodc1.CommandType = adCmdTable
Adodc1.RecordSource = "Buyer"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1.Recordset

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

End Sub

⌨️ 快捷键说明

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