Files
2019-11-06 11:02:25 +01:00

101 lines
2.4 KiB
C#

using MapoSDK;
using System;
namespace MP_SITE.WebUserControls
{
public partial class mod_AnPro_Totali : SteamWare.UserControl
{
public event EventHandler eh_selVal;
public event EventHandler eh_reset;
/// <summary>
/// innalzo evento in base al tipo richiesto
/// </summary>
protected void raiseEvent(tipoEvento evReq)
{
switch (evReq)
{
case tipoEvento.reset:
// raise dell'evento
if (eh_reset != null)
{
eh_reset(this, new EventArgs());
}
break;
case tipoEvento.selection:
// raise dell'evento
if (eh_selVal != null)
{
eh_selVal(this, new EventArgs());
}
break;
case tipoEvento.edit:
case tipoEvento.delete:
default:
break;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
mod_AnPro_PODL.Visible = false;
}
mod_AnPro_ODL.eh_selVal += Mod_AnPro_ODL_eh_selVal;
mod_AnPro_ODL.eh_reset += Mod_AnPro_ODL_eh_reset;
}
private void Mod_AnPro_ODL_eh_selVal(object sender, EventArgs e)
{
if (eh_selVal != null)
{
eh_selVal(this, new EventArgs());
}
}
private void Mod_AnPro_ODL_eh_reset(object sender, EventArgs e)
{
if (eh_reset != null)
{
eh_reset(this, new EventArgs());
}
}
/// <summary>
/// aggiorna visualizzazione
/// </summary>
/// <param name="idxMulti">Idx Macchine</param>
/// <param name="OdlChiusi">Si/No ODL già conclusi</param>
/// <param name="OdlAperti">Si/No ODL in corso</param>
/// <param name="OdlNew">Si/No ODL da attrezzare</param>
/// <summary>
/// aggiorna visualizzazione
/// </summary>
public void doUpdate(string idxMulti, bool OdlChiusi, bool OdlAperti, bool OdlNew)
{
// fix controlli
mod_AnPro_ODL.doUpdate(idxMulti, OdlChiusi, OdlAperti, OdlNew);
mod_AnPro_PODL.Visible = OdlNew;
mod_AnPro_PODL.doUpdate(idxMulti);
}
/// <summary>
/// IdxMacchina selezionata
/// </summary>
public string IdxMacchina
{
get
{
return mod_AnPro_ODL.IdxMacchina;
}
}
/// <summary>
/// Cod articolo selezionato
/// </summary>
public string CodArticolo
{
get
{
return mod_AnPro_ODL.CodArticolo;
}
}
}
}