Exemple #1
0
        private void DataGrid1_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
        {
            if (e.CommandName == "ShowInfo")
            {
                DocsPaWR.InfoDocumento newinfoDoc = null;
                if (e.Item.ItemIndex >= 0)
                {
                    string str_indexSel = ((Label)this.DataGrid1.Items[e.Item.ItemIndex].Cells[7].Controls[1]).Text;
                    int    indexSel     = Int32.Parse(str_indexSel);

                    this.infoDoc = RicercaDocumentiControllatiSessionMng.GetListaInfoDocumenti(this);

                    if (indexSel > -1)
                    {
                        newinfoDoc = (DocsPAWA.DocsPaWR.InfoDocumento) this.infoDoc[indexSel];
                    }

                    if (newinfoDoc != null)
                    {
                        DocumentManager.setRisultatoRicerca(this, newinfoDoc);
                        FascicoliManager.removeFascicoloSelezionato(this);
                        FascicoliManager.removeFolderSelezionato(this);
                        RicercaDocumentiControllatiSessionMng.ClearSessionData(this);
                        Response.Write("<script>window.open('../documento/gestionedoc.aspx?tab=protocollo','principale');</script>");
                        Response.Write("<script>window.close();</script>");
                    }
                }
            }
        }
Exemple #2
0
        private void LoadData(bool updateGrid)
        {
            ListaFiltri = DocumentManager.getFiltroRicDoc(this);
            DocsPaWR.Registro  regSel = UserManager.getRegistroSelezionato(this);
            SearchResultInfo[] idProfileList;
            //AL POSTO DELL'UNO IL NUMERO DELLA PAGINA
            infoDoc = FascicoliManager.getListaDocumentiPaging(this, this.Folder, currentPage, out numTotPage, out nRec, true, out idProfileList);

            this.DataGrid1.VirtualItemCount = nRec;
            this.DataGrid1.CurrentPageIndex = currentPage - 1;

            string[] idProfs = new string[idProfileList.Length];
            for (int i = 0; i < idProfileList.Length; i++)
            {
                idProfs[i] = idProfileList[i].Id;
            }
            RicercaDocumentiControllatiSessionMng.SetListaIdProfile(this, idProfs);
            RicercaDocumentiControllatiSessionMng.SetListaInfoDocumenti(this, infoDoc);

            if (infoDoc != null && infoDoc.Length > 0)
            {
                this.BindGrid(infoDoc);
            }
            else
            {
                //rendo invisibile il check per la selezione di tutti i checkbox
                this.chkSelectDeselectAll.Visible = false;
            }
        }
Exemple #3
0
        private void setDocInTrasm()
        {
            Session["Controllati"] = null;
            string[] idDocControllati = new string[hash_checked.Count];

            hash_checked = DocumentManager.getHash(this);

            if (hash_checked != null && hash_checked.Count > 0)
            {
                infoDoc = RicercaDocumentiControllatiSessionMng.GetListaInfoDocumenti(this);

                int i = 0;
                if (this.Folder != null && this.Folder.idFascicolo != "")
                {
                    foreach (DictionaryEntry de in hash_checked)
                    {
                        idDocControllati[i] = de.Value.ToString();
                        i++;
                    }
                }
                RicercaDocumentiControllatiSessionMng.ClearSessionData(this);

                Session["Controllati"] = idDocControllati;

                Response.Write("<script>window.close();</script>");
            }

            else
            {
                Response.Write("<script>alert('Selezionare almeno un documento da trasmettere');</script>");
            }
        }
Exemple #4
0
        /// <summary>
        /// Gestione selezione / deselezione di tutti i checkbox colonna associa
        /// </summary>
        /// <param name="value"></param>
        private void SelectAllCheck(bool value)
        {
            DataGridItemCollection gridItems = this.DataGrid1.Items;

            string[] IdProfiles = RicercaDocumentiControllatiSessionMng.GetListaIdProfile(this);
            if (IdProfiles != null)
            {
                ViewState["SelectDeselectAllChecked"] = value;

                // foreach (DataGridItem gridItem in gridItems)
                foreach (string infoD in IdProfiles)
                {
                    if (value)
                    {
                        if (!hash_checked.ContainsKey(infoD))
                        {
                            hash_checked.Add(infoD, infoD);
                        }
                    }
                    else
                    {
                        if (hash_checked.Contains(infoD))
                        {
                            hash_checked.Remove(infoD);
                        }
                    }
                }
                foreach (DataGridItem gridItem in gridItems)
                {
                    string   dataAnnull = ((Label)gridItem.Cells[5].Controls[1]).Text;
                    CheckBox checkBox   =
                        gridItem.Cells[0].Controls[0].FindControl("chkFascicola") as CheckBox;

                    //salto il settaggio del valore per i checkbox relativi a documenti annullati
                    if (checkBox != null && string.IsNullOrEmpty(dataAnnull))
                    {
                        checkBox.Checked = value;
                    }
                }
            }
        }