104 lines
2.6 KiB
C#
104 lines
2.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace MoonProTablet
|
|
{
|
|
public partial class Test2 : System.Web.UI.Page
|
|
{
|
|
#region Protected Properties
|
|
|
|
protected bool showInnov
|
|
{
|
|
get
|
|
{
|
|
bool answ = false;
|
|
bool.TryParse(hfShowInnov.Value, out answ);
|
|
return answ;
|
|
}
|
|
set
|
|
{
|
|
hfShowInnov.Value = $"{value}";
|
|
}
|
|
}
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Private Methods
|
|
|
|
/// <summary>
|
|
/// determina comportamento btn conferma
|
|
/// </summary>
|
|
private void switchBtnConferma(bool showConf)
|
|
{
|
|
divInnovazioni.Visible = showConf;
|
|
if (showConf)
|
|
{
|
|
#if false
|
|
// continuo update
|
|
lbtSalva.Visible = showConf;
|
|
lblUpdating.Visible = !showConf;
|
|
#endif
|
|
#if false
|
|
try
|
|
{
|
|
updatePzBuoni();
|
|
// sollevo evento!
|
|
if (eh_inserting != null)
|
|
{
|
|
eh_inserting(this, new EventArgs());
|
|
}
|
|
}
|
|
catch
|
|
{
|
|
txtNumPezzi.Text = "0";
|
|
logger.lg.scriviLog(string.Format("Errore recupero pezzi da confermare per la macchina {0}", idxMacchinaSel), tipoLog.ERROR);
|
|
}
|
|
#endif
|
|
}
|
|
if (showConf)
|
|
{
|
|
lblShowConfProd.Text = "Nascondi Conferma";
|
|
}
|
|
else
|
|
{
|
|
lblShowConfProd.Text = "Mostra Conferma";
|
|
#if false
|
|
// sollevo evento!
|
|
if (eh_reset != null)
|
|
{
|
|
eh_reset(this, new EventArgs());
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
|
|
#endregion Private Methods
|
|
|
|
#region Protected Methods
|
|
|
|
/// <summary>
|
|
/// cambio stato visibilità pannello e testo button
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void lbtShowConfProd_Click(object sender, EventArgs e)
|
|
{
|
|
showInnov = !showInnov;
|
|
switchBtnConferma(showInnov);
|
|
}
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
switchBtnConferma(false);
|
|
}
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |