Click here to Skip to main content
15,884,298 members
Articles / Programming Languages / Visual Basic

TeamVision

Rate me:
Please Sign up or sign in to vote.
3.08/5 (11 votes)
16 Nov 2009CPL3 min read 83.9K   5.4K   69  
A simple project task management application. A managed approach to help keep on top of your projects.
'------------------------------------------------------------------------------
' <auto-generated>
'     This code was generated by a tool.
'     Runtime Version:2.0.50727.3082
'
'     Changes to this file may cause incorrect behavior and will be lost if
'     the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------

Option Strict Off
Option Explicit On

Imports System

'*************************************************************
' Class Name:  ProjectEventArgs
' Purpose:  [Insert class purpose here.]
' Description: 
'***************************************************************
Namespace EventArgs
    
    Public Class ProjectEventArgs
        Inherits Common.EventArgs
        
        Private m_Project As Business.Project
        
        Private m_Filter As String =  String.Empty 
        
        Public Sub New()
            MyBase.New
            Me.InitializeFilter
        End Sub
        
        Public Sub New(ByVal ProjectID As Integer)
            MyBase.New
            If (ProjectID > 0) Then
                Me.m_Project = Managers.ProjectManager.GetByPrimaryKey(ProjectID)
            End If
            Me.InitializeFilter
        End Sub
        
        Public Sub New(ByVal biz As Business.Project)
            MyBase.New
            Me.m_Project = biz
            Me.InitializeFilter
        End Sub
        
        Public Property Project() As Business.Project
            Get
                Return Me.m_Project
            End Get
            Set
                Me.m_Project = value
            End Set
        End Property
        
        Public Overrides Property Filter() As String
            Get
                Return Me.m_Filter
            End Get
            Set
                Me.m_Filter = value
            End Set
        End Property
        
        Public Overrides ReadOnly Property Domain() As Common.Domains
            Get
                Return Common.Domains.Projects
            End Get
        End Property
        
        Public Overrides ReadOnly Property Text() As String
            Get
                Return Common.Titles.Project
            End Get
        End Property
        
        #Region "InitializeFilter"
        Private Sub InitializeFilter()
            If Not IsNothing(Me.m_Project) AndAlso Me.m_Project.ProjectID > 0 Then
              Me.m_Filter = Columns.Project.ProjectIDColumn & "=" &  Me.m_Project.ProjectID.ToString
             Else 
            Me.m_Filter = (Columns.Project.ProjectIDColumn + ">0")
            End If
        End Sub
        #End Region
    End Class
End Namespace

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Common Public License Version 1.0 (CPL)


Written By
Founder Arkitech EBC Corporation
United States United States
MS, BBA, software developer, consultant, and trainer. Specializing in building data-centric applications designed for business, university, community & faith based organizations. Started developing Excel VBA macros and never looked back. Freelance developer utilizing VB.Net, SQL Server, Microsoft Access, and ASP.Net.

Comments and Discussions