using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;

namespace GMW_Term
{
    public partial class delibLog : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // imposto valori visibilità barcode specifici (nascondo testo...)
            mod_barcode1.valoreScan = "";
            mod_barcode1.showHeaderText = true;
            mod_barcode1.showNoteText = true;
            // imposto controllo valori scansionati
            mod_barcode1.eh_scannedUdc += new EventHandler(mod_barcode1_eh_scannedUdc);
            checkVisibility();
            // imposto btnHome
            mod_barcode1.homeBtnText = "btnTermMenuMov";
            mod_barcode1.homeBtnLink = "~/MenuMov.aspx";
        }
        /// <summary>
        /// controllo visibilità dati valori in sessione
        /// </summary>
        private void checkVisibility()
        {
            bool filtUdc = memLayer.ML.isInSessionObject("UDC4det_sel");
            if (filtUdc)
            {
                mod_barcode1.Visible = false;
            }
            else
            {
                mod_barcode1.Visible = true;
            }
        }
        /// <summary>
        /// mostro dettaglio UDC
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void mod_barcode1_eh_scannedUdc(object sender, EventArgs e)
        {
            mod_barcode1.Visible = false;
            mod_delibLog1.showUdcDetail(mod_barcode1.valoreScan); 
        }
    }
}