Completato logout e ritorno home x liste prelievo
git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@197 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
@@ -166,7 +166,11 @@ namespace GMW_Term.WebUserControls
|
||||
eh_resetUser(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// va alla pagina dei buttons principale
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnButtonsHome_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect("Home.aspx");
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
Inherits="GMW_Term.WebUserControls.mod_listePrelievo" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
||||
<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc1" %>
|
||||
<asp:ScriptManager ID="ScriptManager1" runat="server">
|
||||
</asp:ScriptManager>
|
||||
<div id="contenuto" style="text-align: center;">
|
||||
<div id="InputTitle">
|
||||
<asp:Label ID="lblInput" runat="server" Text="Liste Prelievo" /></div>
|
||||
@@ -9,8 +11,6 @@
|
||||
<uc1:mod_periodoAnalisi ID="mod_periodoAnalisi1" runat="server" />
|
||||
</div>
|
||||
<div id="smallGrid">
|
||||
<asp:ScriptManager ID="ScriptManager1" runat="server">
|
||||
</asp:ScriptManager>
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
|
||||
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
|
||||
DataKeyNames="CodLista" DataSourceID="ods" OnRowUpdating="grView_RowUpdating">
|
||||
@@ -94,7 +94,7 @@
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<div id="Button">
|
||||
<asp:Button ID="btn1" runat="server" Text="Button" />
|
||||
<asp:Button ID="btn2" runat="server" Text="Button" />
|
||||
<asp:Button ID="btnLoginPage" runat="server" OnClick="btnLoginPage_Click" Width="100px" />
|
||||
<asp:Button ID="btnButtonsHome" runat="server" OnClick="btnButtonsHome_Click" Width="100px" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -242,7 +242,49 @@ namespace GMW_Term.WebUserControls
|
||||
|
||||
#endregion
|
||||
|
||||
#region area codice variabile
|
||||
|
||||
// variabile per verificare se è operatore
|
||||
bool _validUserInSession = false;
|
||||
/// <summary>
|
||||
/// Verifica se c'è un valore in sessione di tipo operatore
|
||||
/// </summary>
|
||||
protected void verificaOperatoreInSessione()
|
||||
{
|
||||
if (string.IsNullOrEmpty(user_std.UtSn.utente))
|
||||
{
|
||||
_validUserInSession = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
_validUserInSession = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// metodi al caricamento della pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// scrive label e text bottoni
|
||||
btnLoginPage.Text = "[7]-LogOut";
|
||||
btnLoginPage.AccessKey = "7";
|
||||
btnButtonsHome.Text = "[9]-Home";
|
||||
btnButtonsHome.AccessKey = "9";
|
||||
// se username è valorizzato...
|
||||
verificaOperatoreInSessione();
|
||||
if (_validUserInSession)
|
||||
{
|
||||
btnLoginPage.Visible = true;
|
||||
btnButtonsHome.Visible = true;
|
||||
}
|
||||
// se non è valorizzato chiede di effettuare login...
|
||||
else
|
||||
{
|
||||
Response.Redirect("Home.aspx");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// verifica complessiva non esistenza record child
|
||||
@@ -573,6 +615,27 @@ namespace GMW_Term.WebUserControls
|
||||
return traduci(codice.ToString());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// effettua logout...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnLoginPage_Click(object sender, EventArgs e)
|
||||
{
|
||||
user_std.UtSn.logOffUtente();
|
||||
Response.Redirect("Barcode.aspx");
|
||||
}
|
||||
/// <summary>
|
||||
/// va alla pagina dei buttons principale
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnButtonsHome_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect("Home.aspx");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+13
-13
@@ -13,6 +13,15 @@ namespace GMW_Term.WebUserControls {
|
||||
|
||||
public partial class mod_listePrelievo {
|
||||
|
||||
/// <summary>
|
||||
/// ScriptManager1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.ScriptManager ScriptManager1;
|
||||
|
||||
/// <summary>
|
||||
/// lblInput control.
|
||||
/// </summary>
|
||||
@@ -31,15 +40,6 @@ namespace GMW_Term.WebUserControls {
|
||||
/// </remarks>
|
||||
protected global::mod_periodoAnalisi mod_periodoAnalisi1;
|
||||
|
||||
/// <summary>
|
||||
/// ScriptManager1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.ScriptManager ScriptManager1;
|
||||
|
||||
/// <summary>
|
||||
/// grView control.
|
||||
/// </summary>
|
||||
@@ -77,21 +77,21 @@ namespace GMW_Term.WebUserControls {
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
|
||||
|
||||
/// <summary>
|
||||
/// btn1 control.
|
||||
/// btnLoginPage 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;
|
||||
protected global::System.Web.UI.WebControls.Button btnLoginPage;
|
||||
|
||||
/// <summary>
|
||||
/// btn2 control.
|
||||
/// btnButtonsHome 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;
|
||||
protected global::System.Web.UI.WebControls.Button btnButtonsHome;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user