public void LoadOfferList() { try { ICollection <AbstractSearch> searchCriteria = new List <AbstractSearch>(); AddCustomSearchCriterias(searchCriteria); List <OfferDataView> list = CostCalculationRef.GetAllOfferDataView(searchCriteria, GridViewSortExpression, GridViewSortDirection); LoadSearchResult(list); } catch (Exception ex) { BaseHelper.Log("Error in LoadPersonsList " + formResource.PagePath); BaseHelper.Log(ex.Message); BaseHelper.Log(ex.StackTrace); } }
protected void btnSearch_Click(object sender, EventArgs e) { try { ICollection <AbstractSearch> searchCriteria = new List <AbstractSearch>(); AddCustomSearchCriterias(searchCriteria); List <OfferDataView> list = CostCalculationRef.GetAllOfferDataView(searchCriteria, GridViewSortExpression, GridViewSortDirection); LoadSearchResult(list); this.pnlFilterData.Visible = false; } catch (Exception ex) { BaseHelper.Log("Error in btnSearch_Click " + formResource.PagePath); BaseHelper.Log(ex.Message); BaseHelper.Log(ex.StackTrace); } }
public override void FormLoad() { try { ICollection <AbstractSearch> searchCriteria = new List <AbstractSearch>(); AddCustomSearchCriterias(searchCriteria); if (string.IsNullOrEmpty(this.GridViewSortExpression) || this.GridViewSortExpression == Constants.INVALID_ID_STRING) { this.GridViewSortExpression = "OfferDate"; } List <OfferDataView> listOfferDataView = CostCalculationRef.GetAllOfferDataView(searchCriteria, GridViewSortExpression, GridViewSortDirection); //ако има права може да вижда всичко, ако няма права вижда тези, които е редактирал или създал if (!CheckUserActionPermission(ETEMEnums.SecuritySettings.ShowOfferFullList, false)) { listOfferDataView = listOfferDataView.Where(z => z.idCreateUser.Value == Convert.ToInt32(this.UserProps.IdUser) || z.idModifyUser == Convert.ToInt32(this.UserProps.IdUser)).ToList(); } this.gvOffer.DataSource = CostCalculationRef.GetAllOfferDataView(searchCriteria, GridViewSortExpression, GridViewSortDirection); if (NewPageIndex.HasValue) { this.gvOffer.PageIndex = NewPageIndex.Value; } this.gvOffer.DataBind(); } catch (Exception ex) { BaseHelper.Log("Error in FormLoad " + formResource.PagePath); BaseHelper.Log(ex.Message); BaseHelper.Log(ex.StackTrace); } }
public override void AlphabetClick(string alpha) { try { if (alpha == Constants.ALL_CHARACTERS) { List <AbstractSearch> searchCriteria = new List <AbstractSearch>(); List <OfferDataView> list = CostCalculationRef.GetAllOfferDataView(searchCriteria, GridViewSortExpression, GridViewSortDirection); ClearFilterForm(); LoadSearchResult(list); } else { ICollection <AbstractSearch> searchCriteria = new List <AbstractSearch>(); AddCustomSearchCriterias(searchCriteria); searchCriteria.Add(new TextSearch { Comparator = TextComparators.StartsWith, Property = "Customer", SearchTerm = alpha }); List <OfferDataView> list = CostCalculationRef.GetAllOfferDataView(searchCriteria, GridViewSortExpression, GridViewSortDirection); LoadSearchResult(list); } } catch (Exception ex) { BaseHelper.Log("Error in AlphabetClick " + formResource.PagePath); BaseHelper.Log(ex.Message); BaseHelper.Log(ex.StackTrace); } }