using SteamWare; using System; namespace MP_ADM { 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; } } private void Mod_gestKIT_eh_selKit(object sender, EventArgs e) { #if false // invio ultimo kit creato a barcode... mod_barcode.BCodeVal = mod_gestKIT.lastKitMade; mod_barcode.processInput(); #endif } private void Mod_barcode_eh_dataRead(object sender, EventArgs e) { #if false // verifico input su KIT x lettura "grezza" string rawInput = mod_barcode.rawInput; mod_gestKIT.lastInput = rawInput; mod_gestKIT.doUpdate(); #endif } private void Mod_barcode_eh_comandoRegistrato(object sender, EventArgs e) { #if false // verifico input su KIT x comando completo string BCodeVal = mod_barcode.BCodeVal; // se è un ORDINE... procedo! if (BCodeVal.IndexOf("OPR") == 0) { // aggiungo ordine... mod_gestKIT.addOrdArt(mod_barcode.codOrd, mod_barcode.codArt, mod_barcode.descArt, mod_barcode.qta); mod_gestKIT.lastInput = ""; } else { mod_gestKIT.lastInput = mod_barcode.BCodeVal; } mod_gestKIT.doUpdate(); #endif } } }