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.WebUserControls
{
    public partial class mod_home : System.Web.UI.UserControl
    {
        /// <summary>
        /// wrapper traduzione termini
        /// </summary>
        /// <param name="lemma"></param>
        /// <returns></returns>
        public string traduci(string lemma)
        {
            return user_std.UtSn.Traduci(lemma);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            // scrive label e text bottoni
            btn1.Text = string.Format("{0}\n[Alt+{1}]", traduci("btnTermMenuLDP"), 2);
            btn1.AccessKey = "2";
            btn2.Text = string.Format("{0}\n[Alt+{1}]", traduci("btnTermMenuMov"), 8);
            btn2.AccessKey = "8";
            btn3.Text = string.Format("{0}\n[Alt+{1}]", traduci("btnLogout"), 0);
            btn3.AccessKey = "0";
            btn4.Text = string.Format("{0}\n[Alt+{1}]", traduci("btnSearch"), 6);
            btn4.AccessKey = "6";
        }
        /// <summary>
        /// vado menù LDP
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btn1_Click(object sender, EventArgs e)
        {
            Response.Redirect("MenuLDP.aspx");
        }
        /// <summary>
        /// vado menù movimenti
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btn2_Click(object sender, EventArgs e)
        {
            Response.Redirect("MenuMov.aspx");
        }
        /// <summary>
        /// reset e login
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btn3_Click(object sender, EventArgs e)
        {
            TermUtils.TU.forceLogOut();
            Response.Redirect("Barcode.aspx");
        }
        /// <summary>
        /// ricerche
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btn4_Click(object sender, EventArgs e)
        {
            Response.Redirect("Search.aspx");
        }
    }
}

