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

            ojb = dataReader["TicketOrderID"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.TicketOrderID = (int)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["OrderNum"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.OrderNum = (int)ojb;
            }
            return(model);
        }
Beispiel #2
0
        public int InsertTicketsOrder(TicketsOrderEntity entity)
        {
            this.ClearBrokenRuleMessages();
            int id = ticketOrderRespository.Insert(entity);

            if (id <= 0)
            {
                this.AddBrokenRuleMessage();
            }
            return(id);
        }