forms/financialsetup/frmIndustryAcctSelect.vb

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

Public Class frmIndustryAcctSelect

    '行业类型科目的集合列表
    Private tmpList As List(Of ClsIndustryAccountType)

    '发布对象
    Private m_Broker As ClsBroker = New ClsBroker()

    Private Sub frmIndustryAcctSelect_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Try
            '订阅事件


            '取出全部行业列表
            Dim tmpDbAccess As ClsIndustryAccountTypeDbAccess = New ClsIndustryAccountTypeDbAccess(sysAppInfoConnectionString)
            tmpList = tmpDbAccess.GetAllIndustryAccountType()
            Me.lstIndustryAcct.FullRowSelect = True '行选择,不是单元格选择
            Me.lstIndustryAcct.MultiSelect = False '不允许多行选择
            Me.lstIndustryAcct.View = View.Details
            Me.lstIndustryAcct.Items.Clear()
            Me.lstIndustryAcct.Columns.Add("代号")
            Me.lstIndustryAcct.Columns.Add("会计科目标准")
            Me.lstIndustryAcct.Columns(0).Width = 50
            Me.lstIndustryAcct.Columns(1).Width = 160

            For Each tmpCls As ClsIndustryAccountType In tmpList
                'Me.lstIndustryAcct.Items.Add(New ListViewItem(New String() {tmpCls.IndustryId.ToString, tmpCls.Industry}))
                Dim tmpItem As ListViewItem = New ListViewItem(tmpCls.IndustryId.ToString)
                tmpItem.SubItems.Add(tmpCls.Industry)
                Me.lstIndustryAcct.Items.Add(tmpItem)
                'Me.lstIndustryAcct.Items.Add(New ListViewItem(tmpCls.IndustryId.ToString))

            Next
        Catch ex As OleDb.OleDbException
            mErrorNumber = ex.ErrorCode
            mErrorMessage = ex.Message
            mErrorCreater = "frmIndustryAcctSelect - Load"
        End Try
    End Sub

    Private Sub btnSelAndClose_Click(sender As Object, e As EventArgs) Handles btnSelAndClose.Click
        '引发事件
        Dim returnE As TransEventArg = New TransEventArg()

        returnE.Msg = "IndustryAcctType"

        '判断是否选择了
        If Me.lstIndustryAcct.SelectedItems.Count > 0 Then
            returnE.Obj = tmpList.Item(Me.lstIndustryAcct.SelectedItems.Item(0).Index)
            '判断窗体是否以模态打开
            If Me.Modal Then
                '窗体关闭状态置为OK
                Me.DialogResult = DialogResult.OK

            End If
        Else
            '没有选择账套,广播事件中载明没有选择
            returnE.Obj = Nothing
            If Me.Modal Then
                '窗体关闭状态置为NO
后面还有 10 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。