protected override IDbDataParameter[] CreateInsertParameters(EntityBase anEntity) { NEXT_SERVICE_SUGGESTION theEntity = (NEXT_SERVICE_SUGGESTION)anEntity; List <IDbDataParameter> cmdParams = new List <IDbDataParameter>(); cmdParams.Add(DataAccessFactory.CreateDataParameter("transmode", "i")); if (!string.IsNullOrEmpty(theEntity.PK_ID)) { cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_PK_ID", theEntity.PK_ID)); } if (!string.IsNullOrEmpty(theEntity.NEXT_SERVICE_ID)) { cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_NEXT_SERVICE_ID", theEntity.NEXT_SERVICE_ID)); } if (!string.IsNullOrEmpty(theEntity.SERVICE_SUGGESTION)) { cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_SERVICE_SUGGESTION", theEntity.SERVICE_SUGGESTION)); } cmdParams.Add(DataAccessFactory.CreateDataParameter("errmsg", "")); return(cmdParams.ToArray()); }
protected override EntityBase CreateAndBuildEntity(DataHelper.Framework.SafeDataReader dr) { NEXT_SERVICE_SUGGESTION theEntity = new NEXT_SERVICE_SUGGESTION(); theEntity.PK_ID = !dr.IsDBNull(0) ? dr.GetValue(0).ToString() : string.Empty; theEntity.NEXT_SERVICE_ID = !dr.IsDBNull(1) ? dr.GetValue(1).ToString() : string.Empty; theEntity.SERVICE_SUGGESTION = !dr.IsDBNull(2) ? dr.GetValue(2).ToString() : string.Empty; return(theEntity); }