/// <summary>
        /// Bind IDataReader to Entity
        /// </summary>
        public static ExpandTimeSheetsEntity ReaderBind(IDataReader dataReader)
        {
            TimeSheetsEntity       model       = TimeSheetsEntity.ReaderBind(dataReader);
            ExpandTimeSheetsEntity expandModel = (ExpandTimeSheetsEntity)model;

            expandModel.TicketDescription = dataReader["TicketDescription"].ToString();
            return(expandModel);
        }
        public static TimeSheetsEntity CreateTimeSheet(int createUserID, ISystemDateTime datetimeProvider)
        {
            TimeSheetsEntity model = new TimeSheetsEntity();

            model.ID         = 0;
            model.CreatedBy  = createUserID;
            model.CreatedOn  = datetimeProvider.Now;
            model.ModifiedBy = createUserID;
            model.ModifiedOn = datetimeProvider.Now;

            model.Description = string.Empty;
            model.Hours       = 0;
            model.IsMeeting   = false;
            model.IsSubmitted = false;
            model.Percentage  = 0;
            model.ProjectID   = 0;
            model.SheetDate   = datetimeProvider.Now;
            model.TicketID    = 0;
            model.UserID      = 0;

            return(model);
        }
        /// <summary>
        /// Bind IDataReader to Entity
        /// </summary>
        public static TimeSheetsEntity ReaderBind(IDataReader dataReader)
        {
            TimeSheetsEntity model = new TimeSheetsEntity();
            object           ojb;

            ojb = dataReader["ID"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.ID = (int)ojb;
            }
            ojb = dataReader["SheetDate"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.SheetDate = (DateTime)ojb;
            }
            ojb = dataReader["ProjectID"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.ProjectID = (int)ojb;
            }
            ojb = dataReader["TicketID"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.TicketID = (int)ojb;
            }
            ojb = dataReader["UserID"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.UserID = (int)ojb;
            }
            ojb = dataReader["Hours"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.Hours = (decimal)ojb;
            }
            ojb = dataReader["Percentage"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.Percentage = (decimal)ojb;
            }
            model.Description = dataReader["Description"].ToString();
            ojb = dataReader["IsSubmitted"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.IsSubmitted = (bool)ojb;
            }
            ojb = dataReader["CreatedOn"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.CreatedOn = (DateTime)ojb;
            }
            ojb = dataReader["CreatedBy"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.CreatedBy = (int)ojb;
            }
            ojb = dataReader["ModifiedOn"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.ModifiedOn = (DateTime)ojb;
            }
            ojb = dataReader["ModifiedBy"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.ModifiedBy = (int)ojb;
            }
            ojb = dataReader["IsMeeting"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.IsMeeting = (bool)ojb;
            }
            ojb = dataReader["EventID"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.EventID = (int)ojb;
            }
            return(model);
        }