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

namespace NKC_WF.site
{
    public partial class KittingSmartAdv : BasePage
    {
        #region Public Properties

        /// <summary>
        /// PéackList corrente...
        /// </summary>
        public int PackListID
        {
            set
            {
                hfPackListID.Value = value.ToString();
            }
            get
            {
                int answ = 0;
                int.TryParse(hfPackListID.Value, out answ);
                return answ;
            }
        }

        #endregion Public Properties

        #region Private Methods

        private void cmp_kittingSmart_eh_doRefresh(object sender, EventArgs e)
        {
        }

        /// <summary>
        /// Aggiorna componente principale e child components
        /// </summary>
        private void doUpdate()
        {
            setCurrData();
        }

        /// <summary>
        /// Imposta dati correnti (Bunk / Sheet)
        /// </summary>
        private void setCurrData()
        {
            // recupero PackList
            var currPL = ComLib.getCurrPackList();
            if (currPL != null)
            {
                PackListID = currPL.PackListID;
            }
        }

        #endregion Private Methods

        #region Protected Methods

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                ((SiteMaster)this.Master).showSearch = false;
                doUpdate();
            }
            cmp_kittingSmartAdv.PlaceCod = "KIT001";
        }

        #endregion Protected Methods
    }
}