Exemple #1
0
        internal protected DataSet GetEstDeptOrgScoreInfo_Dac(int estterm_ref_id, string score_code)
        {
            string query = @"SELECT	ESTTERM_REF_ID
	                                ,SCORE_CODE
	                                ,SCORE_NAME
	                                ,MIN_VALUE
	                                ,MAX_VALUE
	                                ,CREATE_USER
	                                ,CREATE_DATE
	                                ,UPDATE_USER
	                                ,UPDATE_DATE
                                FROM BSC_EST_DEPT_ORG_SCORE_INFO 
                               WHERE (ESTTERM_REF_ID = CASE WHEN ISNULL(@ESTTERM_REF_ID,0)<1 THEN ESTTERM_REF_ID ELSE @ESTTERM_REF_ID END)
	                             AND (SCORE_CODE  LIKE (@SCORE_CODE "     + DbAgentHelper.GetConcatinationChar() + @" '%' ) OR  @SCORE_CODE  =''  )
                               ORDER BY MIN_VALUE DESC";

            IDbDataParameter[] paramArray = CreateDataParameters(2);

            paramArray[0]       = CreateDataParameter("@ESTTERM_REF_ID", SqlDbType.Int);
            paramArray[0].Value = estterm_ref_id;
            paramArray[1]       = CreateDataParameter("@SCORE_CODE", SqlDbType.VarChar);
            paramArray[1].Value = score_code;

            DataSet ds = DbAgentObj.FillDataSet(DbAgentHelper.GetQueryStringReplace(query), "ESTDEPTORGSCOREINFOGET", null, paramArray, CommandType.Text);

            return(ds);
        }