예제 #1
0
        private void UpdateReportSignature(MassiveOperationReport report)
        {
            if (report != null)
            {
                List <string> idDocumentSigned = new List <string>();
                string        idDocumento      = string.Empty;
                foreach (DataRow row in report.GetDataSet().Tables[0].Rows)
                {
                    idDocumento = row["ObjId"].ToString().Replace("P", "").Replace("C", "");
                    string oggetto = (from i in this.ListaElementiLibroFirma
                                      where i.InfoDocumento.Docnumber.Equals(idDocumento)
                                      select i.InfoDocumento.Oggetto).FirstOrDefault();
                    ReportSignatureSelected.AddReportRow(
                        oggetto,
                        ((MassiveOperationReport.MassiveOperationResultEnum)Enum.Parse(typeof(MassiveOperationReport.MassiveOperationResultEnum),
                                                                                       row["Result"].ToString())), row["Details"].ToString());

                    if (row["Result"].ToString().Equals(MassiveOperationReport.MassiveOperationResultEnum.OK.ToString()))
                    {
                        this.ListIdDocumentSigned.Add(idDocumento);
                    }
                }
            }
            else
            {
                foreach (string id in this.ListCheck.Keys)
                {
                    string oggetto = (from i in this.ListaElementiLibroFirma where i.InfoDocumento.Docnumber.Equals(id.Replace("P", "").Replace("C", "")) select i.InfoDocumento.Oggetto).FirstOrDefault();
                    ReportSignatureSelected.AddReportRow(
                        oggetto,
                        MassiveOperationReport.MassiveOperationResultEnum.KO,
                        "Firma annullata dall'utente");
                }
            }
        }
예제 #2
0
        private void DigitalSignatureSelectedItem()
        {
            //Per tutti i documenti lavorati aggiungo in area di lavoro
            if (AddElementiInADL && ListIdDocumentSigned.Count > 0)
            {
                this.AggiungiInADL(ListIdDocumentSigned);
            }

            HttpContext.Current.Session.Remove("ListIdDocumentSigned");
            // Introduzione della riga di summary
            if (ReportSignatureSelected.NotWorked == 0)
            {
                ScriptManager.RegisterClientScriptBlock(this.UpPnlButtons, this.UpPnlButtons.GetType(), "closeAJM", "parent.closeAjaxModal('SignatureSelectedItems','');", true);
                return;
            }

            string[] pars = new string[] { "" + ReportSignatureSelected.Worked, "" + ReportSignatureSelected.NotWorked };
            ReportSignatureSelected.AddSummaryRow("Documenti lavorati: {0} - Documenti non lavorati: {1}", pars);

            this.generateReport(ReportSignatureSelected, "Sottoscizione degli elementi selezionati");

            this.plcMessage.Attributes.Add("style", "display:none");
            this.UpPnlMessage.Update();
        }