126 lines
3.6 KiB
C#
126 lines
3.6 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.Configuration;
|
|
using System.Collections;
|
|
using System.Web;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Web.UI.WebControls.WebParts;
|
|
using System.Web.UI.HtmlControls;
|
|
using System.Collections.Generic;
|
|
|
|
public partial class PopUpSintesi : System.Web.UI.Page
|
|
{
|
|
|
|
private string pdfId;
|
|
//private string nome;
|
|
//private string cognome;
|
|
//private string datanascita;
|
|
//private string codiceFiscale;
|
|
//private string codiceContratto;
|
|
//private string indirizzoDiContratto;
|
|
//private string presso;
|
|
|
|
//private string codiceRete;
|
|
//private string codicePB;
|
|
//private string funzione;
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
pdfId = Request.QueryString.Get("pdfId");
|
|
|
|
IDataReader dr = GetData();
|
|
|
|
while (dr.Read())
|
|
{
|
|
lblNomeCognome.Text = (string)dr["nomecognome"];
|
|
lblDataNascita.Text = ((DateTime)dr["datanascita"]).ToString("dd/MM/yyyy");
|
|
lblCodiceFiscale.Text = (string)dr["codicefiscale"];
|
|
lblCodiceContratto.Text = (string)dr["codicecontratto"];
|
|
lblIndirizzoDiContratto.Text = (string)dr["indirizzodicontratto"];
|
|
lblPresso.Text = (string)dr["presso"];
|
|
}
|
|
|
|
|
|
//nome = Request.QueryString.Get("nomeCliente");
|
|
//cognome = Request.QueryString.Get("cognomeCliente");
|
|
//datanascita = Request.QueryString.Get("dataNascita");
|
|
//codiceFiscale = Request.QueryString.Get("codCliente");
|
|
//codiceContratto = Request.QueryString.Get("codiceContratto");
|
|
//indirizzoDiContratto = Request.QueryString.Get("indirizzoDiContratto");
|
|
//presso =
|
|
//codiceRete = Request.QueryString.Get("tipoRete");
|
|
//codicePB = Request.QueryString.Get("codPB");
|
|
|
|
|
|
|
|
//funzione = Request.QueryString.Get("funzione");
|
|
|
|
//lblNomeCognome.Text = nome + " " + cognome;
|
|
//lblDataNascita.Text = datanascita;
|
|
//lblCodiceFiscale.Text = codiceFiscale;
|
|
//lblCodiceContratto.Text = codiceContratto;
|
|
//lblIndirizzoDiContratto.Text = indirizzoDiContratto;
|
|
//lblPresso.Text = presso;
|
|
}
|
|
|
|
//protected void btnConferma_Click(object sender, EventArgs e)
|
|
//{
|
|
// switch (funzione) {
|
|
// case("AR"):
|
|
// break;
|
|
|
|
// case ("RS"):
|
|
// break;
|
|
|
|
// default:
|
|
// break;
|
|
|
|
// }
|
|
//}
|
|
|
|
|
|
//protected void btnAnnulla_Click(object sender, EventArgs e)
|
|
//{
|
|
// //this.
|
|
//}
|
|
|
|
private IDataReader GetData()
|
|
{
|
|
|
|
List<Parametro> parametri = new List<Parametro>();
|
|
|
|
Parametro parametro;
|
|
|
|
parametro = new Parametro();
|
|
parametro.DbType = DbType.Int32;
|
|
parametro.Value = pdfId;
|
|
parametro.ParameterName = "Id";
|
|
parametri.Add(parametro);
|
|
|
|
DataTable dati = DataAccess.ExecuteDataTableStoredProcedure(DBProvider.SqlServer, "[dbo].[sp_getCheckPeriodico]", parametri);
|
|
bool periodico = false;
|
|
|
|
if (dati.Rows.Count > 0)
|
|
periodico = (Convert.ToBoolean(dati.Rows[0]["FlagPeriodico"]));
|
|
|
|
parametro.ParameterName = "IdReport";
|
|
|
|
|
|
IDataReader dr;
|
|
if(!periodico)
|
|
dr = DataAccess.ExecuteDataReaderStoredProcedure(DBProvider.SqlServerStampeC6, "C6MART.RM_Sintesi_Cliente", parametri);
|
|
else
|
|
dr = DataAccess.ExecuteDataReaderStoredProcedure(DBProvider.SqlServerStampeC6, "C6MARTPERIODICO.RM_Sintesi_Cliente", parametri);
|
|
return dr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//protected struct DatiSintesi {
|
|
|
|
//}
|