예제 #1
0
        public override IModel CreateModel(SqlDataReader dr)
        {
            InvoiceApplySIDetail invoiceapplysidetail = new InvoiceApplySIDetail();

            int indexSIDetailId = dr.GetOrdinal("SIDetailId");
            invoiceapplysidetail.SIDetailId = Convert.ToInt32(dr[indexSIDetailId]);

            int indexInvoiceApplyId = dr.GetOrdinal("InvoiceApplyId");
            if (dr["InvoiceApplyId"] != DBNull.Value)
            {
                invoiceapplysidetail.InvoiceApplyId = Convert.ToInt32(dr[indexInvoiceApplyId]);
            }

            int indexApplyId = dr.GetOrdinal("ApplyId");
            if (dr["ApplyId"] != DBNull.Value)
            {
                invoiceapplysidetail.ApplyId = Convert.ToInt32(dr[indexApplyId]);
            }

            int indexInvoiceId = dr.GetOrdinal("InvoiceId");
            if (dr["InvoiceId"] != DBNull.Value)
            {
                invoiceapplysidetail.InvoiceId = Convert.ToInt32(dr[indexInvoiceId]);
            }

            int indexSIId = dr.GetOrdinal("SIId");
            if (dr["SIId"] != DBNull.Value)
            {
                invoiceapplysidetail.SIId = Convert.ToInt32(dr[indexSIId]);
            }

            int indexDetailStatus = dr.GetOrdinal("DetailStatus");
            if (dr["DetailStatus"] != DBNull.Value)
            {
                invoiceapplysidetail.DetailStatus = (Common.StatusEnum)Convert.ToInt32(dr[indexDetailStatus]);
            }

            int indexCreatorId = dr.GetOrdinal("CreatorId");
            if (dr["CreatorId"] != DBNull.Value)
            {
                invoiceapplysidetail.CreatorId = Convert.ToInt32(dr[indexCreatorId]);
            }

            int indexCreateTime = dr.GetOrdinal("CreateTime");
            if (dr["CreateTime"] != DBNull.Value)
            {
                invoiceapplysidetail.CreateTime = Convert.ToDateTime(dr[indexCreateTime]);
            }

            int indexLastModifyId = dr.GetOrdinal("LastModifyId");
            if (dr["LastModifyId"] != DBNull.Value)
            {
                invoiceapplysidetail.LastModifyId = Convert.ToInt32(dr[indexLastModifyId]);
            }

            int indexLastModifyTime = dr.GetOrdinal("LastModifyTime");
            if (dr["LastModifyTime"] != DBNull.Value)
            {
                invoiceapplysidetail.LastModifyTime = Convert.ToDateTime(dr[indexLastModifyTime]);
            }

            return invoiceapplysidetail;
        }
예제 #2
0
        public override IModel CreateModel(DataRow dr)
        {
            InvoiceApplySIDetail invoiceapplysidetail = new InvoiceApplySIDetail();

            invoiceapplysidetail.SIDetailId = Convert.ToInt32(dr["SIDetailId"]);

            if (dr["InvoiceApplyId"] != DBNull.Value)
            {
                invoiceapplysidetail.InvoiceApplyId = Convert.ToInt32(dr["InvoiceApplyId"]);
            }

            if (dr["ApplyId"] != DBNull.Value)
            {
                invoiceapplysidetail.ApplyId = Convert.ToInt32(dr["ApplyId"]);
            }

            if (dr["InvoiceId"] != DBNull.Value)
            {
                invoiceapplysidetail.InvoiceId = Convert.ToInt32(dr["InvoiceId"]);
            }

            if (dr["SIId"] != DBNull.Value)
            {
                invoiceapplysidetail.SIId = Convert.ToInt32(dr["SIId"]);
            }

            if (dr["DetailStatus"] != DBNull.Value)
            {
                invoiceapplysidetail.DetailStatus = (Common.StatusEnum)Convert.ToInt32(dr["DetailStatus"]);
            }

            if (dr["CreatorId"] != DBNull.Value)
            {
                invoiceapplysidetail.CreatorId = Convert.ToInt32(dr["CreatorId"]);
            }

            if (dr["CreateTime"] != DBNull.Value)
            {
                invoiceapplysidetail.CreateTime = Convert.ToDateTime(dr["CreateTime"]);
            }

            if (dr["LastModifyId"] != DBNull.Value)
            {
                invoiceapplysidetail.LastModifyId = Convert.ToInt32(dr["LastModifyId"]);
            }

            if (dr["LastModifyTime"] != DBNull.Value)
            {
                invoiceapplysidetail.LastModifyTime = Convert.ToDateTime(dr["LastModifyTime"]);
            }

            return invoiceapplysidetail;
        }