using System; namespace MP_SITE.WebUserControls { public partial class mod_AnPro_Totali : SteamWare.UserControl { public event EventHandler eh_selVal; public event EventHandler eh_reset; /// /// innalzo evento in base al tipo richiesto /// 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()); } } /// /// aggiorna visualizzazione /// /// Idx Macchine /// Si/No ODL già conclusi /// Si/No ODL in corso /// Si/No ODL da attrezzare /// /// aggiorna visualizzazione /// 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); } /// /// IdxMacchina selezionata /// public string IdxMacchina { get { return mod_AnPro_ODL.IdxMacchina; } } /// /// Cod articolo selezionato /// public string CodArticolo { get { return mod_AnPro_ODL.CodArticolo; } } } }