using SteamWare;
using System;
using System.Web.UI;

namespace GMW.WebUserControls
{
    public partial class Mod_SearchProvImballi : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                doTraduci();
                mod_detailImballi1.Visible = false;
                mod_execImballi1.Visible = false;
            }
            mod_listImballi1.eh_selValore += new EventHandler(mod_listImballi1_eh_selValore);
            mod_listImballi1.eh_resetSelezione += new EventHandler(mod_listImballi1_eh_resetSelezione);
        }

        void mod_listImballi1_eh_resetSelezione(object sender, EventArgs e)
        {
            mod_detailImballi1.Visible = false;
            mod_execImballi1.Visible = false;
        }

        void mod_listImballi1_eh_selValore(object sender, EventArgs e)
        {
            //mod_detailImballi1.Visible = true;
            ////mod_detailImballi1.doUpdate();
            //mod_execImballi1.Visible = true;
        }


        private void doTraduci()
        {
            lblSearchProvider.Text = traduci("Imballi");
        }

        /// <summary>
        /// Effettua la ricerca indicata
        /// </summary>
        public void doSearch()
        {
            mod_listImballi1.doUpdate();
            mod_detailImballi1.Visible = false;
            mod_execImballi1.Visible = false;
        }
        /// <summary>
        /// wrapper metodo traduzione
        /// </summary>
        /// <param name="lemma"></param>
        /// <returns></returns>
        public string traduci(string lemma)
        {
            return user_std.UtSn.Traduci(lemma);
        }
    }
}