protected override IDbDataParameter[] CreateSelectParameters(EntityBase anEntity)
        {
            SCRAP_RETURN_DETAIL     theEntity = (SCRAP_RETURN_DETAIL)anEntity;
            List <IDbDataParameter> cmdParams = new List <IDbDataParameter>();

            if (!string.IsNullOrEmpty(theEntity.PK_ID))
            {
                cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_PK_ID", theEntity.PK_ID));
            }

            if (!string.IsNullOrEmpty(theEntity.SCRAP_RETURN_ID))
            {
                cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_SCRAP_RETURN_ID", theEntity.SCRAP_RETURN_ID));
            }

            if (!string.IsNullOrEmpty(theEntity.PRODUCT_ID))
            {
                cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_PRODUCT_ID", theEntity.PRODUCT_ID));
            }

            if (!string.IsNullOrEmpty(theEntity.STORE_AT))
            {
                cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_STORE_AT", theEntity.STORE_AT));
            }

            if (!string.IsNullOrEmpty(theEntity.REMARKS))
            {
                cmdParams.Add(DataAccessFactory.CreateDataParameter("VAR_REMARKS", theEntity.REMARKS));
            }

            cmdParams.Add(DataAccessFactory.CreateDataParameter("Result", ""));

            return(cmdParams.ToArray());
        }
        protected override EntityBase CreateAndBuildEntity(DataHelper.Framework.SafeDataReader dr)
        {
            SCRAP_RETURN_DETAIL theEntity = new SCRAP_RETURN_DETAIL();

            theEntity.PK_ID = !dr.IsDBNull(0) ? dr.GetValue(0).ToString() : string.Empty;

            theEntity.SCRAP_RETURN_ID = !dr.IsDBNull(1) ? dr.GetValue(1).ToString() : string.Empty;

            theEntity.PRODUCT_ID = !dr.IsDBNull(2) ? dr.GetValue(2).ToString() : string.Empty;

            theEntity.STORE_AT = !dr.IsDBNull(3) ? dr.GetValue(3).ToString() : string.Empty;

            theEntity.REMARKS = !dr.IsDBNull(4) ? dr.GetValue(4).ToString() : string.Empty;

            return(theEntity);
        }