C# 클래스 FundraisingMenu.SearchServices.FundraisingMenuSearchServices

파일 보기 프로젝트 열기: tnc-css/fundraising-menu 1 사용 예제들

공개 메소드들

메소드 설명
EvaluateOrderBy ( int colId, List columns ) : object>.Func

Get a function to pass into a LINQ OrderBy clause. The column sorting parameter is an index that gives the index of the column to sort by in display order. The list of columns is also in display order. So, we have to get the name of the column to sort by looking it up in the list of columns at the specified sort column index. Then, we can look up the attribute by name in the dataMap and return a lambda expression.

GetAllFundraisingMenuProjects ( ) : DataTableResult

Retrieves all Hub projects with the Fundraising Flag set to true.

SearchSortAndFilter ( DataTableParameters query ) : DataTableResult
StringOrEmpty ( string s ) : string

비공개 메소드들

메소드 설명
AddVirtualProjects ( List list ) : void

Add "virtual" projects for any packages that don't have any associated projects. The search capability is data driven by *projects* and all package information is derived from projects. Therefore to show a package with no associated projects, we need to add at least one project record that corresponds to each package. This function accomplishes that. This is an ugly solution to the problem, but I considered many alternatives and they were all uglier or required a huge rework of how the page works. Since we're not sure exactly how this is all going to shake out anyway, this seemed like the most cost-effective solution for now.

ExpandByPackage ( List list ) : List

Duplicate records by package entry. This ensures we will see one project entry per package relationship and that every package is displayed on the front end.

GetProjectPackageDto ( int hubId, Package r, bool hasProjects ) : ProjectPackageDto
GetResult ( CihProject cihProject ) : FundraisingMenuResult

Retrieve the Project and its related Package data needed for a result row for the specified Project.

OrderProjectRecords ( List allProjects, DataTableParameters parameters ) : List

Order menu records. This function always orders first by package.

PageResults ( DataTableParameters query, List data ) : List

We need to use a more advanced paging strategy because there are virtual records that will not be displayed in the table. So instead of using the start and length arguments from the query as a hard Skip/Take boundary, we need to count how many virtual records preceeded the current page and we need to take records up to the query length, but excluding virtual records from the count.

RecordMatch ( FundraisingMenuResult r, DataTableParameters query ) : bool

메소드 상세

EvaluateOrderBy() 공개 메소드

Get a function to pass into a LINQ OrderBy clause. The column sorting parameter is an index that gives the index of the column to sort by in display order. The list of columns is also in display order. So, we have to get the name of the column to sort by looking it up in the list of columns at the specified sort column index. Then, we can look up the attribute by name in the dataMap and return a lambda expression.
public EvaluateOrderBy ( int colId, List columns ) : object>.Func
colId int The display-ordered index of the sorted column
columns List The display-ordered list of columns
리턴 object>.Func

GetAllFundraisingMenuProjects() 공개 메소드

Retrieves all Hub projects with the Fundraising Flag set to true.
public GetAllFundraisingMenuProjects ( ) : DataTableResult
리턴 DataTableResult

SearchSortAndFilter() 공개 메소드

public SearchSortAndFilter ( DataTableParameters query ) : DataTableResult
query FundraisingMenu.Integration.DataTableParameters
리턴 DataTableResult

StringOrEmpty() 공개 정적인 메소드

public static StringOrEmpty ( string s ) : string
s string
리턴 string