prima versione edit commenti (abilitati)
This commit is contained in:
@@ -6,75 +6,61 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_commenti : System.Web.UI.UserControl
|
||||
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>
|
||||
/// 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 btnEdit_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
ImageButton imgBtn = (ImageButton)sender;
|
||||
DateTime inizioStato = Convert.ToDateTime(imgBtn.CommandArgument);
|
||||
memLayer.ML.setSessionVal("inizioStato", inizioStato);
|
||||
// sollevo evento!
|
||||
if (eh_reqEdit != null)
|
||||
{
|
||||
eh_reqEdit(this, new EventArgs());
|
||||
}
|
||||
|
||||
|
||||
//string idxMacchina = memLayer.ML.StringSessionObj("idxMacchina");
|
||||
//DS_applicazione.EventListRow riga = null;
|
||||
//try
|
||||
//{
|
||||
// riga = DataLayer.obj.taEventi.GetByMacchinaPeriodo(idxMacchina, inizioStato, inizioStato)[0];
|
||||
//txtDate.Text = riga.InizioStato.ToString("yyyy-MM-dd");
|
||||
//txtTime.Text = riga.InizioStato.ToString("HH:mm");
|
||||
//txtCommento.Text = riga.Value;
|
||||
//}
|
||||
//catch
|
||||
//{ }
|
||||
//fixPanels(false, true, false);
|
||||
}
|
||||
/// <summary>
|
||||
/// elimina commento
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDel_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
ImageButton imgBtn = (ImageButton)sender;
|
||||
DateTime inizioStato = Convert.ToDateTime(imgBtn.CommandArgument);
|
||||
string idxMacchina = memLayer.ML.StringSessionObj("idxMacchina");
|
||||
DataLayer.obj.taEventi.DeleteQuery(idxMacchina, inizioStato);
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
/// <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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user