using SteamWare; using System; using System.Web.UI; namespace MoonProTablet.WebUserControls { public partial class mod_dettMacchina : System.Web.UI.UserControl { /// /// idx macchina selezionata /// public string idxMacchina { get { return memLayer.ML.StringSessionObj("IdxMacchina"); } set { memLayer.ML.setSessionVal("IdxMacchina", value); } } /// /// caricamento pagina /// /// /// protected void Page_Load(object sender, EventArgs e) { dmTimer.Interval = memLayer.ML.CRI("dtTimerInt"); // controllo se ho dett macchina altrimenti ritorno a pagina generale... if (idxMacchina == "") { Response.Redirect("~/MappaStato.aspx"); } } /// /// url completo immagine /// /// /// public string ImgUrl(object url) { return string.Format("./images/macchine/{0}", url); } /// /// fomratta durata in minuti/ore/gg a seconda del totale... /// /// /// public string formatDurata(object min) { return utility.formatDurata(min); } /// /// fa update del controllo /// public void doUpdate() { ods.DataBind(); repLI.DataBind(); } /// /// timeout scaduto /// /// /// protected void Timer1_Tick(object sender, EventArgs e) { doUpdate(); //ScriptManager.RegisterStartupScript(Page, GetType(), "temp", "", false); ScriptManager.RegisterStartupScript(Page, GetType(), "temp", "", false); } /// /// determian se nascondere la visualizzaizone compelta (e mostrare solo nome macchina) /// /// mostra tutto (true) o solo header(false) public void detailLevel(bool full) { pnlFullDet.Visible = full; pnlLessDet.Visible = !full; } } }