Example #1
0
        public static List <BaseStatus> QueryBaseStatus(QueryCondition queryCondition)
        {
            string sql = @"
SELECT A.ID AS ID,A.STATUS_ID AS StatusId,A.STATUS_NAME AS StatusName,A.GROUP_NAME AS GroupName,A.CREATED_ON AS CreatedOn,A.CREATED_BY AS CreatedBy
FROM T_BASE_STATUS AS A WITH(NOLOCK) 
WHERE 1=1 

";

            var dict = new Dictionary <QueryConditionField, string>
            {
                //{QueryConditionField.Workshop, " AND WORKSHOP = "},
            };
            var builder = new QueryConditionBuilder(queryCondition, dict);

            sql += builder.Build();

            //sql += " ORDER BY RECORD_STATUS DESC,MODIFIED_ON DESC ";

            return(Dapper.Query <BaseStatus>(sql, queryCondition));
        }
Example #2
0
        public static List<BaseStatus> QueryBaseStatus(QueryCondition queryCondition)
        {
            string sql = @"
            SELECT A.ID AS ID,A.STATUS_ID AS StatusId,A.STATUS_NAME AS StatusName,A.GROUP_NAME AS GroupName,A.CREATED_ON AS CreatedOn,A.CREATED_BY AS CreatedBy
            FROM T_BASE_STATUS AS A WITH(NOLOCK)
            WHERE 1=1

            ";

            var dict = new Dictionary<QueryConditionField, string>
            {
                //{QueryConditionField.Workshop, " AND WORKSHOP = "},
            };
            var builder = new QueryConditionBuilder(queryCondition, dict);
            sql += builder.Build();

            //sql += " ORDER BY RECORD_STATUS DESC,MODIFIED_ON DESC ";

            return Dapper.Query<BaseStatus>(sql, queryCondition);
        }