141 lines
5.0 KiB
C#
141 lines
5.0 KiB
C#
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.WebUserControls
|
|
{
|
|
public partial class mod_SearchProvParticolari : System.Web.UI.UserControl
|
|
{
|
|
|
|
/// <summary>
|
|
/// evento selezione valore
|
|
/// </summary>
|
|
public event EventHandler eh_selValore;
|
|
/// <summary>
|
|
/// evento generale di reset
|
|
/// </summary>
|
|
public event EventHandler eh_reset;
|
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
mod_execParticolari1.Visible = false;
|
|
memLayer.ML.setSessionVal("RicercaParticolariAttiva", false, false);
|
|
}
|
|
mod_detailParticolari1.eh_selValore += new EventHandler(mod_detailParticolari1_eh_selValore);
|
|
mod_detailParticolari1.eh_resetSelezione += new EventHandler(mod_detailParticolari1_eh_resetSelezione);
|
|
mod_listParticolari1.eh_selValore += new EventHandler(mod_listParticolari1_eh_selValore);
|
|
mod_listParticolari1.eh_resetSelezione += new EventHandler(mod_listParticolari1_eh_resetSelezione);
|
|
mod_execParticolari1.eh_btnGoToMagPressed += new EventHandler(mod_execParticolari1_eh_btnGoToMagPressed);
|
|
mod_execParticolari1.eh_btnListaPrelievoPressed += new EventHandler(mod_execParticolari1_eh_btnListaPrelievoPressed);
|
|
if (memLayer.ML.BoolSessionObj("RicercaParticolariAttiva"))
|
|
{
|
|
mod_execParticolari1.Visible = true;
|
|
mod_detailParticolari1.Visible = true;
|
|
}
|
|
else
|
|
{
|
|
mod_execParticolari1.Visible = false;
|
|
mod_detailParticolari1.Visible = false;
|
|
}
|
|
}
|
|
|
|
void mod_detailParticolari1_eh_resetSelezione(object sender, EventArgs e)
|
|
{
|
|
mod_execParticolari1.Visible = false;
|
|
}
|
|
|
|
void mod_detailParticolari1_eh_selValore(object sender, EventArgs e)
|
|
{
|
|
mod_execParticolari1.Visible = true;
|
|
}
|
|
/// <summary>
|
|
/// evento crea lista di prelievo chiamato
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
void mod_execParticolari1_eh_btnListaPrelievoPressed(object sender, EventArgs e)
|
|
{
|
|
memLayer.ML.setSessionVal("PrecompilaListaPrelievo", true, false);
|
|
Response.Redirect("~/ElencoListePrelievo.aspx");
|
|
}
|
|
/// <summary>
|
|
/// evento vai a magazzino chiamato
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
void mod_execParticolari1_eh_btnGoToMagPressed(object sender, EventArgs e)
|
|
{
|
|
Response.Redirect("~/DettaglioBlocco.aspx");
|
|
}
|
|
|
|
void mod_listParticolari1_eh_resetSelezione(object sender, EventArgs e)
|
|
{
|
|
memLayer.ML.setSessionVal("RicercaParticolariAttiva", false, false);
|
|
mod_detailParticolari1.resetSelezione();
|
|
mod_execParticolari1.Visible = false;
|
|
// sollevo evento nuovo valore...
|
|
if (eh_reset != null)
|
|
{
|
|
eh_reset(this, new EventArgs());
|
|
}
|
|
}
|
|
|
|
void mod_listParticolari1_eh_selValore(object sender, EventArgs e)
|
|
{
|
|
memLayer.ML.setSessionVal("RicercaParticolariAttiva", true,false);
|
|
mod_detailParticolari1.Visible = true;
|
|
mod_detailParticolari1.resetSelezione();
|
|
mod_execParticolari1.Visible = false;
|
|
// sollevo evento nuovo valore...
|
|
if (eh_selValore != null)
|
|
{
|
|
eh_selValore(this, new EventArgs());
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Effettua la ricerca indicata
|
|
/// </summary>
|
|
public void doSearch()
|
|
{
|
|
mod_listParticolari1.doUpdate();
|
|
//mod_detailParticolari1.Visible = false;
|
|
mod_execParticolari1.Visible = false;
|
|
}
|
|
/// <summary>
|
|
/// wrapper metodo traduzione
|
|
/// </summary>
|
|
/// <param name="lemma"></param>
|
|
/// <returns></returns>
|
|
public string traduci(string lemma)
|
|
{
|
|
return user_std.UtSn.Traduci(lemma);
|
|
}
|
|
/// <summary>
|
|
/// effettua update della visualizzazione
|
|
/// </summary>
|
|
public void doRefresh()
|
|
{
|
|
mod_execParticolari1.Visible = false;
|
|
mod_listParticolari1.doRefresh();
|
|
}
|
|
/// <summary>
|
|
/// effettua reset del controllo
|
|
/// </summary>
|
|
public void doReset()
|
|
{
|
|
memLayer.ML.setSessionVal("RicercaParticolariAttiva", false, false);
|
|
mod_listParticolari1.doRefresh();
|
|
mod_detailParticolari1.Visible = false;
|
|
mod_execParticolari1.Visible = false;
|
|
}
|
|
|
|
}
|
|
} |