commit branch ermanno + trunk per correzione (non andava....)
git-svn-id: https://keyhammer.ath.cx/svn/XPS/trunk@117 43c8e981-f90d-406c-a89a-24a2c4268d51
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="XPST.WebUserControls.mod_barcode" Codebehind="mod_barcode.ascx.cs" %>
|
||||
<div style="text-align: center; font-size:20pt;">
|
||||
<div>
|
||||
<asp:TextBox runat="server" ID="txtInput" Width="600px" Font-Size="40pt"
|
||||
ontextchanged="txtInput_TextChanged" />
|
||||
</div>
|
||||
<asp:Panel runat="server" ID="pnlBarcodeBox" CssClass="">
|
||||
<div style="background-color: #FFE800; padding: 8px; margin: 1px;">
|
||||
<asp:Label runat="server" ID="lblInput" Text="" />
|
||||
</div>
|
||||
<div style="background-color:#FFC500; padding:8px; margin:1px;">
|
||||
<asp:Label runat="server" ID="lblValore" Text="" />
|
||||
</div>
|
||||
<div style="background-color: #FF7700; padding: 8px; margin: 1px; ">
|
||||
<asp:Label runat="server" ID="lblRichiesta" Text="" Font-Bold="true" />
|
||||
</div>
|
||||
<asp:Label ID="lblBrowser" runat="server"></asp:Label>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
@@ -0,0 +1,263 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
|
||||
namespace XPST.WebUserControls
|
||||
{
|
||||
public partial class mod_barcode : System.Web.UI.UserControl
|
||||
{
|
||||
#region area protected
|
||||
|
||||
/// <summary>
|
||||
/// dictionary comandi ammessi
|
||||
/// </summary>
|
||||
protected Dictionary<string, string> _comandi = new Dictionary<string, string>();
|
||||
/// <summary>
|
||||
/// dictionary dei valori ammessi
|
||||
/// </summary>
|
||||
protected Dictionary<string, string> _tabValori = new Dictionary<string, string>();
|
||||
/// <summary>
|
||||
/// oggetto comando locale alla classe
|
||||
/// </summary>
|
||||
protected inputComando comando
|
||||
{
|
||||
get
|
||||
{
|
||||
inputComando answ;
|
||||
if (memLayer.ML.isInSessionObject("barcodeCmd"))
|
||||
{
|
||||
answ = (inputComando)memLayer.ML.objSessionObj("barcodeCmd");
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = new inputComando();
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("barcodeCmd", value, false);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// al caricamento della pagina...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
DetectAgent();
|
||||
myInitialize();
|
||||
}
|
||||
/// <summary>
|
||||
/// inizializzazione specifica barcode
|
||||
/// </summary>
|
||||
private void myInitialize()
|
||||
{
|
||||
lblInput.Text = traduci("PregoInserireBarcode");
|
||||
if (!Page.IsPostBack) comando = new inputComando();
|
||||
txtInput.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// barcode completato con invio...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtInput_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
processInput();
|
||||
}
|
||||
|
||||
private void processInput()
|
||||
{
|
||||
// verifico se sia un comando o un valore valido...
|
||||
isInputEvent();
|
||||
isValore();
|
||||
// verifico se c'è stato input evento
|
||||
if (comando.isValid)
|
||||
{
|
||||
if (comando.currCmdIn != "")
|
||||
{
|
||||
txtInput2show = comando.descrComando;
|
||||
}
|
||||
else
|
||||
{
|
||||
txtInput2show = "---";
|
||||
}
|
||||
if (comando.valore != "")
|
||||
{
|
||||
txtVal2show = comando.valoreTrad;
|
||||
}
|
||||
else
|
||||
{
|
||||
txtVal2show = "---";
|
||||
}
|
||||
if (eh_comandoRegistrato != null)
|
||||
{
|
||||
eh_comandoRegistrato(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblInput.Text = traduci("ComandoSconosciuto");
|
||||
lblValore.Text = txtInput.Text;
|
||||
comando = new inputComando();
|
||||
}
|
||||
txtInput.Text = "";
|
||||
}
|
||||
/// <summary>
|
||||
/// verifico se sia un valore compreso nell'elenco fornito
|
||||
/// </summary>
|
||||
private void isValore()
|
||||
{
|
||||
if (_tabValori.ContainsKey(txtInput.Text)) // verifico se il comando digitato esista...
|
||||
{
|
||||
comando.isValid = true;
|
||||
comando.valore = txtInput.Text;
|
||||
_tabValori.TryGetValue(txtInput.Text, out comando.valoreTrad);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se il comando inserito sia valido
|
||||
/// </summary>
|
||||
private void isInputEvent()
|
||||
{
|
||||
if (_comandi.ContainsKey(txtInput.Text)) // verifico se il comando digitato esista...
|
||||
{
|
||||
comando.isValid = true;
|
||||
// salvo comando precedente (se c'è...)
|
||||
comando.prevCmdIn = comando.currCmdIn;
|
||||
comando.descrComandoPrev = comando.descrComando;
|
||||
comando.currCmdIn = txtInput.Text;
|
||||
_comandi.TryGetValue(txtInput.Text, out comando.descrComando);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica quale browser usato e applica css corretto al div attorno al box
|
||||
/// </summary>
|
||||
private void DetectAgent()
|
||||
{
|
||||
System.Web.HttpBrowserCapabilities browser = Request.Browser;
|
||||
if (browser.Browser == "IE")
|
||||
{
|
||||
pnlBarcodeBox.CssClass = "barcodeBoxIE";
|
||||
}
|
||||
else
|
||||
{
|
||||
pnlBarcodeBox.CssClass = "barcodeBoxOther";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
/// <summary>
|
||||
/// effettua al ettura da sessione del comando cliccato e lo inserisce come fosse barcode
|
||||
/// </summary>
|
||||
public void loadBtnClickComando()
|
||||
{
|
||||
txtInput.Text = memLayer.ML.StringSessionObj("btnCmdPress");
|
||||
memLayer.ML.emptySessionVal("btnCmdPress");
|
||||
processInput();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// elenco dei comandi riconosciuti
|
||||
/// </summary>
|
||||
public Dictionary<string, string> comandiAmmessi
|
||||
{
|
||||
get
|
||||
{
|
||||
return _comandi;
|
||||
}
|
||||
set
|
||||
{
|
||||
_comandi = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// tabella di valori ammissibili
|
||||
/// </summary>
|
||||
public Dictionary<string, string> tabValori
|
||||
{
|
||||
get
|
||||
{
|
||||
return _tabValori;
|
||||
}
|
||||
set
|
||||
{
|
||||
_tabValori = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// evento comando registrato
|
||||
/// </summary>
|
||||
public event EventHandler eh_comandoRegistrato;
|
||||
/// <summary>
|
||||
/// comando registrato dal barcode
|
||||
/// </summary>
|
||||
public inputComando comandoRegistrato
|
||||
{
|
||||
get
|
||||
{
|
||||
return comando;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// scrive nella label input
|
||||
/// </summary>
|
||||
public string txtInput2show
|
||||
{
|
||||
set
|
||||
{
|
||||
lblInput.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// scrive nella label valore
|
||||
/// </summary>
|
||||
public string txtVal2show
|
||||
{
|
||||
set
|
||||
{
|
||||
lblValore.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// scrive nella label richiesta
|
||||
/// </summary>
|
||||
public string txtRich2show
|
||||
{
|
||||
set
|
||||
{
|
||||
lblRichiesta.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// reset del controllo
|
||||
/// </summary>
|
||||
public void resetMe()
|
||||
{
|
||||
comando = new inputComando();
|
||||
txtInput2show = "Prego inserire barcode";
|
||||
txtVal2show = "";
|
||||
txtRich2show = "";
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione termini
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4963
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace XPST.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_barcode {
|
||||
|
||||
/// <summary>
|
||||
/// txtInput control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtInput;
|
||||
|
||||
/// <summary>
|
||||
/// pnlBarcodeBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel pnlBarcodeBox;
|
||||
|
||||
/// <summary>
|
||||
/// lblInput control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblInput;
|
||||
|
||||
/// <summary>
|
||||
/// lblValore control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblValore;
|
||||
|
||||
/// <summary>
|
||||
/// lblRichiesta control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblRichiesta;
|
||||
|
||||
/// <summary>
|
||||
/// lblBrowser control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblBrowser;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_btnComandi.ascx.cs"
|
||||
Inherits="XPST.WebUserControls.mod_btnComandi" %>
|
||||
<div id="1" class="quadro1">
|
||||
<asp:Button ID="btn1" runat="server" CssClass="btnBarcodeBigWide1" OnClick="btn1_Click" />
|
||||
</div>
|
||||
<div id="2" class="quadro2">
|
||||
<asp:Button ID="btn2" runat="server" CssClass="btnBarcodeBigWide2" OnClick="btn2_Click" />
|
||||
</div>
|
||||
<div style="clear: both;" height="0px">
|
||||
</div>
|
||||
<div id="3" class="quadro3">
|
||||
<asp:Button ID="btn3" runat="server" CssClass="btnBarcodeBigWide3" OnClick="btn3_Click" />
|
||||
</div>
|
||||
<div id="4" class="quadro4">
|
||||
<asp:Button ID="btn4" runat="server" CssClass="btnBarcodeBigWide4" OnClick="btn4_Click" Visible="false" />
|
||||
</div>
|
||||
<div style="clear: both;" height="0px">
|
||||
</div>
|
||||
<div id="Div1" class="quadro5">
|
||||
<asp:Button ID="btn5" runat="server" CssClass="btnBarcodeBigWide5" OnClick="btn5_Click" />
|
||||
</div>
|
||||
<div id="Div2" class="quadro6">
|
||||
<asp:Button ID="btn6" runat="server" CssClass="btnBarcodeBigWide6" OnClick="btn6_Click" />
|
||||
</div>
|
||||
@@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using XPS_data;
|
||||
|
||||
namespace XPST.WebUserControls
|
||||
{
|
||||
public partial class mod_btnComandi : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// evento comando clicked
|
||||
/// </summary>
|
||||
public event EventHandler eh_clickComando;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
setupComandiBarcode();
|
||||
disegnaBtn();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua disegno dei buttons
|
||||
/// </summary>
|
||||
private void disegnaBtn()
|
||||
{
|
||||
// carico i comandi nei buttons
|
||||
btn1.Text = comandiAmmessi["04"];
|
||||
btn2.Text = comandiAmmessi["05"];
|
||||
btn3.Text = comandiAmmessi["06"];
|
||||
btn5.Text = comandiAmmessi["ok"];
|
||||
btn6.Text = comandiAmmessi["ko"];
|
||||
}
|
||||
/// <summary>
|
||||
/// carico da tab i comandi ammessi per il barcode...
|
||||
/// </summary>
|
||||
private void setupComandiBarcode()
|
||||
{
|
||||
XPS_data.DS_applicazioneTableAdapters.TraEv2StatiTableAdapter taTrEv2St = new XPS_data.DS_applicazioneTableAdapters.TraEv2StatiTableAdapter();
|
||||
DS_applicazione.TraEv2StatiDataTable _tabTran = taTrEv2St.getByCodMappa("E_BC");
|
||||
Dictionary<string, string> comandi = new Dictionary<string, string>();
|
||||
foreach (DS_applicazione.TraEv2StatiRow riga in _tabTran)
|
||||
{
|
||||
comandi.Add(riga.CodEvento, user_std.UtSn.Traduci(riga.text2show));
|
||||
}
|
||||
// impongo i comandi al barcode...
|
||||
comandiAmmessi = comandi;
|
||||
}
|
||||
/// <summary>
|
||||
/// dictionary comandi ammessi
|
||||
/// </summary>
|
||||
protected Dictionary<string, string> _comandi = new Dictionary<string, string>();
|
||||
/// <summary>
|
||||
/// elenco dei comandi riconosciuti
|
||||
/// </summary>
|
||||
public Dictionary<string, string> comandiAmmessi
|
||||
{
|
||||
get
|
||||
{
|
||||
return _comandi;
|
||||
}
|
||||
set
|
||||
{
|
||||
_comandi = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// segnala click su button comando
|
||||
/// </summary>
|
||||
public void segnalaClick()
|
||||
{
|
||||
if (eh_clickComando != null)
|
||||
{
|
||||
eh_clickComando(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
protected void btn1_Click(object sender, EventArgs e)
|
||||
{
|
||||
memLayer.ML.setSessionVal("btnCmdPress", "04", false);
|
||||
segnalaClick();
|
||||
}
|
||||
protected void btn2_Click(object sender, EventArgs e)
|
||||
{
|
||||
memLayer.ML.setSessionVal("btnCmdPress", "05", false);
|
||||
segnalaClick();
|
||||
}
|
||||
protected void btn3_Click(object sender, EventArgs e)
|
||||
{
|
||||
memLayer.ML.setSessionVal("btnCmdPress", "06", false);
|
||||
segnalaClick();
|
||||
}
|
||||
protected void btn4_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
protected void btn5_Click(object sender, EventArgs e)
|
||||
{
|
||||
memLayer.ML.setSessionVal("btnCmdPress", "ok", false);
|
||||
segnalaClick();
|
||||
}
|
||||
protected void btn6_Click(object sender, EventArgs e)
|
||||
{
|
||||
memLayer.ML.setSessionVal("btnCmdPress", "ko", false);
|
||||
segnalaClick();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4963
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace XPST.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_btnComandi {
|
||||
|
||||
/// <summary>
|
||||
/// btn1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btn1;
|
||||
|
||||
/// <summary>
|
||||
/// btn2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btn2;
|
||||
|
||||
/// <summary>
|
||||
/// btn3 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btn3;
|
||||
|
||||
/// <summary>
|
||||
/// btn4 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btn4;
|
||||
|
||||
/// <summary>
|
||||
/// btn5 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btn5;
|
||||
|
||||
/// <summary>
|
||||
/// btn6 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btn6;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_currentTask.ascx.cs"
|
||||
Inherits="XPST.WebUserControls.mod_currentTask" %>
|
||||
<div id="title" class="taskBanner">
|
||||
<div style="float: left;">
|
||||
<asp:Label ID="lblTask" runat="server" Text="...wait..." Font-Size="XX-Small" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<asp:Label ID="lblDateTime" runat="server" Text="" Font-Size="XX-Small" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
|
||||
namespace XPST.WebUserControls
|
||||
{
|
||||
public partial class mod_currentTask : System.Web.UI.UserControl
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// wrapper traduzione termini
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
string task = memLayer.ML.StringSessionObj("activeTask");
|
||||
if (task == "")
|
||||
{
|
||||
task = "..." + traduci("waiting") + "...";
|
||||
}
|
||||
lblTask.Text = task;
|
||||
setClock();
|
||||
}
|
||||
|
||||
private void setClock()
|
||||
{
|
||||
lblDateTime.Text = DateTime.Now.ToString("HH:mm:ss");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4963
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace XPST.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_currentTask {
|
||||
|
||||
/// <summary>
|
||||
/// lblTask control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblTask;
|
||||
|
||||
/// <summary>
|
||||
/// lblDateTime control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblDateTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_menuTopCompact.ascx.cs" Inherits="XPST.WebUserControls.mod_menuTopCompact" %>
|
||||
<div id="titleGMW" style="margin: 0px 0px 0px 0px; background-color: #6666FF; text-align: center;">
|
||||
<asp:Label ID="lblTitolo" runat="server" Text="" Style="color: #FFFFFF; font-size:10pt"/>
|
||||
</div>
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
|
||||
namespace XPST.WebUserControls
|
||||
{
|
||||
public partial class mod_menuTopCompact : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
string operatore = "";
|
||||
try
|
||||
{
|
||||
operatore = user_std.UtSn.CognomeNome;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// rimando a login...
|
||||
Response.Redirect("~/Default.aspx");
|
||||
}
|
||||
if (operatore != "")
|
||||
{
|
||||
lblTitolo.Text = string.Format("{0} - {1}", traduci(memLayer.ML.confReadString("titleApp")), operatore);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblTitolo.Text = traduci(memLayer.ML.confReadString("titleApp"));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// wrapper traduzione termini
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4963
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace XPST.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_menuTopCompact {
|
||||
|
||||
/// <summary>
|
||||
/// lblTitolo control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblTitolo;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user