65 lines
1.9 KiB
C#
65 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web.UI;
|
|
using System.Data;
|
|
using System.Web;
|
|
|
|
public partial class SalvaNucleiFamiliari : System.Web.UI.Page
|
|
{
|
|
|
|
|
|
public string codiceRete;
|
|
public string codicePB;
|
|
|
|
|
|
SessionNucleo sessionNucleo = new SessionNucleo();
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
if (Debug.iSDebug) ButIndietro.Attributes.Add("title", "sessionNucleo.isSession=" + (sessionNucleo.isSession?"true":"false"));
|
|
|
|
codiceRete = Request.QueryString.Get("tipoRete");
|
|
codicePB = Request.QueryString.Get("codPB");
|
|
if (!sessionNucleo.isSession)
|
|
ButSalva.Enabled = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void ButSalva_Click(object sender, EventArgs e)
|
|
{
|
|
DaoNucleo daoNuclei = new DaoNucleo();
|
|
if (sessionNucleo.isSession) {
|
|
|
|
long idPdf = daoNuclei.SalvaPdf("M", 8, "D", codicePB, codiceRete, 0, txNote.Text, sessionNucleo.image, sessionNucleo.chiaveNucleo, sessionNucleo.chiaveClientiPb);
|
|
sessionNucleo.ClearSession();
|
|
DataRow dr = daoNuclei.RicercaPdfNuclei(idPdf);
|
|
if (dr != null)
|
|
{
|
|
tbSalva.Visible = false;
|
|
lbNucleo.Text = dr["NomeNucleo"].ToString();
|
|
lbNote.Text = dr["Note"].ToString();
|
|
if (dr["dtCreazione"].ToString().Length>=10)
|
|
lbData.Text = dr["dtCreazione"].ToString().Substring(0,10);
|
|
if (dr["dtCreazione"].ToString().Length >10)
|
|
lbOra.Text = dr["dtCreazione"].ToString().Substring(10);
|
|
tbNote.Visible = true;
|
|
|
|
}
|
|
}
|
|
}
|
|
protected void ButIndietro_Click(object sender, EventArgs e)
|
|
{
|
|
Session["daSalvaPdf"] = true;
|
|
Response.Redirect("reportNucleiFamiliari.aspx?" + Request.QueryString.ToString());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} |