private void fillDeleghe(string tipoDelega, string statoDelega) { SearchDelegaInfo searchInfo = new SearchDelegaInfo(); searchInfo.StatoDelega = statoDelega; searchInfo.TipoDelega = tipoDelega; this.searchDeleghe(searchInfo); }
private void searchDeleghe(SearchDelegaInfo searchInfo) { this.SearchDelegheMemento = searchInfo; SearchPagingContext pagingContext = new SearchPagingContext(); pagingContext.PageSize = this.gridViewResult.PageSize; pagingContext.Page = this.SelectedPage; this.ListaDeleghe = DelegheManager.SearchDeleghe(this, searchInfo, ref pagingContext); this.BindGridAndSelect(searchInfo.TipoDelega, searchInfo.StatoDelega); this.buildGridNavigator(pagingContext); }
public static DocsPaWR.InfoDelega[] SearchDeleghe(Page page, SearchDelegaInfo searchInfo, ref SearchPagingContext pagingContext) { DocsPaWR.InfoUtente infoUtente = null; if (searchInfo.TipoDelega != "tutte") { infoUtente = UserManager.GetInfoUser(); } DocsPaWR.InfoDelega[] deleghe = docsPaWS.DelegaSearch(infoUtente, searchInfo, ref pagingContext); //if (deleghe == null) //{ // throw new Exception(); //} return(deleghe); }
protected void MandateBtnSearch_Click(object sender, EventArgs e) { SearchDelegaInfo searchInfo = new SearchDelegaInfo(); InfoUtente infoUser = UserManager.GetInfoUser(); if (infoUser.delegato == null) { searchInfo.TipoDelega = this.TipoDelega; searchInfo.StatoDelega = this.MandateDdlState.SelectedValue; if ("assegnate".Equals(searchInfo.TipoDelega)) { searchInfo.NomeDelegato = this.TxtName.Text; searchInfo.IdRuoloDelegante = this.MandateDdlRole.SelectedValue; } else { searchInfo.NomeDelegante = this.TxtName.Text; } } else { this.TipoDelega = "esercizio"; this.MandateDdlState.Enabled = false; this.UpPnlState.Update(); this.TxtName.Enabled = false; this.UpNameDelegate.Update(); this.MandateDdlRole.Enabled = false; this.UpPnlRoleSelect.Update(); this.MandateLinkAssigned.Visible = false; this.UpnlTabHeader.Update(); searchInfo.TipoDelega = this.TipoDelega; searchInfo.StatoDelega = ""; } this.searchDeleghe(searchInfo); this.visualizza_pulsanti(); }
public static DocsPAWA.DocsPaWR.InfoDelega[] SearchDeleghe(Page page, SearchDelegaInfo searchInfo, ref SearchPagingContext pagingContext) { DocsPAWA.DocsPaWR.InfoDelega[] deleghe = null; try { DocsPAWA.DocsPaWR.InfoUtente infoUtente = null; if (searchInfo.TipoDelega != "tutte") { infoUtente = UserManager.getInfoUtente(page); } deleghe = docsPaWS.DelegaSearch(infoUtente, searchInfo, ref pagingContext); if (deleghe == null) { throw new Exception(); } return(deleghe); } catch (Exception es) { ErrorManager.redirect(page, es); } return(deleghe); }
public static List <InfoDelega> searchDeleghe(DocsPaVO.utente.InfoUtente infoUtente, SearchDelegaInfo searchInfo, SearchPagingContext pagingContext) { DocsPaDB.Query_DocsPAWS.Deleghe d = new DocsPaDB.Query_DocsPAWS.Deleghe(); if (string.IsNullOrEmpty(searchInfo.NomeDelegato) && string.IsNullOrEmpty(searchInfo.NomeDelegante)) { return(d.searchDeleghe(infoUtente, searchInfo, pagingContext)); } else { InfoDelegaMatcher matcher = new InfoDelegaMatcher(searchInfo); List <InfoDelega> temp = d.searchDeleghe(infoUtente, searchInfo).FindAll(matcher.Match); pagingContext.RecordCount = temp.Count; List <InfoDelega> result = new List <InfoDelega>(temp.Skip(pagingContext.StartRow - 1).Take(pagingContext.PageSize)); return(result); } }
private static bool TutteMatchDel(InfoDelega infoDelega, SearchDelegaInfo searchInfo) { return(ContainString(infoDelega.cod_utente_delegato, searchInfo.NomeDelegato) && ContainString(infoDelega.cod_utente_delegante, searchInfo.NomeDelegante)); }
public InfoDelegaMatcher(SearchDelegaInfo searchInfo) { this._searchInfo = searchInfo; }