Irrobustito login e barcode
Aggiunta pagina vuota x task attivi git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@181 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/Compact.Master"
|
||||
AutoEventWireup="true" CodeBehind="ActiveTask.aspx.cs" Inherits="GMW_Term.ActiveTask" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
w.i.p.
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace GMW_Term
|
||||
{
|
||||
public partial class ActiveTask : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+16
@@ -0,0 +1,16 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GMW_Term {
|
||||
|
||||
|
||||
public partial class ActiveTask {
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,13 @@
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ActiveTask.aspx.cs">
|
||||
<DependentUpon>ActiveTask.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ActiveTask.aspx.designer.cs">
|
||||
<DependentUpon>ActiveTask.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Default.aspx.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -74,13 +81,6 @@
|
||||
<Compile Include="WebUserControls\mod_barcode.ascx.designer.cs">
|
||||
<DependentUpon>mod_barcode.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_changeUser.ascx.cs">
|
||||
<DependentUpon>mod_changeUser.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_changeUser.ascx.designer.cs">
|
||||
<DependentUpon>mod_changeUser.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_home.ascx.cs">
|
||||
<DependentUpon>mod_home.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -134,13 +134,6 @@
|
||||
<Compile Include="Barcode.aspx.designer.cs">
|
||||
<DependentUpon>Barcode.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ChangeUser.aspx.cs">
|
||||
<DependentUpon>ChangeUser.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ChangeUser.aspx.designer.cs">
|
||||
<DependentUpon>ChangeUser.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Home.aspx.cs">
|
||||
<DependentUpon>Home.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -179,9 +172,9 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ActiveTask.aspx" />
|
||||
<Content Include="Default.aspx" />
|
||||
<Content Include="WebUserControls\mod_barcode.ascx" />
|
||||
<Content Include="WebUserControls\mod_changeUser.ascx" />
|
||||
<Content Include="WebUserControls\mod_home.ascx" />
|
||||
<Content Include="WebUserControls\mod_listePrelievo.ascx" />
|
||||
<Content Include="WebUserControls\mod_login.ascx" />
|
||||
@@ -190,7 +183,6 @@
|
||||
<Content Include="WebUserControls\mod_userBar.ascx" />
|
||||
<Content Include="WS\AutoCompletamento.asmx" />
|
||||
<Content Include="Barcode.aspx" />
|
||||
<Content Include="ChangeUser.aspx" />
|
||||
<Content Include="Home.aspx" />
|
||||
<Content Include="ListePrelievo.aspx" />
|
||||
<Content Include="Login.aspx" />
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title></title>
|
||||
<title>GMW Terminus</title>
|
||||
<asp:ContentPlaceHolder ID="head" runat="server">
|
||||
</asp:ContentPlaceHolder>
|
||||
<link href="../Style.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace GMW_Term.WebUserControls
|
||||
public partial class mod_barcode : System.Web.UI.UserControl
|
||||
{
|
||||
// variabile per verificare se è operatore
|
||||
bool _isOperatore = false;
|
||||
bool _validUserInSession = false;
|
||||
/// <summary>
|
||||
/// metodi al caricamento della pagina
|
||||
/// </summary>
|
||||
@@ -24,10 +24,9 @@ namespace GMW_Term.WebUserControls
|
||||
|
||||
btnLoginPage.Text = "Login";
|
||||
btnButtonsHome.Text = "Home";
|
||||
|
||||
|
||||
// se username è valorizzato...
|
||||
if (verificaOperatoreInSessione())
|
||||
verificaOperatoreInSessione();
|
||||
if (_validUserInSession)
|
||||
{
|
||||
btnLoginPage.Text = "Rifai Login";
|
||||
btnLoginPage.Visible = false;
|
||||
@@ -54,8 +53,8 @@ namespace GMW_Term.WebUserControls
|
||||
string dataIn = txtInput.Text.Trim();
|
||||
// verifica l'input immesso
|
||||
tipoCodiceBarcode answ = TermClass.Ter.riconosciBarcode(dataIn);
|
||||
|
||||
if (!verificaOperatoreInSessione()) //controllo: se non c'è operatore in sessione
|
||||
verificaOperatoreInSessione();
|
||||
if (!_validUserInSession) //controllo: se non c'è operatore in sessione
|
||||
{
|
||||
if (answ == tipoCodiceBarcode.Operatore)
|
||||
{
|
||||
@@ -63,7 +62,8 @@ namespace GMW_Term.WebUserControls
|
||||
}
|
||||
else
|
||||
{
|
||||
lblData.Text = "Inserire Operatore!";
|
||||
lblData.Text = string.Format("Codice non riconosciuto: {0}{1}Inserire Operatore!", txtInput.Text, Environment.NewLine);
|
||||
txtInput.Text = "";
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -72,20 +72,26 @@ namespace GMW_Term.WebUserControls
|
||||
{
|
||||
case tipoCodiceBarcode.ND:
|
||||
lblData.Text = "Codice non riconosciuto: " + txtInput.Text;
|
||||
txtInput.Text = "";
|
||||
break;
|
||||
case tipoCodiceBarcode.Operatore:
|
||||
effettuaLoginOperatore(dataIn);
|
||||
break;
|
||||
case tipoCodiceBarcode.ListaPrelievo:
|
||||
lblData.Text = "Codice Lista Prelievo: " + txtInput.Text;
|
||||
txtInput.Text = "";
|
||||
break;
|
||||
case tipoCodiceBarcode.UDC:
|
||||
lblData.Text = "Codice UDC: " + txtInput.Text;
|
||||
txtInput.Text = "";
|
||||
break;
|
||||
case tipoCodiceBarcode.Particolare:
|
||||
lblData.Text = "Codice Particolare: " + txtInput.Text;
|
||||
txtInput.Text = "";
|
||||
break;
|
||||
default:
|
||||
lblData.Text = "Codice non riconosciuto: " + txtInput.Text;
|
||||
txtInput.Text = "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -123,18 +129,16 @@ namespace GMW_Term.WebUserControls
|
||||
/// <summary>
|
||||
/// Verifica se c'è un valore in sessione di tipo operatore
|
||||
/// </summary>
|
||||
protected bool verificaOperatoreInSessione()
|
||||
protected void verificaOperatoreInSessione()
|
||||
{
|
||||
if (string.IsNullOrEmpty(memLayer.ML.StringSessionObj("username")))
|
||||
if (string.IsNullOrEmpty(user_std.UtSn.utente))
|
||||
{
|
||||
_isOperatore = false;
|
||||
_validUserInSession = false;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
_isOperatore = true;
|
||||
_validUserInSession = true;
|
||||
}
|
||||
return _isOperatore;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -144,12 +148,11 @@ namespace GMW_Term.WebUserControls
|
||||
{
|
||||
set
|
||||
{
|
||||
_isOperatore = value;
|
||||
_validUserInSession = value;
|
||||
}
|
||||
|
||||
get
|
||||
{
|
||||
return _isOperatore;
|
||||
return _validUserInSession;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace GMW_Term.WebUserControls
|
||||
btn1.Text = "Barcode";
|
||||
btn2.Text = "Ricerca";
|
||||
btn3.Text = "Liste Prelievo";
|
||||
btn4.Text = "Cambia Utente";
|
||||
btn4.Text = "Task Attivi";
|
||||
}
|
||||
|
||||
protected void btn1_Click(object sender, EventArgs e)
|
||||
@@ -37,7 +37,7 @@ namespace GMW_Term.WebUserControls
|
||||
|
||||
protected void btn4_Click1(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect("ChangeUser.aspx");
|
||||
Response.Redirect("ActiveTask.aspx");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user