protected void GetRepertori() { RegistroRepertorio[] rep = RegistriRepertorioUtils.GetRegisteredRegistries(this.IdAmministrazione.ToString()); if (rep != null && rep.Length > 0) { ddl_rep.Items.Clear(); ddl_rep.Items.Add(""); for (int i = 0; i < rep.Length; i++) { string descrizione = rep[i].TipologyDescription; ddl_rep.Items.Add(descrizione); ddl_rep.Items[i + 1].Value = rep[i].CounterId; } } }
protected void btn_stampaRepertori_Click1(object sender, EventArgs e) { try { RegistriRepertorioUtils.GeneratePrintRepertorio(UserManager.getRuolo(), UserManager.getInfoUtente(), ((Label)DataGrid2.SelectedItem.Cells[4].Controls[1]).Text, ((Label)DataGrid2.SelectedItem.Cells[3].Controls[1]).Text, ((Label)DataGrid2.SelectedItem.Cells[0].Controls[1]).Text); ClientScript.RegisterStartupScript(this.GetType(), "stampaRepertori", "alert('Stampa repertorio avvenuta con successo.');", true); } catch (Exception ex) { ClientScript.RegisterStartupScript(this.GetType(), "stampaRepertori", "alert('" + ex.Message.Replace("'", " ") + "');", true); } }
protected void btn_cambiaStato_Click1(object sender, EventArgs e) { try { int selected = DataGrid2.SelectedIndex; bool res = RegistriRepertorioUtils.ChangeRepertorioState(((Label)DataGrid2.SelectedItem.Cells[0].Controls[1]).Text, ((Label)DataGrid2.SelectedItem.Cells[3].Controls[1]).Text, ((Label)DataGrid2.SelectedItem.Cells[4].Controls[1]).Text, UserManager.getInfoAmmCorrente(UserManager.getInfoUtente(this).idAmministrazione).Codice); if (res) { BindGrid(); DataGrid2.SelectedIndex = selected; } } catch (Exception) { throw; } }
protected void Page_Load(object sender, EventArgs e) { string idGruppo = UserManager.getInfoUtente(this).idGruppo; repertori = RegistriRepertorioUtils.GetRegistriesWithAooOrRfSup(idGruppo, idGruppo); if (!Page.IsPostBack) { this.AddControlsClientAttribute(); this.setListaRepertori(); this.FillComboFilterTypes(); } if (GridManager.SelectedGrid == null || GridManager.SelectedGrid.GridType != GridTypeEnumeration.Document) { GridManager.SelectedGrid = GridManager.getUserGrid(GridTypeEnumeration.Document); } if (Request.QueryString["numRes"] != string.Empty && Request.QueryString["numRes"] != null) { this.numResult = Request.QueryString["numRes"]; } else { this.numResult = string.Empty; } this.InitRangeFilterItems(); this.EnableRangeFilterControls(this.cboFilterTypeNumRepertorio); this.EnableRangeFilterControls(this.cboFilterTypeDataStampa); this.tastoInvio(); schedaRicerca = (SchedaRicerca)Session[SchedaRicerca.SESSION_KEY]; if (schedaRicerca == null) { DocsPAWA.DocsPaWR.Utente userHome = (DocsPAWA.DocsPaWR.Utente)Session["userData"]; DocsPAWA.DocsPaWR.Ruolo userRuolo = (DocsPAWA.DocsPaWR.Ruolo)Session["userRuolo"]; schedaRicerca = new SchedaRicerca(KEY_SCHEDA_RICERCA, userHome, userRuolo, this); Session[SchedaRicerca.SESSION_KEY] = schedaRicerca; } schedaRicerca.Pagina = this; if (!Page.IsPostBack && schedaRicerca != null && schedaRicerca.FiltriRicerca != null) { PopulateField(schedaRicerca.FiltriRicerca); if (Ricerca()) { if (String.IsNullOrEmpty(ddl_repertori.SelectedValue)) { Response.Write("<script>alert('Selezionare un repertorio');top.principale.document.iFrame_dx.location='../blank_page.htm';</script>"); return; } string altro = string.Empty; if (!string.IsNullOrEmpty(this.numResult) && this.numResult.Equals("0")) { altro = "&noRic=1"; } DocumentManager.setFiltroRicDoc(this, qV); DocumentManager.removeDatagridDocumento(this); DocumentManager.removeListaNonDocProt(this); ClientScript.RegisterStartupScript(this.GetType(), "regresh_dx", "top.principale.iFrame_dx.document.location = 'NewTabSearchResult.aspx?from=StampaReg&tabRes=StampaReg" + altro + "';", true); } } }