68 lines
1.9 KiB
C#
68 lines
1.9 KiB
C#
using SteamWare;
|
|
using System;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace MoonProTablet.WebUserControls
|
|
{
|
|
public partial class mod_mappaStato : System.Web.UI.UserControl
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// url completo immagine
|
|
/// </summary>
|
|
/// <param name="url"></param>
|
|
/// <returns></returns>
|
|
public string ImgUrl(object url)
|
|
{
|
|
// se vuoto metto empty...
|
|
if (url.ToString() == "")
|
|
{
|
|
url = "empty.png";
|
|
}
|
|
return string.Format("./images/macchine/{0}", url);
|
|
}
|
|
/// <summary>
|
|
/// fomratta durata in minuti/ore/gg a seconda del totale...
|
|
/// </summary>
|
|
/// <param name="minuti"></param>
|
|
/// <returns></returns>
|
|
public string formatDurata(object min)
|
|
{
|
|
return utility.formatDurata(min);
|
|
}
|
|
|
|
/// <summary>
|
|
/// rimanda alla pagina di dettaglio della macchina scelta
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void hlMacchina_Click(object sender, EventArgs e)
|
|
{
|
|
LinkButton lnkbtn = (LinkButton)sender;
|
|
memLayer.ML.setSessionVal("IdxMacchina", lnkbtn.CommandArgument);
|
|
memLayer.ML.setSessionVal("subMaccSel", lnkbtn.CommandArgument);
|
|
Response.Redirect("~/DettaglioMacchina.aspx");
|
|
}
|
|
/// <summary>
|
|
/// fa update del controllo
|
|
/// </summary>
|
|
public void doUpdate()
|
|
{
|
|
ods.DataBind();
|
|
repLI.DataBind();
|
|
}
|
|
/// <summary>
|
|
/// timeout scaduto
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Timer1_Tick(object sender, EventArgs e)
|
|
{
|
|
doUpdate();
|
|
ScriptManager.RegisterStartupScript(Page, GetType(), "temp", "<script type='text/javascript'>$('#dettMacch').trigger('create');</script>", false);
|
|
}
|
|
}
|
|
} |