protected override IDbDataParameter[] CreateDeleteParameters(EntityBase anEntity) { FIVE_DIMENSION theEntity = (FIVE_DIMENSION)anEntity; List <IDbDataParameter> cmdParams = new List <IDbDataParameter>(); cmdParams.Add(DataAccessFactory.CreateDataParameter("transmode", "d")); if (!string.IsNullOrEmpty(theEntity.PK_ID)) { cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_PK_ID", theEntity.PK_ID)); } if (!string.IsNullOrEmpty(theEntity.VEHICLE_ISSUE_ID)) { cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_VEHICLE_ISSUE_ID", theEntity.VEHICLE_ISSUE_ID)); } if (!string.IsNullOrEmpty(theEntity.DIMENSION)) { cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_DIMENSION", theEntity.DIMENSION)); } if (!string.IsNullOrEmpty(theEntity.SCRATCH)) { cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_SCRATCH", theEntity.SCRATCH)); } if (!string.IsNullOrEmpty(theEntity.MISSING)) { cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_MISSING", theEntity.MISSING)); } if (!string.IsNullOrEmpty(theEntity.BROKEN)) { cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_BROKEN", theEntity.BROKEN)); } if (!string.IsNullOrEmpty(theEntity.DENTED)) { cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_DENTED", theEntity.DENTED)); } if (!string.IsNullOrEmpty(theEntity.OTHERS)) { cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_OTHERS", theEntity.OTHERS)); } if (!string.IsNullOrEmpty(theEntity.OTHER_DESCRIPTION)) { cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_OTHER_DESCRIPTION", theEntity.OTHER_DESCRIPTION)); } cmdParams.Add(DataAccessFactory.CreateDataParameter("errmsg", "")); return(cmdParams.ToArray()); }
protected override EntityBase CreateAndBuildEntity(DataHelper.Framework.SafeDataReader dr) { FIVE_DIMENSION theEntity = new FIVE_DIMENSION(); theEntity.PK_ID = !dr.IsDBNull(0) ? dr.GetValue(0).ToString() : string.Empty; theEntity.VEHICLE_ISSUE_ID = !dr.IsDBNull(1) ? dr.GetValue(1).ToString() : string.Empty; theEntity.DIMENSION = !dr.IsDBNull(2) ? dr.GetValue(2).ToString() : string.Empty; theEntity.SCRATCH = !dr.IsDBNull(3) ? dr.GetValue(3).ToString() : string.Empty; theEntity.MISSING = !dr.IsDBNull(4) ? dr.GetValue(4).ToString() : string.Empty; theEntity.BROKEN = !dr.IsDBNull(5) ? dr.GetValue(5).ToString() : string.Empty; theEntity.DENTED = !dr.IsDBNull(6) ? dr.GetValue(6).ToString() : string.Empty; theEntity.OTHERS = !dr.IsDBNull(7) ? dr.GetValue(7).ToString() : string.Empty; theEntity.OTHER_DESCRIPTION = !dr.IsDBNull(8) ? dr.GetValue(8).ToString() : string.Empty; return(theEntity); }