public void NewFilter() { MinDia = MinDist = 0.0; MaxDia = 1000; MaxDist = 10; QueryBuilder = _repo.GetNewQueryBuilder(); }
public void BtnDefSortClick() { EnableFltGroup(false); var qbld = _repo.GetNewQueryBuilder(); if (_view.DiameterMaxInKm.HasValue) { qbld.MaxDiameterInKm = _view.DiameterMaxInKm.Value; } if (_view.DiameterMinInKm.HasValue) { qbld.MinDiameterInKm = _view.DiameterMinInKm.Value; } if (_view.OrbitSunRadiusMaxInAU.HasValue) { qbld.MaxDistanceSunInAU = _view.OrbitSunRadiusMaxInAU.Value; } if (_view.OrbitSunRadiusMinInAU.HasValue) { qbld.MinDistanceSunInAU = _view.OrbitSunRadiusMinInAU.Value; } sbld = qbld.GetSortOrderBuilder(); EnableSortGroup(true); }
// GET: /<controller>/ public IActionResult Index(int skip = 0, string minDia = "", string maxDia = "", string minDst = "", string maxDst = "", string sortDia = "", string sortDst = "") { var qbld = repo.GetNewQueryBuilder(); SetRestrictionDbl(qbld, (q, v) => q.MinDiameterInKm = v, minDia); SetRestrictionDbl(qbld, (q, v) => q.MaxDiameterInKm = v, maxDia); SetRestrictionDbl(qbld, (q, v) => q.MinDistanceSunInAU = v, minDst); SetRestrictionDbl(qbld, (q, v) => q.MaxDistanceSunInAU = v, maxDst); var sbld = qbld.GetSortOrderBuilder(); SetSort(sbld, (s, v) => s.OrderByDiameterAsc = v, sortDia); SetSort(sbld, (s, v) => s.OrderByDistanceSunInAU = v, sortDst); var fss = sbld.GetFilteredSortedSet(); return(View(new Models.FilterSort.Index() { fss = fss, SKIP = skip, minDia = minDia, maxDia = maxDia, minDst = minDst, maxDst = maxDst })); }