using SteamWare; using System; namespace ES3 { public partial class Planner : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { toggleVisibility(); } checkEnabled(); string codPre = memLayer.ML.CRS("OptAdmKit_CodPre"); mod_planStats.eh_reset += Mod_planStats_eh_reset; mod_planStats.eh_selVal += Mod_planStats_eh_selVal; mod_planCreate.eh_ucev += Mod_planCreate_eh_ucev; } private void Mod_planCreate_eh_ucev(object sender, EventArgs e) { // se trovo evento select/reset mostro/nascondo dettagli... ucEvent evento = (ucEvent)e; switch (evento.tipoEvento) { case ucEvType.ReqUpdateParent: mod_planStats.doReset(); mod_gestPromODL_OUT.resetSelezione(); break; default: break; } } protected void lbtToggle_Click(object sender, EventArgs e) { toggleVisibility(); } private void toggleVisibility() { divPromOUT.Visible = !divPromOUT.Visible; tgIcon.Attributes["class"] = divPromOUT.Visible ? "fa fa-chevron-up" : "fa fa-chevron-down"; } private void Mod_planStats_eh_selVal(object sender, EventArgs e) { fixSelStat(); } private void Mod_planStats_eh_reset(object sender, EventArgs e) { fixSelStat(); } protected void fixSelStat() { mod_planCreate.CodGruppo = mod_planStats.CodGruppo; mod_planCreate.IdxMacchina = mod_planStats.IdxMacchina; mod_planCreate.CodArticolo = mod_planStats.CodArticolo; mod_planCreate.doUpdate(); } private void checkEnabled() { bool optPar = memLayer.ML.CRB("OptAdmKitEnabled"); divContent.Visible = optPar; lblDataImportOut.Visible = !optPar; string messaggio = ""; if (!optPar) { messaggio = "Attenzione: Gestione KIT disabilitata"; lblDataImportOut.Text = messaggio; } } } }