protected void DrawTable(System.Web.UI.WebControls.Table tbl, DocsPAWA.DocsPaWR.TrasmissioneSingola trasmSing, int h) { //sto solo visualizzando le trasmissioni singole e utente this.DrawHeaderTrasmSing(tbl); DrawRowTxVisual(tbl, trasmSing, h); }
private DocsPAWA.DocsPaWR.Trasmissione addTrasmissioneSingola(DocsPAWA.DocsPaWR.Trasmissione trasmissione, DocsPAWA.DocsPaWR.Corrispondente corr) { if (trasmissione.trasmissioniSingole != null) { // controllo se esiste la trasmissione singola associata a corrispondente selezionato for (int i = 0; i < trasmissione.trasmissioniSingole.Length; i++) { DocsPaWR.TrasmissioneSingola ts = (DocsPAWA.DocsPaWR.TrasmissioneSingola)trasmissione.trasmissioniSingole[i]; if (ts.corrispondenteInterno.systemId.Equals(corr.systemId)) { if (ts.daEliminare) { ((DocsPAWA.DocsPaWR.TrasmissioneSingola)trasmissione.trasmissioniSingole[i]).daEliminare = false; return(trasmissione); } else { return(trasmissione); } } } } // Aggiungo la trasmissione singola DocsPaWR.TrasmissioneSingola trasmissioneSingola = new DocsPAWA.DocsPaWR.TrasmissioneSingola(); trasmissioneSingola.tipoTrasm = "S"; trasmissioneSingola.corrispondenteInterno = corr; trasmissioneSingola.ragione = TrasmManager.getRagioneSel(this); // Aggiungo la lista di trasmissioniUtente if (corr.GetType() == typeof(DocsPAWA.DocsPaWR.Ruolo)) { trasmissioneSingola.tipoDest = DocsPAWA.DocsPaWR.TrasmissioneTipoDestinatario.RUOLO; DocsPaWR.Corrispondente[] listaUtenti = queryUtenti(corr.codiceRubrica); if (listaUtenti == null || listaUtenti.Length == 0) { return(trasmissione); } //ciclo per utenti se dest è gruppo o ruolo for (int i = 0; i < listaUtenti.Length; i++) { DocsPaWR.TrasmissioneUtente trasmissioneUtente = new DocsPAWA.DocsPaWR.TrasmissioneUtente(); trasmissioneUtente.utente = (DocsPAWA.DocsPaWR.Utente)listaUtenti[i]; if (TrasmManager.getRagioneSel(this).descrizione.Equals("RISPOSTA")) { trasmissioneUtente.idTrasmRispSing = trasmissioneSingola.systemId; } trasmissioneSingola.trasmissioneUtente = TrasmManager.addTrasmissioneUtente(trasmissioneSingola.trasmissioneUtente, trasmissioneUtente); } } else { trasmissioneSingola.tipoDest = DocsPAWA.DocsPaWR.TrasmissioneTipoDestinatario.UTENTE; DocsPaWR.TrasmissioneUtente trasmissioneUtente = new DocsPAWA.DocsPaWR.TrasmissioneUtente(); trasmissioneUtente.utente = (DocsPAWA.DocsPaWR.Utente)corr; trasmissioneSingola.trasmissioneUtente = TrasmManager.addTrasmissioneUtente(trasmissioneSingola.trasmissioneUtente, trasmissioneUtente); } trasmissione.trasmissioniSingole = TrasmManager.addTrasmissioneSingola(trasmissione.trasmissioniSingole, trasmissioneSingola); return(trasmissione); }
protected void CaricaDataGrid(DocsPAWA.DocsPaWR.Trasmissione trasm, int index) { try { DocsPaWR.TrasmissioneSingola trasmSing = new DocsPAWA.DocsPaWR.TrasmissioneSingola(); DocsPaWR.TrasmissioneUtente trasmUtente = new DocsPAWA.DocsPaWR.TrasmissioneUtente(); DocsPaWR.TrasmissioneSingola[] listaTrasmSing; listaTrasmSing = trasm.trasmissioniSingole; string ragione = ""; string dataScad = ""; string oggetto = ""; string segnatura = ""; if (listaTrasmSing.Length > 0) { trasmSing = (DocsPAWA.DocsPaWR.TrasmissioneSingola)listaTrasmSing[0]; ragione = trasmSing.ragione.descrizione; dataScad = trasmSing.dataScadenza; // riempio il campo oggetto // per doc. grigia - oggetto + data // per doc. protocollata - oggetto + segnatura // if(schedaDocumento.protocollo == null) // segnatura = schedaDocumento.dataCreazione; // else if (trasm.infoDocumento != null) { if ((trasm.infoDocumento.numProt != null) && (!trasm.infoDocumento.numProt.Equals(""))) { segnatura = trasm.infoDocumento.segnatura; } else { segnatura = trasm.infoDocumento.dataApertura; } oggetto = trasm.infoDocumento.oggetto; } this.dataSetTrasmXRisp1.element1.Addelement1Row(trasm.dataInvio, trasm.utente.descrizione, trasm.ruolo.descrizione, ragione, dataScad, oggetto, index, segnatura); } } catch (Exception ex) { ErrorManager.redirect(this, ex); } }
private DocsPAWA.DocsPaWR.Trasmissione addTrasmissioneSingola(DocsPAWA.DocsPaWR.Trasmissione trasmissione, DocsPAWA.DocsPaWR.Trasmissione trasmOrig) { DocsPaWR.Corrispondente corr; corr = trasmOrig.ruolo; if (trasmissione.trasmissioniSingole != null) { for (int i = 0; i < trasmissione.trasmissioniSingole.Length; i++) { //il ruolo della trasmissione a cui sto rispondendo diventa il destinatario della trasmissione risposta DocsPaWR.TrasmissioneSingola ts = (DocsPAWA.DocsPaWR.TrasmissioneSingola)trasmissione.trasmissioniSingole[i]; if (!ts.daEliminare && ts.corrispondenteInterno.systemId.Equals(corr.systemId)) { return(trasmissione); } } } // Aggiungo la trasmissione singola DocsPaWR.TrasmissioneSingola trasmissioneSingola = new DocsPAWA.DocsPaWR.TrasmissioneSingola(); trasmissioneSingola.tipoTrasm = "S"; trasmissioneSingola.corrispondenteInterno = corr; trasmissioneSingola.tipoDest = DocsPAWA.DocsPaWR.TrasmissioneTipoDestinatario.RUOLO; trasmissioneSingola.ragione = TrasmManager.getRagioneSel(this); trasmissioneSingola.idTrasmUtente = getIdTrasmUtente(trasmOrig); //id della trasmissione utente alla quale si sta rispondendo DocsPaWR.TrasmissioneUtente trasmissioneUtente = new DocsPAWA.DocsPaWR.TrasmissioneUtente(); trasmissioneUtente.utente = trasmOrig.utente; trasmissioneSingola.trasmissioneUtente = new DocsPAWA.DocsPaWR.TrasmissioneUtente[1]; trasmissioneSingola.trasmissioneUtente[0] = trasmissioneUtente; trasmissione.trasmissioniSingole = Utils.addToArrayTrasmissioneSingola(trasmissione.trasmissioniSingole, trasmissioneSingola); return(trasmissione); }
protected void DrawRowTxVisual(System.Web.UI.WebControls.Table tbl, DocsPAWA.DocsPaWR.TrasmissioneSingola trasmSing, int f) { try { TableRow tr = new TableRow(); tr.CssClass = "bg_grigioN"; TableCell tc = new TableCell(); //Destinatario tc = new TableCell(); tc.Text = formatBlankValue(trasmSing.corrispondenteInterno.descrizione); tc.Width = Unit.Percentage(17); tr.Cells.Add(tc); // Ragione tc = new TableCell(); tc.Text = formatBlankValue(trasmSing.ragione.descrizione); tc.Height = Unit.Pixel(15); tc.ColumnSpan = 2; tc.Width = Unit.Percentage(24); tr.Cells.Add(tc); //Tipo c'è solo per trasmSing indirizzate a Ruoli tc = new TableCell(); tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(12); //if (trasmSing.ragione.tipo.Equals("W")) //{ if (trasmSing.tipoTrasm.Equals("T")) { tc.Text = "TUTTI"; } else { if (trasmSing.tipoTrasm.Equals("S")) { tc.Text = "UNO"; } else { tc.Text = formatBlankValue(null); } } //} tr.Cells.Add(tc); //Note Individuali tc = new TableCell(); bool isOwnerTrasmissione = this.CheckTrasmEffettuataDaUtenteCorrente(); bool canViewDettTrasmSingola = false; // visualizzazione del testo relativo alla nota singola // solamente se l'utente che ha effettuato la trasmissione // sia lo stesso di quello correntemente connesso if (isOwnerTrasmissione) { tc.Text = formatBlankValue(trasmSing.noteSingole); } else { tc.Text = new string('-', 15); } tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(25); tr.Cells.Add(tc); //DATA SCAD. tc = new TableCell(); tc.Text = formatBlankValue(trasmSing.dataScadenza); tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(12); tr.Cells.Add(tc); tbl.Rows.Add(tr); //************************************************************************ //************ROW TRASM UTENTE******************************************** //************************************************************************ if (trasmSing.trasmissioneUtente != null) { DrawHeaderTrasmUt(tbl); for (int i = 0; i < trasmSing.trasmissioneUtente.Length; i++) { DocsPaWR.TrasmissioneUtente TrasmUt = (DocsPAWA.DocsPaWR.TrasmissioneUtente)trasmSing.trasmissioneUtente[i]; //Cella Bianca tr = new TableRow(); tc = new TableCell(); //Utente tc = new TableCell(); if (TrasmUt.valida != null && TrasmUt.valida.Equals("1")) { tr.CssClass = "testo_grigio"; } else { tr.CssClass = "testo_grigio_light"; } tc.BackColor = Color.FromArgb(242, 242, 242); string descrizioneUtente = TrasmUt.utente.descrizione; tc.Text = formatBlankValue(descrizioneUtente); tc.Width = Unit.Percentage(17); tr.Cells.Add(tc); //Data Vista tc = new TableCell(); tc.HorizontalAlign = HorizontalAlign.Center; tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); if (!string.IsNullOrEmpty(TrasmUt.dataVista) && (string.IsNullOrEmpty(TrasmUt.cha_vista_delegato) || TrasmUt.cha_vista_delegato.Equals("0"))) { tc.Text = formatBlankValue(TrasmUt.dataVista); } else { tc.Text = formatBlankValue(null); } tc.Width = Unit.Percentage(12); tr.Cells.Add(tc); //Data Acc. //Tipo c'è solo per determinate ragioni tc = new TableCell(); tc.HorizontalAlign = HorizontalAlign.Center; tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); string textDataAcc; if (!string.IsNullOrEmpty(TrasmUt.dataAccettata) && (string.IsNullOrEmpty(TrasmUt.cha_accettata_delegato) || TrasmUt.cha_accettata_delegato.Equals("0"))) { textDataAcc = formatBlankValue(TrasmUt.dataAccettata); //if (TrasmUt.cha_accettata_delegato.Equals("1")) // textDataAcc += "<br>(" + TrasmUt.idPeopleDelegato + ")"; } else { textDataAcc = formatBlankValue(null); } tc.Text = textDataAcc; tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(12); tr.Cells.Add(tc); //Data Rif. tc = new TableCell(); tc.HorizontalAlign = HorizontalAlign.Center; tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); string textDataRif = "";; if (!string.IsNullOrEmpty(TrasmUt.dataRifiutata) && (string.IsNullOrEmpty(TrasmUt.cha_rifiutata_delegato) || TrasmUt.cha_rifiutata_delegato.Equals("0"))) { textDataRif = formatBlankValue(TrasmUt.dataRifiutata); //if (TrasmUt.cha_rifiutata_delegato.Equals("1")) // textDataRif += "<br>(" + TrasmUt.idPeopleDelegato + ")"; } else { textDataRif = formatBlankValue(null); } tc.Text = textDataRif; tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(12); tr.Cells.Add(tc); //Info Acc. / Info Rif. tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); // viene verificato se l'utente corrente // può visualizzare i dettagli (note rifiuto e note accettazione) // della trasmissione singola: // - ha pieni diritti di visualizzazione // se è l'utente che ha creato la trasmissione; // - altrimenti viene verificato se l'utente corrente è lo stesso // che ha ricevuto la trasmissione (e quindi l'ha accettata) canViewDettTrasmSingola = (isOwnerTrasmissione); if (!canViewDettTrasmSingola) { canViewDettTrasmSingola = this.CheckTrasmUtenteCorrente(TrasmUt); } if (!canViewDettTrasmSingola) { tc.Text = new string('-', 15); } else { if (!string.IsNullOrEmpty(TrasmUt.dataAccettata) && (string.IsNullOrEmpty(TrasmUt.cha_accettata_delegato) || TrasmUt.cha_accettata_delegato.Equals("0"))) { tc.Text = formatBlankValue(TrasmUt.noteAccettazione); } else if (!string.IsNullOrEmpty(TrasmUt.dataRifiutata) && (string.IsNullOrEmpty(TrasmUt.cha_rifiutata_delegato) || TrasmUt.cha_rifiutata_delegato.Equals("0"))) { tc.Text = formatBlankValue(TrasmUt.noteRifiuto); } else { tc.Text = formatBlankValue(null); } } tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(25); tr.Cells.Add(tc); //Data Risp. è un link che porta al documento tc = new TableCell(); tc.HorizontalAlign = HorizontalAlign.Center; tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); //creo obj-aspx Hyperlink if (trasmSing.ragione.descrizione.Equals("RISPOSTA")) { tc.Text = formatBlankValue(null); } else { tc.Text = formatBlankValue(null); } tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(12); tr.Cells.Add(tc); tbl.Rows.Add(tr); //RIGA IN CASO DI DELEGA if (!string.IsNullOrEmpty(TrasmUt.idPeopleDelegato) && (TrasmUt.cha_accettata_delegato == "1" || TrasmUt.cha_rifiutata_delegato == "1" || TrasmUt.cha_vista_delegato == "1") && (!string.IsNullOrEmpty(TrasmUt.dataVista) || !string.IsNullOrEmpty(TrasmUt.dataAccettata) || !string.IsNullOrEmpty(TrasmUt.dataRifiutata))) { //Cella Bianca tr = new TableRow(); //Utente tc = new TableCell(); tr.CssClass = "testo_grigio_light"; tc.BackColor = Color.FromArgb(242, 242, 242); descrizioneUtente = TrasmUt.idPeopleDelegato + "<br>(Delegato da " + TrasmUt.utente.descrizione + ")"; tc.Text = formatBlankValue(descrizioneUtente); tc.Width = Unit.Percentage(17); tr.Cells.Add(tc); //Data Vista tc = new TableCell(); tc.HorizontalAlign = HorizontalAlign.Center; tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); if (!string.IsNullOrEmpty(TrasmUt.dataVista) && TrasmUt.cha_vista_delegato.Equals("1")) { tc.Text = formatBlankValue(TrasmUt.dataVista); } else { tc.Text = formatBlankValue(null); } tc.Width = Unit.Percentage(12); tr.Cells.Add(tc); //Data Acc. tc = new TableCell(); tc.HorizontalAlign = HorizontalAlign.Center; tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); if (TrasmUt.cha_accettata_delegato.Equals("1")) { textDataAcc = formatBlankValue(TrasmUt.dataAccettata); } else { textDataAcc = formatBlankValue(null); } tc.Text = textDataAcc; tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(12); tr.Cells.Add(tc); //Data Rif. tc = new TableCell(); tc.HorizontalAlign = HorizontalAlign.Center; tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); textDataRif = formatBlankValue(TrasmUt.dataRifiutata); if (TrasmUt.cha_rifiutata_delegato.Equals("1")) { textDataRif = formatBlankValue(TrasmUt.dataRifiutata); } else { textDataRif = formatBlankValue(null); } tc.Text = textDataRif; tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(12); tr.Cells.Add(tc); //Info Acc. / Info Rif. tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); if (!string.IsNullOrEmpty(TrasmUt.dataAccettata) && TrasmUt.cha_accettata_delegato.Equals("1")) { tc.Text = formatBlankValue(TrasmUt.noteAccettazione); } else if (!string.IsNullOrEmpty(TrasmUt.dataRifiutata) && TrasmUt.cha_rifiutata_delegato.Equals("1")) { tc.Text = formatBlankValue(TrasmUt.noteRifiuto); } else { tc.Text = formatBlankValue(null); } //tc.Text = formatBlankValue(null); tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(25); tr.Cells.Add(tc); //Data Risp. è un link che porta al documento tc = new TableCell(); tc.HorizontalAlign = HorizontalAlign.Center; tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); tc.Text = formatBlankValue(null); tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(12); tr.Cells.Add(tc); tbl.Rows.Add(tr); } } //fine row utente //riga rossa tr = new TableRow(); tc = new TableCell(); tc.ColumnSpan = 6; tr.CssClass = "bg_grigioS"; tc.Width = Unit.Percentage(100); tc.Height = Unit.Pixel(10); tr.Cells.Add(tc); tbl.Rows.Add(tr); } else { //riga rossa tr = new TableRow(); tc = new TableCell(); tc.ColumnSpan = 6; tr.CssClass = "bg_grigioS"; tc.Width = Unit.Percentage(100); tc.Height = Unit.Pixel(10); tr.Cells.Add(tc); tr.Cells.Add(tc); tbl.Rows.Add(tr); } } catch (System.Web.Services.Protocols.SoapException es) { ErrorManager.redirect(this, es); } }
protected void drawTableDettagli(DocsPAWA.DocsPaWR.Trasmissione trasmRic) { //proprietà tabella this.tbl_trasmRic.CssClass = "testo_grigio"; this.tbl_trasmRic.CellPadding = 1; this.tbl_trasmRic.CellSpacing = 1; this.tbl_trasmRic.BorderWidth = 1; this.tbl_trasmRic.BackColor = Color.FromArgb(255, 255, 255); //Instanzio l'oggetto trasmissione singola e trasmissione utente DocsPaWR.TrasmissioneSingola trasmSing = new DocsPAWA.DocsPaWR.TrasmissioneSingola(); DocsPaWR.TrasmissioneUtente trasmUtente = new DocsPAWA.DocsPaWR.TrasmissioneUtente(); DocsPaWR.TrasmissioneSingola[] listaTrasmSing; DocsPaWR.TrasmissioneUtente[] listaTrasmUtente; listaTrasmSing = trasmRic.trasmissioniSingole; if (listaTrasmSing.Length > 0) { trasmSing = (DocsPAWA.DocsPaWR.TrasmissioneSingola)listaTrasmSing[0]; listaTrasmUtente = trasmSing.trasmissioneUtente; if (listaTrasmUtente.Length > 0) { trasmUtente = (DocsPAWA.DocsPaWR.TrasmissioneUtente)trasmSing.trasmissioneUtente[0]; } } //crea tr e td TableRow triga = new TableRow(); TableCell tcell = new TableCell(); string txt_val; //1 - 2 RIGA CON LE NOTE triga = new TableRow(); triga.Height = 15; triga.BackColor = Color.FromArgb(149, 149, 149); //testo note generali tcell = new TableCell(); tcell.CssClass = "menu_1_bianco"; tcell.Width = Unit.Percentage(20); tcell.Text = "Note generali"; triga.Cells.Add(tcell); //val note generali tcell = new TableCell(); tcell.CssClass = "testo_grigio"; tcell.BackColor = Color.FromArgb(242, 242, 242); tcell.Width = Unit.Percentage(80); tcell.ColumnSpan = 3; tcell.Text = trasmRic.noteGenerali; triga.Cells.Add(tcell); this.tbl_trasmRic.Rows.Add(triga); triga = new TableRow(); triga.Height = 15; triga.BackColor = Color.FromArgb(149, 149, 149); //testo note individuali tcell = new TableCell(); tcell.CssClass = "menu_1_bianco"; tcell.Width = Unit.Percentage(20); tcell.Text = "Note individuali"; triga.Cells.Add(tcell); //val note individuali tcell = new TableCell(); tcell.CssClass = "testo_grigio"; tcell.BackColor = Color.FromArgb(242, 242, 242); tcell.Width = Unit.Percentage(80); tcell.ColumnSpan = 3; txt_val = trasmSing.noteSingole; if (!(txt_val != null && !txt_val.Equals(""))) { txt_val = ""; } tcell.Text = null; triga.Cells.Add(tcell); this.tbl_trasmRic.Rows.Add(triga); //3 RIGA DESTINATARIO triga = new TableRow(); triga.Height = 15; triga.BackColor = Color.FromArgb(149, 149, 149); //testo destinatario tcell = new TableCell(); tcell.CssClass = "menu_1_bianco"; tcell.Width = Unit.Percentage(20); tcell.Text = "Destinatario"; triga.Cells.Add(tcell); //val destinatario tcell = new TableCell(); tcell.CssClass = "testo_grigio"; tcell.BackColor = Color.FromArgb(242, 242, 242); tcell.Width = Unit.Percentage(80); tcell.ColumnSpan = 3; txt_val = trasmSing.corrispondenteInterno.descrizione; if (!(txt_val != null && !txt_val.Equals(""))) { txt_val = ""; } tcell.Text = txt_val; triga.Cells.Add(tcell); //4° RIGA DATA VISTA - DATA RISPOSTA triga = new TableRow(); triga.Height = 15; triga.BackColor = Color.FromArgb(149, 149, 149); //testo data vista tcell = new TableCell(); tcell.CssClass = "menu_1_bianco"; tcell.Width = Unit.Percentage(20); tcell.Text = "Data Vista"; triga.Cells.Add(tcell); //val data vista tcell = new TableCell(); tcell.CssClass = "testo_grigio"; tcell.BackColor = Color.FromArgb(242, 242, 242); tcell.Width = Unit.Percentage(20); txt_val = trasmUtente.dataVista; // if (!(txt_val != null && !txt_val.Equals(""))) txt_val = "xx/xx/xxxx"; tcell.Text = txt_val; triga.Cells.Add(tcell); //testo data risposta tcell = new TableCell(); tcell.CssClass = "menu_1_bianco"; tcell.Width = Unit.Percentage(20); tcell.Text = "Data Risposta"; triga.Cells.Add(tcell); //val data risposta tcell = new TableCell(); tcell.CssClass = "testo_grigio"; tcell.BackColor = Color.FromArgb(242, 242, 242); tcell.Width = Unit.Percentage(20); txt_val = trasmUtente.dataRisposta; //da correggere // if (!(txt_val != null && !txt_val.Equals(""))) txt_val = "xx/xx/xxxx"; tcell.Text = txt_val; triga.Cells.Add(tcell); this.tbl_trasmRic.Rows.Add(triga); //5° RIGA - DATA ACCETTAZ - DATA RIFIUTO triga = new TableRow(); triga.Height = 15; triga.BackColor = Color.FromArgb(149, 149, 149); //val data accettazione tcell = new TableCell(); tcell.CssClass = "menu_1_bianco"; tcell.Width = Unit.Percentage(15); tcell.Text = "Data Acc"; triga.Cells.Add(tcell); //testo data accettazione tcell = new TableCell(); tcell.CssClass = "testo_grigio"; tcell.BackColor = Color.FromArgb(242, 242, 242); tcell.Width = Unit.Percentage(20); txt_val = trasmUtente.dataAccettata; // if (!(txt_val != null && !txt_val.Equals(""))) txt_val = "xx/xx/xxxx"; tcell.Text = txt_val; triga.Cells.Add(tcell); //val data rifiuto tcell = new TableCell(); tcell.CssClass = "menu_1_bianco"; tcell.Width = Unit.Percentage(20); tcell.Text = "Data Rif"; triga.Cells.Add(tcell); //testo data rifiuto tcell = new TableCell(); tcell.CssClass = "testo_grigio"; tcell.BackColor = Color.FromArgb(242, 242, 242); tcell.Width = Unit.Percentage(20); txt_val = trasmUtente.dataRifiutata; // if (!(txt_val != null && !txt_val.Equals(""))) txt_val = "xx/xx/xxxx"; tcell.Text = txt_val; triga.Cells.Add(tcell); this.tbl_trasmRic.Rows.Add(triga); //6° RIGA - NOTE ACC/RIF triga = new TableRow(); triga.Height = 15; triga.BackColor = Color.FromArgb(149, 149, 149); //testo note acc/rif tcell = new TableCell(); tcell.CssClass = "menu_1_bianco"; tcell.Width = Unit.Percentage(20); tcell.Text = "Note Acc/Rif"; triga.Cells.Add(tcell); //val note acc/rif tcell = new TableCell(); tcell.CssClass = "testo_grigio"; tcell.BackColor = Color.FromArgb(242, 242, 242); tcell.Width = Unit.Percentage(80); tcell.ColumnSpan = 3; if (trasmUtente.dataRifiutata != null && !trasmUtente.dataRifiutata.Equals("")) { tcell.Text = trasmUtente.noteRifiuto; } else if (trasmUtente.dataAccettata != null && !trasmUtente.dataAccettata.Equals("")) { tcell.Text = trasmUtente.noteAccettazione; } triga.Cells.Add(tcell); this.tbl_trasmRic.Rows.Add(triga); }
protected void drawRowTxVisual(System.Web.UI.WebControls.Table tbl, DocsPAWA.DocsPaWR.TrasmissioneSingola trasmSing, int f) { try { //Cell Black TableRow tr = new TableRow(); TableCell tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(217, 217, 217); tc.Text = " "; tc.Width = Unit.Percentage(5); //Destinatario tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(217, 217, 217); tc.Text = trasmSing.corrispondenteInterno.descrizione; // è vuoto; tc.ColumnSpan = 2; tc.Width = Unit.Percentage(20); tr.Cells.Add(tc); // Ragione tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.Text = trasmSing.ragione.descrizione; tc.BackColor = Color.FromArgb(217, 217, 217); tc.Height = Unit.Pixel(20); tc.Width = Unit.Percentage(20); tc.ColumnSpan = 2; // tc.Controls.Add(ddl_Ragione); tr.Cells.Add(tc); //Tipo c'è solo per trasmSing indirizzate a Ruoli tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(217, 217, 217); tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(10); if (trasmSing.tipoTrasm.Equals("T")) { tc.Text = "TUTTI"; } else if (trasmSing.tipoTrasm.Equals("S")) { tc.Text = "UNO"; } else { tc.Text = " "; } // tc.Controls.Add(ddl_Tipo); tr.Cells.Add(tc); //Note Individuali tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(217, 217, 217); tc.Text = trasmSing.noteSingole; tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(30); tr.Cells.Add(tc); //DATA SCAD. tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(217, 217, 217); tc.Text = trasmSing.dataScadenza; //tc.ColumnSpan=2; tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(10); tr.Cells.Add(tc); //In Risp. a c'è se la Ragone è RISPOSTA tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(217, 217, 217); //cotrollo se la ragione = RISPOSTA. if (trasmSing.ragione.descrizione.ToUpper() == "RISPOSTA") { tc.Text = "In Rips. a"; } else { tc.Text = "**********"; } tc.Height = Unit.Pixel(15); tc.ColumnSpan = 2; tc.Width = Unit.Percentage(10); tr.Cells.Add(tc); tbl.Rows.Add(tr); //************************************************************************ //************ROW TRASM UTENTE******************************************** //************************************************************************ for (int i = 0; i < trasmSing.trasmissioneUtente.Length; i++) { drawHeaderTrasmUt(tbl); DocsPaWR.TrasmissioneUtente TrasmUt = (DocsPAWA.DocsPaWR.TrasmissioneUtente)trasmSing.trasmissioneUtente[i]; //Cella Bianca tr = new TableRow(); tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(255, 255, 255); tc.Text = " "; tc.Width = Unit.Percentage(5); tr.Cells.Add(tc); //Utente tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); tc.Text = TrasmUt.utente.descrizione; tc.Width = Unit.Percentage(15); tr.Cells.Add(tc); //Data Vista tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); tc.Text = TrasmUt.dataVista; tc.Width = Unit.Percentage(10); tr.Cells.Add(tc); //Data Acc. //Tipo c'è solo per determinate ragioni tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); tc.Text = TrasmUt.dataAccettata; tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(10); tr.Cells.Add(tc); //Data Rif. tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); tc.Text = TrasmUt.dataRifiutata; tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(10); tr.Cells.Add(tc); //Info Acc. / Info Rif. tc = new TableCell(); //tc.ColumnSpan=2; tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); // TextBox txtInf=new TextBox(); // string nomTxt="txt_Inf"+i.ToString(); // txtInf.CssClass="testo_grigio"; // txtInf.Enabled=false; //controllo se in Acc. o in rif. if (TrasmUt.dataAccettata != "") { // txtInf.Text=TrasmUt.noteAccettazione; tc.Text = TrasmUt.noteAccettazione; } else if (TrasmUt.dataRifiutata != "") { // txtInf.Text=TrasmUt.noteRifiuto; tc.Text = TrasmUt.noteRifiuto; } else { // txtInf.Text=""; tc.Text = " "; } // tc.Controls.Add(txtInf); tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(30); tr.Cells.Add(tc); // tc=new TableCell(); // tc.CssClass="testo_grigio"; // tc.BackColor=Color.FromArgb(242,242,242); // tc.Text="Info Rif."; // tc.Height=Unit.Pixel(15); // tc.Width=Unit.Percentage(17.5); // tr.Cells.Add(tc); //Data Risp. è un link che porta al documento tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); //creo obj-aspx Hyperlink HyperLink hLink = new HyperLink(); string nomeHlink = "hl_" + i.ToString(); hLink.CssClass = "testo_grigio"; hLink.Height = Unit.Pixel(15); tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(10); tr.Cells.Add(tc); //cell con il colore della riga dati tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(242, 242, 242); tc.Text = " "; tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(5); tr.Cells.Add(tc); //cell bianca tc = new TableCell(); tc.CssClass = "testo_grigio"; tc.BackColor = Color.FromArgb(255, 255, 255); tc.Text = " "; tc.Height = Unit.Pixel(15); tc.Width = Unit.Percentage(5); tr.Cells.Add(tc); tbl.Rows.Add(tr); } //fine row utente } catch (System.Exception ex) { ErrorManager.redirect(this, ex); } }