public override IModel CreateModel(SqlDataReader dr) { PriceConfirmDetail priceconfirmdetail = new PriceConfirmDetail(); int indexDetailId = dr.GetOrdinal("DetailId"); priceconfirmdetail.DetailId = Convert.ToInt32(dr[indexDetailId]); int indexPriceConfirmId = dr.GetOrdinal("PriceConfirmId"); if (dr["PriceConfirmId"] != DBNull.Value) { priceconfirmdetail.PriceConfirmId = Convert.ToInt32(dr[indexPriceConfirmId]); } int indexInterestDetailId = dr.GetOrdinal("InterestDetailId"); if (dr["InterestDetailId"] != DBNull.Value) { priceconfirmdetail.InterestDetailId = Convert.ToInt32(dr[indexInterestDetailId]); } int indexInterestId = dr.GetOrdinal("InterestId"); if (dr["InterestId"] != DBNull.Value) { priceconfirmdetail.InterestId = Convert.ToInt32(dr[indexInterestId]); } int indexStockLogId = dr.GetOrdinal("StockLogId"); if (dr["StockLogId"] != DBNull.Value) { priceconfirmdetail.StockLogId = Convert.ToInt32(dr[indexStockLogId]); } int indexStockId = dr.GetOrdinal("StockId"); if (dr["StockId"] != DBNull.Value) { priceconfirmdetail.StockId = Convert.ToInt32(dr[indexStockId]); } int indexConfirmAmount = dr.GetOrdinal("ConfirmAmount"); if (dr["ConfirmAmount"] != DBNull.Value) { priceconfirmdetail.ConfirmAmount = Convert.ToDecimal(dr[indexConfirmAmount]); } int indexSettlePrice = dr.GetOrdinal("SettlePrice"); if (dr["SettlePrice"] != DBNull.Value) { priceconfirmdetail.SettlePrice = Convert.ToDecimal(dr[indexSettlePrice]); } int indexSettleBala = dr.GetOrdinal("SettleBala"); if (dr["SettleBala"] != DBNull.Value) { priceconfirmdetail.SettleBala = Convert.ToDecimal(dr[indexSettleBala]); } int indexDetailStatus = dr.GetOrdinal("DetailStatus"); if (dr["DetailStatus"] != DBNull.Value) { priceconfirmdetail.DetailStatus = (Common.StatusEnum)Convert.ToInt32(dr[indexDetailStatus]); } int indexCreatorId = dr.GetOrdinal("CreatorId"); if (dr["CreatorId"] != DBNull.Value) { priceconfirmdetail.CreatorId = Convert.ToInt32(dr[indexCreatorId]); } int indexCreateTime = dr.GetOrdinal("CreateTime"); if (dr["CreateTime"] != DBNull.Value) { priceconfirmdetail.CreateTime = Convert.ToDateTime(dr[indexCreateTime]); } int indexLastModifyId = dr.GetOrdinal("LastModifyId"); if (dr["LastModifyId"] != DBNull.Value) { priceconfirmdetail.LastModifyId = Convert.ToInt32(dr[indexLastModifyId]); } int indexLastModifyTime = dr.GetOrdinal("LastModifyTime"); if (dr["LastModifyTime"] != DBNull.Value) { priceconfirmdetail.LastModifyTime = Convert.ToDateTime(dr[indexLastModifyTime]); } return priceconfirmdetail; }
public override IModel CreateModel(DataRow dr) { PriceConfirmDetail priceconfirmdetail = new PriceConfirmDetail(); priceconfirmdetail.DetailId = Convert.ToInt32(dr["DetailId"]); if (dr["PriceConfirmId"] != DBNull.Value) { priceconfirmdetail.PriceConfirmId = Convert.ToInt32(dr["PriceConfirmId"]); } if (dr["InterestDetailId"] != DBNull.Value) { priceconfirmdetail.InterestDetailId = Convert.ToInt32(dr["InterestDetailId"]); } if (dr["InterestId"] != DBNull.Value) { priceconfirmdetail.InterestId = Convert.ToInt32(dr["InterestId"]); } if (dr["StockLogId"] != DBNull.Value) { priceconfirmdetail.StockLogId = Convert.ToInt32(dr["StockLogId"]); } if (dr["StockId"] != DBNull.Value) { priceconfirmdetail.StockId = Convert.ToInt32(dr["StockId"]); } if (dr["ConfirmAmount"] != DBNull.Value) { priceconfirmdetail.ConfirmAmount = Convert.ToDecimal(dr["ConfirmAmount"]); } if (dr["SettlePrice"] != DBNull.Value) { priceconfirmdetail.SettlePrice = Convert.ToDecimal(dr["SettlePrice"]); } if (dr["SettleBala"] != DBNull.Value) { priceconfirmdetail.SettleBala = Convert.ToDecimal(dr["SettleBala"]); } if (dr["DetailStatus"] != DBNull.Value) { priceconfirmdetail.DetailStatus = (Common.StatusEnum)Convert.ToInt32(dr["DetailStatus"]); } if (dr["CreatorId"] != DBNull.Value) { priceconfirmdetail.CreatorId = Convert.ToInt32(dr["CreatorId"]); } if (dr["CreateTime"] != DBNull.Value) { priceconfirmdetail.CreateTime = Convert.ToDateTime(dr["CreateTime"]); } if (dr["LastModifyId"] != DBNull.Value) { priceconfirmdetail.LastModifyId = Convert.ToInt32(dr["LastModifyId"]); } if (dr["LastModifyTime"] != DBNull.Value) { priceconfirmdetail.LastModifyTime = Convert.ToDateTime(dr["LastModifyTime"]); } return priceconfirmdetail; }