public override IModel CreateModel(SqlDataReader dr) { PricingApplyDelay pricingapplydelay = new PricingApplyDelay(); int indexDelayId = dr.GetOrdinal("DelayId"); pricingapplydelay.DelayId = Convert.ToInt32(dr[indexDelayId]); int indexPricingApplyId = dr.GetOrdinal("PricingApplyId"); if (dr["PricingApplyId"] != DBNull.Value) { pricingapplydelay.PricingApplyId = Convert.ToInt32(dr[indexPricingApplyId]); } int indexDelayAmount = dr.GetOrdinal("DelayAmount"); if (dr["DelayAmount"] != DBNull.Value) { pricingapplydelay.DelayAmount = Convert.ToDecimal(dr[indexDelayAmount]); } int indexDelayFee = dr.GetOrdinal("DelayFee"); if (dr["DelayFee"] != DBNull.Value) { pricingapplydelay.DelayFee = Convert.ToDecimal(dr[indexDelayFee]); } int indexDelayQP = dr.GetOrdinal("DelayQP"); if (dr["DelayQP"] != DBNull.Value) { pricingapplydelay.DelayQP = Convert.ToDateTime(dr[indexDelayQP]); } int indexDetailStatus = dr.GetOrdinal("DetailStatus"); if (dr["DetailStatus"] != DBNull.Value) { pricingapplydelay.DetailStatus = (Common.StatusEnum)Convert.ToInt32(dr[indexDetailStatus]); } int indexCreatorId = dr.GetOrdinal("CreatorId"); if (dr["CreatorId"] != DBNull.Value) { pricingapplydelay.CreatorId = Convert.ToInt32(dr[indexCreatorId]); } int indexCreateTime = dr.GetOrdinal("CreateTime"); if (dr["CreateTime"] != DBNull.Value) { pricingapplydelay.CreateTime = Convert.ToDateTime(dr[indexCreateTime]); } int indexLastModifyId = dr.GetOrdinal("LastModifyId"); if (dr["LastModifyId"] != DBNull.Value) { pricingapplydelay.LastModifyId = Convert.ToInt32(dr[indexLastModifyId]); } int indexLastModifyTime = dr.GetOrdinal("LastModifyTime"); if (dr["LastModifyTime"] != DBNull.Value) { pricingapplydelay.LastModifyTime = Convert.ToDateTime(dr[indexLastModifyTime]); } return pricingapplydelay; }
public override IModel CreateModel(DataRow dr) { PricingApplyDelay pricingapplydelay = new PricingApplyDelay(); pricingapplydelay.DelayId = Convert.ToInt32(dr["DelayId"]); if (dr["PricingApplyId"] != DBNull.Value) { pricingapplydelay.PricingApplyId = Convert.ToInt32(dr["PricingApplyId"]); } if (dr["DelayAmount"] != DBNull.Value) { pricingapplydelay.DelayAmount = Convert.ToDecimal(dr["DelayAmount"]); } if (dr["DelayFee"] != DBNull.Value) { pricingapplydelay.DelayFee = Convert.ToDecimal(dr["DelayFee"]); } if (dr["DelayQP"] != DBNull.Value) { pricingapplydelay.DelayQP = Convert.ToDateTime(dr["DelayQP"]); } if (dr["DetailStatus"] != DBNull.Value) { pricingapplydelay.DetailStatus = (Common.StatusEnum)Convert.ToInt32(dr["DetailStatus"]); } if (dr["CreatorId"] != DBNull.Value) { pricingapplydelay.CreatorId = Convert.ToInt32(dr["CreatorId"]); } if (dr["CreateTime"] != DBNull.Value) { pricingapplydelay.CreateTime = Convert.ToDateTime(dr["CreateTime"]); } if (dr["LastModifyId"] != DBNull.Value) { pricingapplydelay.LastModifyId = Convert.ToInt32(dr["LastModifyId"]); } if (dr["LastModifyTime"] != DBNull.Value) { pricingapplydelay.LastModifyTime = Convert.ToDateTime(dr["LastModifyTime"]); } return pricingapplydelay; }