85 lines
2.1 KiB
C#
85 lines
2.1 KiB
C#
using Data;
|
|
using SteamWare;
|
|
using System;
|
|
using System.Web.UI;
|
|
|
|
namespace PUB.WebUserContols
|
|
{
|
|
public partial class mod_statusRowPBO : System.Web.UI.UserControl
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
fixLinks();
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Sistema i link (visibilità ed URL)
|
|
/// </summary>
|
|
private void fixLinks()
|
|
{
|
|
divDetail.Visible = (idxRichiesta != 0 && titolo != "MyDashboard" && titolo != "DettaglioIntervento");
|
|
divFiles.Visible = (idxRichiesta != 0 && titolo != "MyDashboard" && titolo != "Allegati");
|
|
divFatture.Visible = (idxRichiesta != 0 && titolo != "MyDashboard" && titolo != "Fatture");
|
|
hlDetail.NavigateUrl = string.Format("~/PBO/DettaglioIntervento?idxRichiesta={0}", idxRichiesta);
|
|
hlFatture.NavigateUrl = string.Format("~/PBO/Fatture?idxRichiesta={0}", idxRichiesta);
|
|
hlFiles.NavigateUrl = string.Format("~/PBO/Allegati?idxRichiesta={0}", idxRichiesta);
|
|
}
|
|
/// <summary>
|
|
/// IdxRichiesta corrente
|
|
/// </summary>
|
|
public int idxRichiesta
|
|
{
|
|
get
|
|
{
|
|
int answ = 0;
|
|
int.TryParse(Request.QueryString["idxRichiesta"], out answ);
|
|
return answ;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Numero allegati della richiesta corrente
|
|
/// </summary>
|
|
public int numAllegati
|
|
{
|
|
get
|
|
{
|
|
int answ = 0;
|
|
// cerco allegati
|
|
answ = DtProxy.man.taFile.getByFilt(idxRichiesta.ToString()).Rows.Count;
|
|
return answ;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Numero allegati della richiesta corrente
|
|
/// </summary>
|
|
public int numFatture
|
|
{
|
|
get
|
|
{
|
|
int answ = 0;
|
|
// cerco allegati
|
|
answ = DtProxy.man.taFatt.getByIdxRich(idxRichiesta).Rows.Count;
|
|
return answ;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// titolo pagina
|
|
/// </summary>
|
|
public string titolo
|
|
{
|
|
get
|
|
{
|
|
return devicesAuthProxy.getPage(Request.Url).Replace(".aspx", "");
|
|
}
|
|
}
|
|
public string nomeBO
|
|
{
|
|
get
|
|
{
|
|
return memLayer.ML.StringSessionObj("nomeBO");
|
|
}
|
|
}
|
|
}
|
|
} |