Files
MoonPro.net/MP-Tablet/Commenti.aspx.cs
T
2016-11-14 11:10:03 +01:00

80 lines
2.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
namespace MoonProTablet
{
public partial class Commenti : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Session["TipoLink"] = "EditMacch";
//mod_commenti1.eh_newVal += mod_commenti1_eh_newVal;
//mod_commenti1.eh_reset += mod_commenti1_eh_reset;
//mod_dichiarazione1.eh_newVal += mod_dichiarazione1_eh_newVal;
mod_insComm1.eh_newVal += mod_insComm1_eh_newVal;
mod_insComm1.eh_reset += mod_insComm1_eh_reset;
mod_insComm1.eh_inserting += mod_insComm1_eh_inserting;
mod_commenti1.eh_reqEdit += mod_commenti1_eh_reqEdit;
mod_fermate1.eh_reqEdit += mod_fermate1_eh_reqEdit;
}
void mod_fermate1_eh_reqEdit(object sender, EventArgs e)
{
// avendo in sessione inizio fermata DEVO andare a pagina DichFermi, in modalità "ritroso", precompilare data/ora ed eventuale descizione...
Response.Redirect("Dichiarazione.aspx");
}
void mod_insComm1_eh_inserting(object sender, EventArgs e)
{
mod_dettMacchina1.detailLevel(false);
}
void mod_commenti1_eh_reqEdit(object sender, EventArgs e)
{
mod_insComm1.caricaCommento();
}
void mod_insComm1_eh_reset(object sender, EventArgs e)
{
showPnlDichiaraz(false);
mod_commenti1.doUpdate();
mod_dettMacchina1.detailLevel(true);
}
void mod_insComm1_eh_newVal(object sender, EventArgs e)
{
mod_commenti1.doUpdate();
mod_dettMacchina1.detailLevel(true);
}
void mod_dichiarazione1_eh_newVal(object sender, EventArgs e)
{
// ricarico tutto!
Response.Redirect("Commenti.aspx");
}
void mod_commenti1_eh_reset(object sender, EventArgs e)
{
showPnlDichiaraz(false);
}
/// <summary>
/// richiesta ins nuovo evento...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void mod_commenti1_eh_newVal(object sender, EventArgs e)
{
showPnlDichiaraz(true);
}
private void showPnlDichiaraz(bool showDich)
{
pnlEventi.Visible = !showDich;
}
}
}