第一范文网 - 专业文章范例文档资料分享平台

美容院管理系统论文

来源:用户分享 时间:2025/7/23 23:34:14 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

图6-6 商品管理界面

2.主要代码 Dim yf%

Private Sub Command3_Click() On Error Resume Next If yf <> 0 Then

MsgBox \现在正在执行其他操作,不能进行查询!\提示\Exit Sub End If

If Combo1.Text = \

MsgBox \请选择要查询的字段!\提示\ Combo1.SetFocus Exit Sub End If

If Text2.Text = \

MsgBox \请输入要查询的条件!\提示\ Text2.SetFocus Exit Sub End If

If Combo1.Text = \商品编号\

rst.Open \商品编号='\+ \

If rst.RecordCount = 0 Then

MsgBox \没有要查询的记录!\提示\ End If rst.Close

Adodc1.RecordSource = \商品编号='\Trim(Text2.Text) + \ Adodc1.Refresh

ElseIf Combo1.Text = \商品名称\

rst.Open \商品名称='\+ \

If rst.RecordCount = 0 Then

MsgBox \没有要查询的记录!\提示\ End If rst.Close

Adodc1.RecordSource = \商品名称='\Trim(Text2.Text) + \ Adodc1.Refresh Else

MsgBox \请选择要查询的正确字段!\提示\End If End Sub

Private Sub Command4_Click()

Adodc1.RecordSource = \价格\ Adodc1.Refresh End Sub

Private Sub Command5_Click()

Adodc1.RecordSource = \用途\ Adodc1.Refresh End Sub

Private Sub Form_Load() Adodc1.ConnectionString = \Server};server=(local);database=mry\

Adodc1.RecordSource = \ Adodc1.Refresh End Sub

Private Sub Command1_Click() On Error Resume Next If yf = 1 Then '新增

rst.Open \* From shangpin\Cnn, adOpenKeyset, adLockOptimistic Call Check(\商品编号\ If Fh = 1 Then rst.Close Fh = 0 Exit Sub

End If

'----------------------------------------- rst.AddNew

For i = 0 To 6

rst.Fields(i) = Text1(i) Next i

rst.Fields(\入库时间\ rst.Update

For i = 0 To 6 Text1(i) = \ Next i yf = 0 rst.Close Adodc1.Refresh

ElseIf yf = 2 Then '修改

rst.Open \* From shangpin where 商品编号='\Trim(DataGrid1.Columns(0)) + \ For i = 0 To 6

rst.Fields(i) = Text1(i) Next i

rst.Fields(\入库时间\ rst.Update yf = 0 rst.Close

Adodc1.Refresh End If

Command1.Enabled = False Command2.Enabled = False End Sub

Private Sub Command2_Click() For i = 0 To 6 Text1(i) = \ Next i yf = 0

Command1.Enabled = False Command2.Enabled = False Frame3.Enabled = False End Sub

Private Sub DataGrid1_Click()

If yf = 1 Or yf = 2 Then Exit Sub For i = 0 To 6

Text1(i) = DataGrid1.Columns(i) Next i

+

End Sub

Private Sub Toolbar1_ButtonClick(ByVal button As MSComctlLib.button) Select Case button Case \商品入库\ For i = 0 To 6 Text1(i) = \ Next i

Text1(0).SetFocus

Command1.Enabled = True Command2.Enabled = True yf = 1 Case \退出\ Unload Me Case \编辑商品\

If Text1(0) = \

MsgBox \请选择要修改的商品\警告\ Else

Command1.Enabled = True Command2.Enabled = True Text1(0).SetFocus yf = 2 End If

Case \删除商品\If yf <> 0 Then

MsgBox \现在正在执行其他操作,不能进行删除!\提示\Exit Sub End If

On Error Resume Next

'-------------------------------------

rst.Open \商品编号='\\'------------------------------------- If Text1(0) = \

MsgBox \请选择要删除的商品\警告\ Else

i = MsgBox(\是否确定删除商品编号为“\”的商品\vbYesNo, \提示\

If i = vbYes Then rst.Delete Adodc1.Refresh For i = 0 To 6 Text1(i) = \ Next i Else

搜索更多关于: 美容院管理系统论文 的文档
美容院管理系统论文.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c768ga3znli0n19b8i5h7_10.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top