Beispiel #1
0
        public List <Formula> GetFormula(FormulaFilter filter, int pageIndex, int pageSize, out int totalCount)
        {
            string querySql = "select \"row_number\"() over(ORDER BY f.\"IsEnable\" desc,f.\"CreateTime\" desc) as \"rownum\",f.\"Id\",f.\"Name\",f.\"ApplyTo\",f.\"SideEffect\",e.\"Name\" as \"PrincipalName\",u.\"UserName\" as \"OperatorName\",f.\"IsEnable\",f.\"Remark\",f.\"CreateTime\" from \"T_Formula\" f join \"T_Employee\" e on e.\"Id\"=f.\"PrincipalId\" join \"T_User\" u on u.\"Id\"=f.\"OperatorId\"";

            string countSql = "select count(f.\"Id\") from \"T_Formula\" f join \"T_Employee\" e on e.\"Id\"=f.\"PrincipalId\" join \"T_User\" u on u.\"Id\"=f.\"OperatorId\"";

            return(GetPagedData <Formula, FormulaFilter>(pageIndex, pageSize, out totalCount, countSql, querySql, filter));
        }
Beispiel #2
0
        public List <Formula> GetFormula(FormulaFilter filter, int rowsCount)
        {
            string querySql = "select \"row_number\"() over(ORDER BY f.\"IsEnable\" desc,f.\"CreateTime\" desc) as \"rownum\",f.\"Id\",f.\"Name\",f.\"ApplyTo\",f.\"SideEffect\",e.\"Name\" as \"PrincipalName\",u.\"UserName\" as \"OperatorName\",f.\"IsEnable\",f.\"Remark\",f.\"CreateTime\" from \"T_Formula\" f join \"T_Employee\" e on e.\"Id\"=f.\"PrincipalId\" join \"T_User\" u on u.\"Id\"=f.\"OperatorId\"";

            return(GetRuledRowsData <Formula, FormulaFilter>(rowsCount, querySql, filter));
        }