68 lines
1.6 KiB
C#
68 lines
1.6 KiB
C#
using CMS_SC_Data;
|
|
using SteamWare;
|
|
using System;
|
|
using System.Web.UI;
|
|
|
|
namespace CMS_SC.WebUserControls
|
|
{
|
|
public partial class mod_selFamMaccUrl : System.Web.UI.UserControl
|
|
{
|
|
/// <summary>
|
|
/// valore QueryString x parametro selezionato...
|
|
/// </summary>
|
|
protected string QSName = "CodFam";
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
// cerco in URL cod scheda, se c'è seleziono...
|
|
if (memLayer.ML.QSS(QSName) != "")
|
|
{
|
|
ddlSelFamMacc.SelectedValue = memLayer.ML.QSS(QSName);
|
|
}
|
|
else
|
|
{
|
|
try
|
|
{
|
|
ddlSelFamMacc.DataBind();
|
|
ddlSelFamMacc.SelectedIndex = 0;
|
|
updateAndRedirect();
|
|
}
|
|
catch
|
|
{ }
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// nome del documento (da DB)
|
|
/// </summary>
|
|
public string docPath
|
|
{
|
|
get
|
|
{
|
|
string answ = "";
|
|
try
|
|
{
|
|
answ = DtProxy.man.taASC.getByCodScheda(memLayer.ML.QSS(QSName))[0].Path;
|
|
}
|
|
catch
|
|
{ }
|
|
return answ;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// salvo (con URL) scheda selezionata
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void ddlSelFamMacc_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
updateAndRedirect();
|
|
}
|
|
|
|
protected void updateAndRedirect()
|
|
{
|
|
Response.Redirect(string.Format("{0}?{3}={1}&CodSchedaVers={2}", devicesAuthProxy.pagCorrente, ddlSelFamMacc.SelectedValue, memLayer.ML.QSS("CodSchedaVers"), QSName));
|
|
}
|
|
}
|
|
} |