public QueryResult QuerySecondDomain(SecondDomainQueryFilter queryFilter) { int totalCount; DataTable table = ObjectFactory <IVendorStoreQueryDA> .Instance.QuerySecondDomain(queryFilter, out totalCount); QueryResult result = new QueryResult() { Data = table, TotalCount = totalCount }; return(result); }
public void QuerySecondDomain(SecondDomainQueryVM model, int pageIndex, int pageSize, string sortField, EventHandler <RestClientEventArgs <dynamic> > callback) { SecondDomainQueryFilter filter = model.ConvertVM <SecondDomainQueryVM, SecondDomainQueryFilter>(); filter.PageInfo = new QueryFilter.Common.PagingInfo() { PageIndex = pageIndex, PageSize = pageSize, SortBy = sortField }; string relativeUrl = "/POService/VendorStore/QuerySecondDomain"; restClient.QueryDynamicData(relativeUrl, filter, callback); }
public DataTable QuerySecondDomain(SecondDomainQueryFilter filter, out int totalCount) { PagingInfoEntity pagingInfo = new PagingInfoEntity() { SortField = filter.PageInfo.SortBy, StartRowIndex = filter.PageInfo.PageIndex * filter.PageInfo.PageSize, MaximumRows = filter.PageInfo.PageSize }; CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("QuerySecondDomain"); using (DynamicQuerySqlBuilder builder = new DynamicQuerySqlBuilder(command.CommandText, command, pagingInfo, "v.[SysNo] DESC")) { builder.ConditionConstructor.AddInCondition(QueryConditionRelationType.AND, "v.SysNo", DbType.Int32, filter.VendorSysNoList); command.CommandText = builder.BuildQuerySql(); DataTable dt = command.ExecuteDataTable(); totalCount = Convert.ToInt32(command.GetParameterValue("@TotalCount")); return(dt); } }