论文无忧网提供:计算机毕业论文范文|计算机毕业设计|计算机毕业论文
栏目导航 ASP Java Web .NET VB6.0 JAVA VC VF DELPHI PB 计算机网络 计算机科学与技术 PHP 安卓APP 其他 C# 代写论文
当前位置: > 计算机 > VB6.0 >

A450超市进销存管理系统

  

 

 

内容来自www.paper51.com

  copyright paper51.com

 

http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

 

内容来自论文无忧网 www.paper51.com

 

http://www.paper51.com

  http://www.paper51.com

3.3界面设计与代码设计 内容来自www.paper51.com

  http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

  copyright paper51.com

 

copyright paper51.com

 

copyright paper51.com

1.      登陆界面设计: paper51.com

http://www.paper51.com

代码分析:

paper51.com

Option Explicit

内容来自www.paper51.com

 

http://www.paper51.com

 

内容来自www.paper51.com

  copyright paper51.com

 

http://www.paper51.com

 

内容来自论文无忧网 www.paper51.com

Private DeclareFunction GetUserName Lib "advapi32.dll" Alias"GetUserNameA" (ByVal lpbuffer As String, nSize As Long) As Long paper51.com

  paper51.com

  http://www.paper51.com

 

paper51.com

  http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

Public OK As Boolean

http://www.paper51.com

 

copyright paper51.com

 

内容来自论文无忧网 www.paper51.com

Dim m_Admin As NewclsAdmin

http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

  http://www.paper51.com

Dim m_nErrCount AsInteger

内容来自www.paper51.com

 

内容来自论文无忧网 www.paper51.com

  内容来自论文无忧网 www.paper51.com

  内容来自论文无忧网 www.paper51.com

  copyright paper51.com

 

paper51.com

 

paper51.com

  http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

Private Sub Form_Load()

http://www.paper51.com

 

http://www.paper51.com

 

内容来自www.paper51.com

  m_nErrCount = 0 内容来自论文无忧网 www.paper51.com

 

paper51.com

  http://www.paper51.com

End Sub

paper51.com

 

copyright paper51.com

 

内容来自www.paper51.com

 

paper51.com

  http://www.paper51.com

 

http://www.paper51.com

  copyright paper51.com

  paper51.com

  paper51.com

Private SubcmdCancel_Click() copyright paper51.com

 

内容来自www.paper51.com

  内容来自www.paper51.com

  OK = False 内容来自论文无忧网 www.paper51.com

 

内容来自论文无忧网 www.paper51.com

 

内容来自www.paper51.com

  Me.Hide 内容来自www.paper51.com

  http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

End Sub

copyright paper51.com

  http://www.paper51.com

  http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

 

内容来自论文无忧网 www.paper51.com

 

内容来自www.paper51.com

Private Sub cmdOK_Click() http://www.paper51.com

  http://www.paper51.com

 

内容来自www.paper51.com

  'ToDo: 创建测试密码是否正确

内容来自论文无忧网 www.paper51.com

 

paper51.com

 

内容来自论文无忧网 www.paper51.com

  '检查正确密码 内容来自www.paper51.com

  内容来自论文无忧网 www.paper51.com

 

内容来自论文无忧网 www.paper51.com

  Dim Account AsString paper51.com

 

内容来自论文无忧网 www.paper51.com

  paper51.com

  Dim Pwd AsString

paper51.com

  copyright paper51.com

  http://www.paper51.com

  Account = RealString(txtUserName.Text) 内容来自www.paper51.com

 

内容来自www.paper51.com

  paper51.com

  Pwd = RealString(txtPassword.Text) copyright paper51.com

  内容来自www.paper51.com

  http://www.paper51.com

  '判断密码是否正确 paper51.com

  paper51.com

 

内容来自www.paper51.com

  If Not m_Admin.CheckPwd(Account,Pwd) Then

内容来自论文无忧网 www.paper51.com

 

copyright paper51.com

 

内容来自www.paper51.com

    m_nErrCount = m_nErrCount +1 paper51.com

 

内容来自论文无忧网 www.paper51.com

  内容来自论文无忧网 www.paper51.com

    If m_nErrCount >= 3 Then

copyright paper51.com

 

http://www.paper51.com

 

内容来自www.paper51.com

      MsgBox "输入密码错误次数太多,请稍后重试", vbExclamation

paper51.com

  内容来自www.paper51.com

 

paper51.com

      End

paper51.com

  内容来自论文无忧网 www.paper51.com

  内容来自论文无忧网 www.paper51.com

    End If

copyright paper51.com

  内容来自论文无忧网 www.paper51.com

  内容来自论文无忧网 www.paper51.com

    MsgBox "密码错误,再试一次!还有 " & 3 - m_nErrCount & " 次机会,注意密码区分大小写", vbCritical, "登录"

paper51.com

  paper51.com

 

内容来自论文无忧网 www.paper51.com

    txtPassword.SetFocus paper51.com

 

copyright paper51.com

 

内容来自www.paper51.com

    txtPassword.SelStart = 0 内容来自论文无忧网 www.paper51.com

 

http://www.paper51.com

  paper51.com

    txtPassword.SelLength = Len(txtPassword.Text) 内容来自www.paper51.com

 

内容来自论文无忧网 www.paper51.com

  paper51.com

  Else 内容来自www.paper51.com

  内容来自论文无忧网 www.paper51.com

 

内容来自www.paper51.com

    OK = True

http://www.paper51.com

  copyright paper51.com

 

内容来自论文无忧网 www.paper51.com

    g_Account = Account paper51.com

 

内容来自www.paper51.com

  paper51.com

    Me.Hide

paper51.com

  http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

  End If

内容来自论文无忧网 www.paper51.com

 

http://www.paper51.com

 

copyright paper51.com

 

paper51.com

 

copyright paper51.com

 

内容来自www.paper51.com

End Sub 内容来自论文无忧网 www.paper51.com

  内容来自www.paper51.com

  paper51.com

  内容来自www.paper51.com

  内容来自论文无忧网 www.paper51.com

 

paper51.com

  http://www.paper51.com

  http://www.paper51.com

 

paper51.com

  内容来自www.paper51.com

  copyright paper51.com

  http://www.paper51.com

  http://www.paper51.com

  http://www.paper51.com

  copyright paper51.com

  内容来自论文无忧网 www.paper51.com

 

内容来自论文无忧网 www.paper51.com

  paper51.com

 

paper51.com

  http://www.paper51.com

 

http://www.paper51.com

2:报损信息表:

paper51.com

  http://www.paper51.com

  paper51.com

http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

  http://www.paper51.com

代码分析:

paper51.com

  copyright paper51.com

  http://www.paper51.com

Option Explicit 内容来自论文无忧网 www.paper51.com

 

paper51.com

  http://www.paper51.com

Private OK AsBoolean            '确定用户按了OK还是CANCEL按钮 内容来自论文无忧网 www.paper51.com

  copyright paper51.com

  http://www.paper51.com

Private m_obj AsclsDispose        '数据对象,用来存储用户输入数据

copyright paper51.com

  paper51.com

 

内容来自论文无忧网 www.paper51.com

Public m_ViewTypeAs gxcViewType  '显示状态,指添加还是修改

copyright paper51.com

  内容来自论文无忧网 www.paper51.com

  http://www.paper51.com

Private m_TypeIdAs Long

paper51.com

  copyright paper51.com

 

内容来自www.paper51.com

Private m_AccountAs String      '调用此对话框的操作员 paper51.com

  内容来自论文无忧网 www.paper51.com

 

内容来自www.paper51.com

  内容来自www.paper51.com

 

copyright paper51.com

  内容来自论文无忧网 www.paper51.com

 

copyright paper51.com

 

paper51.com

 

http://www.paper51.com

'根据是“新增”还是修改,确定显示内容

http://www.paper51.com

 

paper51.com

  paper51.com

Private Sub SetStatus() copyright paper51.com

  paper51.com

  http://www.paper51.com

  copyright paper51.com

 

http://www.paper51.com

 

copyright paper51.com

  '设置控件默认值

内容来自www.paper51.com

 

copyright paper51.com

 

paper51.com

  Call SetDefaultValue copyright paper51.com

 

paper51.com

  paper51.com

  内容来自www.paper51.com

  内容来自论文无忧网 www.paper51.com

  copyright paper51.com

  '设置状态 paper51.com

  paper51.com

  copyright paper51.com

  Select Case m_ViewType

http://www.paper51.com

  内容来自www.paper51.com

 

http://www.paper51.com

  Case vtadd    '添加

paper51.com

  http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

    CancelButton.Visible = True copyright paper51.com

 

内容来自www.paper51.com

 

paper51.com

    OKButton.Caption = "确定" http://www.paper51.com

  内容来自www.paper51.com

  copyright paper51.com

  Case vtModify '修改

内容来自论文无忧网 www.paper51.com

  paper51.com

  paper51.com

    CancelButton.Visible = True 内容来自www.paper51.com

  http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

    OKButton.Caption = "保存"

http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

  http://www.paper51.com

  Case vtInfo   '查看 copyright paper51.com

 

http://www.paper51.com

 

copyright paper51.com

    CancelButton.Visible = False 内容来自论文无忧网 www.paper51.com

  paper51.com

  内容来自论文无忧网 www.paper51.com

    OKButton.Caption = "关闭"

paper51.com

  内容来自论文无忧网 www.paper51.com

  内容来自论文无忧网 www.paper51.com

 

http://www.paper51.com

 

paper51.com

 

paper51.com

  End Select copyright paper51.com

  paper51.com

 

paper51.com

  内容来自论文无忧网 www.paper51.com

 

内容来自www.paper51.com

 

copyright paper51.com

End Sub

内容来自论文无忧网 www.paper51.com

 

paper51.com

 

http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

 

copyright paper51.com

  http://www.paper51.com

'打开对话框,并传出用户输入数据 内容来自论文无忧网 www.paper51.com

 

paper51.com

  http://www.paper51.com

Public Function ShowDlg(ByRef obj As Object, _

copyright paper51.com

  copyright paper51.com

 

内容来自www.paper51.com

                       ByVal eViewType As gxcViewType, _ http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

 

内容来自论文无忧网 www.paper51.com

                       Optional nTypeId As Long = -1, _

paper51.com

  内容来自www.paper51.com

  http://www.paper51.com

                       Optional strUser As String = "") AsBoolean

内容来自www.paper51.com

  内容来自www.paper51.com

  paper51.com

  '保存数据 paper51.com

  copyright paper51.com

 

http://www.paper51.com

  Set m_obj = obj        '用户输入数据存放于此对象中

http://www.paper51.com

  paper51.com

 

http://www.paper51.com

  m_ViewType = eViewType  '对话框状态 http://www.paper51.com

 

内容来自www.paper51.com

 

copyright paper51.com

  If nTypeId = -1 And(Not m_obj Is Nothing) Then

paper51.com

 

copyright paper51.com

  内容来自论文无忧网 www.paper51.com

    m_TypeId = m_obj.TypeId 内容来自论文无忧网 www.paper51.com

  内容来自论文无忧网 www.paper51.com

 

copyright paper51.com

  Else 内容来自论文无忧网 www.paper51.com

 

内容来自论文无忧网 www.paper51.com

  内容来自论文无忧网 www.paper51.com

    m_TypeId = nTypeId

paper51.com

  copyright paper51.com

 

内容来自www.paper51.com

  End If copyright paper51.com

  http://www.paper51.com

 

内容来自论文无忧网 www.paper51.com

  m_Account = strUser     '调用此对话框的用户账号

copyright paper51.com

 

http://www.paper51.com

 

内容来自论文无忧网 www.paper51.com

 

http://www.paper51.com

 

http://www.paper51.com

  内容来自www.paper51.com

  copyright paper51.com

  内容来自www.paper51.com

  http://www.paper51.com

  '根据新增、编辑或查看设置显示内容 内容来自论文无忧网 www.paper51.com

  http://www.paper51.com

 

paper51.com

  SetStatus

http://www.paper51.com

  copyright paper51.com

 

内容来自论文无忧网 www.paper51.com

 

copyright paper51.com

 

paper51.com

 

copyright paper51.com

  '显示对话框

http://www.paper51.com

  paper51.com

  http://www.paper51.com

  OK = False

内容来自www.paper51.com

 

copyright paper51.com

 

paper51.com

  Me.Show vbModal 内容来自www.paper51.com

 

内容来自论文无忧网 www.paper51.com

 

内容来自www.paper51.com

  If OK = False Then

http://www.paper51.com

  copyright paper51.com

 

http://www.paper51.com

    ShowDlg = False

copyright paper51.com

  copyright paper51.com

 

copyright paper51.com

    Exit Function 内容来自www.paper51.com

 

copyright paper51.com

 

内容来自www.paper51.com

  End If paper51.com

  内容来自论文无忧网 www.paper51.com

 

内容来自论文无忧网 www.paper51.com

  内容来自www.paper51.com

  内容来自论文无忧网 www.paper51.com

  paper51.com

  '保存数据 http://www.paper51.com

 

内容来自www.paper51.com

 

内容来自www.paper51.com

  Set obj = m_obj

内容来自www.paper51.com

  内容来自www.paper51.com

  copyright paper51.com

 

paper51.com

 

http://www.paper51.com

 

内容来自www.paper51.com

  '返回并释放对话框

内容来自论文无忧网 www.paper51.com

 

paper51.com

 

内容来自论文无忧网 www.paper51.com

  ShowDlg = True http://www.paper51.com

  内容来自www.paper51.com

  paper51.com

  Unload Me

内容来自论文无忧网 www.paper51.com

  paper51.com

  http://www.paper51.com

 

copyright paper51.com

 

copyright paper51.com

 

http://www.paper51.com

End Function

paper51.com

  内容来自论文无忧网 www.paper51.com

  内容来自论文无忧网 www.paper51.com

 

copyright paper51.com

 

copyright paper51.com

 

http://www.paper51.com

'设置控件默认值 paper51.com

 

copyright paper51.com

  copyright paper51.com

Private Sub SetDefaultValue() 内容来自论文无忧网 www.paper51.com

 

内容来自论文无忧网 www.paper51.com

  paper51.com

  Dim ctl As Control 内容来自论文无忧网 www.paper51.com

  内容来自论文无忧网 www.paper51.com

  内容来自www.paper51.com

  Dim i AsInteger 内容来自www.paper51.com

  内容来自论文无忧网 www.paper51.com

  http://www.paper51.com

 

内容来自论文无忧网 www.paper51.com

  copyright paper51.com

  paper51.com

 

http://www.paper51.com

 

paper51.com

 

http://www.paper51.com

 '如果是新增,则清空所有文本框 内容来自www.paper51.com

 

copyright paper51.com

 

paper51.com

 '此处判断 m_obj为空与判断m_ViewType = vtAdd等效,但更安全

http://www.paper51.com

 

http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

  If m_obj IsNothing Then http://www.paper51.com

  http://www.paper51.com

 

内容来自www.paper51.com

    For Each ctl In Controls

paper51.com

 

copyright paper51.com

  paper51.com

      If TypeOf ctl Is TextBox Then paper51.com

 

paper51.com

 

内容来自论文无忧网 www.paper51.com

       ctl.Text = "" 内容来自www.paper51.com

  http://www.paper51.com

 

copyright paper51.com

      End If http://www.paper51.com

  内容来自www.paper51.com

 

内容来自论文无忧网 www.paper51.com

    Next

paper51.com

 

paper51.com

 

内容来自www.paper51.com

  Else  '用传入对象的值更新数据

内容来自www.paper51.com

  paper51.com

  http://www.paper51.com

    With m_obj 内容来自www.paper51.com

  copyright paper51.com

  http://www.paper51.com

      txtCount.Text =.Count

内容来自论文无忧网 www.paper51.com

 

copyright paper51.com

 

http://www.paper51.com

      txtReason.Text =.Reason

paper51.com

  内容来自论文无忧网 www.paper51.com

 

paper51.com

      txtRemark.Text =.Remark http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

 

http://www.paper51.com

     cboUnit.ListIndex = 0 内容来自论文无忧网 www.paper51.com

  内容来自www.paper51.com

  copyright paper51.com

      dtpRegDate.Value= .RegDate

内容来自www.paper51.com

 

paper51.com

  copyright paper51.com

      For i = 0 To cboMerchName.ListCount - 1 http://www.paper51.com

  paper51.com

 

内容来自论文无忧网 www.paper51.com

        If cboMerchName.ItemData(i) = .MerchandiseID Then paper51.com

 

内容来自www.paper51.com

  http://www.paper51.com

         cboMerchName.ListIndex = i        '客户类型Id

copyright paper51.com

  paper51.com

  http://www.paper51.com

         Exit For

内容来自www.paper51.com

  paper51.com

 

内容来自www.paper51.com

        EndIf 内容来自www.paper51.com

  copyright paper51.com

 

http://www.paper51.com

      Next i

内容来自论文无忧网 www.paper51.com

 

copyright paper51.com

  http://www.paper51.com

     

paper51.com

 

copyright paper51.com

  内容来自论文无忧网 www.paper51.com

    End With http://www.paper51.com

  内容来自论文无忧网 www.paper51.com

  copyright paper51.com

  End If

内容来自论文无忧网 www.paper51.com

  内容来自论文无忧网 www.paper51.com

 

http://www.paper51.com

 

paper51.com

  copyright paper51.com

  copyright paper51.com

End Sub

paper51.com

 

内容来自www.paper51.com

  copyright paper51.com

  copyright paper51.com

  内容来自www.paper51.com

 

paper51.com

'检查输入有效性

内容来自论文无忧网 www.paper51.com

 

http://www.paper51.com

 

paper51.com

Private Function CheckValid() As Boolean

paper51.com

  内容来自www.paper51.com

  内容来自www.paper51.com

  CheckValid = False 内容来自www.paper51.com

  copyright paper51.com

 

paper51.com

------分隔线----------------------------
联系方式