| | |
| | | using System.Linq.Expressions; |
| | | using System.Reflection; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.Const; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_Core.Utilities; |
| | | using static OfficeOpenXml.ExcelErrorValue; |
| | | |
| | | namespace WIDESEAWCS_Core.BaseServices |
| | | { |
| | |
| | | |
| | | return pageGridData; |
| | | } |
| | | |
| | | |
| | | protected string ValidatePageOptions(PageDataOptions options) |
| | | { |
| | |
| | | LinqExpressionType expressionType = searchParametersList[i].DisplayType.GetLinqCondition(); |
| | | if (expressionType == LinqExpressionType.Equal) |
| | | { |
| | | where += $"{searchParametersList[i].Name} = '{results[j].Item3}'"; |
| | | where += $"{searchParametersList[i].Name} {HtmlElementType.Equal} '{results[j].Item3}'"; |
| | | } |
| | | else if (expressionType == LinqExpressionType.ThanOrEqual) |
| | | { |
| | | where += $"{searchParametersList[i].Name} {HtmlElementType.ThanOrEqual} '{searchParametersList[i].Value}'"; |
| | | } |
| | | else if (expressionType == LinqExpressionType.LessThanOrEqual) |
| | | { |
| | | where += $"{searchParametersList[i].Name} {HtmlElementType.LessOrEqual} '{searchParametersList[i].Value}'"; |
| | | } |
| | | else if (expressionType == LinqExpressionType.GreaterThan) |
| | | { |
| | | where += $"{searchParametersList[i].Name} {HtmlElementType.GT} '{searchParametersList[i].Value}'"; |
| | | } |
| | | else if (expressionType == LinqExpressionType.LessThan) |
| | | { |
| | | where += $"{searchParametersList[i].Name} {HtmlElementType.LT} '{searchParametersList[i].Value}'"; |
| | | } |
| | | else |
| | | { |
| | |
| | | /// <param name="pageData"></param> |
| | | /// <param name="propertyInfo"></param> |
| | | /// <returns></returns> |
| | | private Dictionary<string, OrderByType> GetPageDataSort(PageDataOptions pageData, PropertyInfo[] propertyInfo) |
| | | protected Dictionary<string, OrderByType> GetPageDataSort(PageDataOptions pageData, PropertyInfo[] propertyInfo) |
| | | { |
| | | if (!string.IsNullOrEmpty(pageData.Sort)) |
| | | { |