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

namespace GMW.WebUserControls
{
    public partial class mod_SearchProvCelle : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                doTraduci();
                //mod_detailCelle1.Visible = false;
                mod_execCelle1.Visible = false;
            }
            //mod_listCelle1.eh_selValore += new EventHandler(mod_listCelle1_eh_selValore);
            //mod_listCelle1.eh_resetSelezione += new EventHandler(mod_listCelle1_eh_resetSelezione);
        }

        void mod_listCelle1_eh_resetSelezione(object sender, EventArgs e)
        {
            //mod_detailCelle1.Visible = false;
            mod_execCelle1.Visible = false;
        }

        void mod_listCelle1_eh_selValore(object sender, EventArgs e)
        {
            //mod_detailCelle1.Visible = true;
            //mod_detailCelle1.doUpdate();
            mod_execCelle1.Visible = true;
        }


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

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