Files
MoonPro.net/MP-TAB/WebUserControls/mod_commenti.ascx.cs
T
Samuele E. Locatelli 0d4435a0bb Rinominato progetto TAB
2018-05-03 14:55:02 +02:00

66 lines
1.6 KiB
C#

using MapoDb;
using SteamWare;
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MoonProTablet.WebUserControls
{
public partial class mod_commenti : System.Web.UI.UserControl
{
/// <summary>
/// registrata richiesta
/// </summary>
public event EventHandler eh_reqEdit;
protected void Page_Load(object sender, EventArgs e)
{
}
/// <summary>
/// abilitazione edit commenti
/// </summary>
public bool enableEdit
{
get
{
return memLayer.ML.confReadBool("commEnableEditDel");
}
}
public void doUpdate()
{
repComm.DataBind();
}
/// <summary>
/// carico x edit commento
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtEdit_Click(object sender, EventArgs e)
{
LinkButton imgBtn = (LinkButton)sender;
DateTime inizioStato = Convert.ToDateTime(imgBtn.CommandArgument);
memLayer.ML.setSessionVal("inizioStato", inizioStato);
// sollevo evento!
if (eh_reqEdit != null)
{
eh_reqEdit(this, new EventArgs());
}
}
/// <summary>
/// elimina commento
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtDel_Click(object sender, EventArgs e)
{
LinkButton imgBtn = (LinkButton)sender;
DateTime inizioStato = Convert.ToDateTime(imgBtn.CommandArgument);
string idxMacchina = memLayer.ML.StringSessionObj("idxMacchina");
DataLayer.obj.taEventi.DeleteQuery(idxMacchina, inizioStato);
doUpdate();
}
}
}