Click here to Skip to main content
15,886,362 members
Articles / Web Development / ASP.NET

Open Source Extensible Enterprise n-tier Application Framework with Multilayered Architecture

Rate me:
Please Sign up or sign in to vote.
4.67/5 (2 votes)
3 Dec 2010MIT3 min read 36.9K   770   41  
Xenta architecture overview
using System;
using SiberTek.Xenta.Managers;

namespace SiberTek.Xenta.Entities
{
    /// <summary>
    /// Represents an forum ban entity
    /// </summary>
    public class ForumBanInfo : BusinessEntityBase
    {
        #region Fields
        private int _banID;
        private int _userID;
        private string _description;
        private DateTime _createdOn;
        private DateTime? _expiredOn;
        private DateTime _updatedOn;
        #endregion

        #region Constructors
        public ForumBanInfo() : this(0, 0, String.Empty, DateTime.UtcNow, null, DateTime.UtcNow)
        {
        }

        public ForumBanInfo(int banID, int userID, string description, DateTime createdOn, DateTime? expiredOn, DateTime updatedOn)
        {
            _banID = banID;
            _userID = userID;
            _description = description;
            _createdOn = createdOn;
            _expiredOn = expiredOn;
            _updatedOn = updatedOn;
        }
        #endregion

        #region Properties
        public int BanID
        {
            get
            {
                return _banID;
            }
            set
            {
                _banID = value;
            }
        }

        public int UserID
        {
            get
            {
                return _userID;
            }
            set
            {
                _userID = value;
            }
        }

        public UserInfo User
        {
            get
            {
                return UserManager.Instance.GetUser(UserID);
            }
        }

        public string Description
        {
            get
            {
                return _description;
            }
            set
            {
                _description = value;
            }
        }

        public DateTime CreatedOn
        {
            get
            {
                return _createdOn;
            }
            set
            {

                _createdOn = value;
            }
        }

        public DateTime? ExpiredOn
        {
            get
            {
                return _expiredOn;
            }
            set
            {

                _expiredOn = value;
            }
        }

        public DateTime UpdatedOn
        {
            get
            {
                return _updatedOn;
            }
            set
            {

                _updatedOn = value;
            }
        }

        public bool IsExpired
        {
            get
            {
                return (ExpiredOn.HasValue && (DateTime.UtcNow.CompareTo(ExpiredOn.Value) >= 0));
            }
        }
        #endregion
    }
}

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 MIT License


Written By
Russian Federation Russian Federation
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions