免费获取|
论文天下网
  • 论文天下网 |
  • 原创毕业论文 |
  • 论文范文 |
  • 论文下载 |
  • 计算机论文 |
  • 论文降重 |
  • 毕业论文 |
  • 外文翻译 |
  • 免费论文 |
  • 开题报告 |
  • 心得体会 |

当前位置:论文天下网 -> 免费论文 -> 计算机论文

超市进销存管理系统+VB(五)

tring = "") As Boolean
  '保存数据
  Set m_obj = obj         '用户输入数据存放于此对象中
  m_ViewType = eViewType  '对话框状态
  If nTypeId = -1 And (Not m_obj Is Nothing) Then
    m_TypeId = m_obj.TypeId
  Else
    m_TypeId = nTypeId
  End If
  m_Account = strUser     '调用此对话框的用户账号
 
 
  '根据新增、编辑或查看设置显示内容
  SetStatus
 
  '显示对话框
  OK = False
  Me.Show vbModal
  If OK = False Then
    ShowDlg = False
    Exit Function
  End If
 
  '保存数据
  Set obj = m_obj
 
  '返回并释放对话框
  ShowDlg = True
  Unload Me
 
End Function

'设置控件默认值
Private Sub SetDefaultValue()
  Dim ctl As Control
  Dim i As Integer
 
 
 '如果是新增,则清空所有文本框
 '此处判断 m_obj为空与判断m_ViewType = vtAdd等效,但更安全
  If m_obj Is Nothing Then
    For Each ctl In Controls
      If TypeOf ctl Is TextBox Then
        ctl.Text = ""
      End If
    Next
  Else  '用传入对象的值更新数据
    With m_obj
      txtCount.Text = .Count
      txtReason.Text = .Reason
      txtRemark.Text = .Remark
      cboUnit.ListIndex = 0
      dtpRegDate.Value = .RegDate
      For i = 0 To cboMerchName.ListCount - 1
        If cboMerchName.ItemData(i) = .MerchandiseID Then
          cboMerchName.ListIndex = i         '客户类型Id
          Exit For
        End If
      Next i
     
    End With
  End If
 
End Sub

'检查输入有效性
Private Function CheckValid() As Boolean
  CheckValid = False
   
  If txtCount.Text = "" _
    Or txtReason.Text = "" _
    Or txtRemark.Text = "" Then
    MsgBox "请填写完毕以上各项内容"
    Exit Function
  End If
  If cboMerchName.Text = "" Then
    MsgBox "请填写完毕以上各项内容"
    Exit Function
  End If
 
  If Not IsNumeric(txtCount.Text) Then
    MsgBox "数量请输入数字"
    Exit Function
  End If
 
  If Not IsDate(dtpRegDate.Value) Then
    MsgBox "请输入正确的日期格式"
    Exit Function
  End If
 
  CheckValid = True
 
End Function

'保存数据
Private Sub SaveValue()
  '给“成员变量”对象赋值
  With m_obj
    '注意以下利用RealString函数替换去除输入中的单引号
    .Count = txtCount.Text
    .Reason = RealString(txtReason.Text)
    .Remark = RealString(txtRemark.Text)
    .MerchandiseID = cboMerchName.ItemDat

首页 上一页 2 3 4 5 6 7 8 下一页 尾页 5/11/11

相关论文
上一篇:超市管理系统+论文 下一篇:车辆管理系统+vb
推荐论文 本专业最新论文
Tags:超市 进销存 管理系统 【返回顶部】

相关栏目

自动化相关
计算机论文
工程管理论文
法律论文
医学论文
人力资源
电子专业
电气工程
英语论文
行政管理
电子商务
社科文学
教育论文
物流专业
金融专业
财务管理
会计专业
化学化工材料科学
电子通信
环境科学
经济类
机械模具类
报告,总结,申请书
其他专业论文


关于我们 | 联系方式 | 论文说明 | 网站地图 | 免费获取 | 钻石会员 | 原创毕业论文

 

论文天下网提供论文检测,论文降重,论文范文,论文排版,网站永久域名WWW.GEPUW.NET

本站部分文章来自网友投稿上传,如发现侵犯了您的版权,请联系指出,本站及时确认并删除  E-mail: 893628136@qq.com

Copyright@ 2009-2022 GEPUW.NET 论文天下网 版权所有