Exemplo n.º 1
0
        /// <summary>
        /// Bind IDataReader to Entity
        /// </summary>
        public static TicketHistorysEntity ReaderBind(IDataReader dataReader)
        {
            TicketHistorysEntity model = new TicketHistorysEntity();
            object ojb;

            ojb = dataReader["TDHID"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.TDHID = (int)ojb;
            }
            ojb = dataReader["TicketID"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.TicketID = (int)ojb;
            }
            model.Description = dataReader["Description"].ToString();
            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["ResponsibleUserId"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.ResponsibleUserId = (int)ojb;
            }
            return(model);
        }