revisione jumper x MAG (NON completata)
This commit is contained in:
@@ -244,6 +244,7 @@ namespace MP_MAG
|
||||
|
||||
/// <summary>
|
||||
/// Dati correnti di produzione
|
||||
/// FixMe Todo !!! : DA RIVEDERE: NON Può essere a livello redis condiviso se diverse postazioni...
|
||||
/// </summary>
|
||||
public prodData currProdData
|
||||
{
|
||||
|
||||
@@ -306,6 +306,13 @@
|
||||
<Compile Include="SMART\EnrollDevice.aspx.designer.cs">
|
||||
<DependentUpon>EnrollDevice.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SMART\jumper.ascx.cs">
|
||||
<DependentUpon>jumper.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SMART\jumper.ascx.designer.cs">
|
||||
<DependentUpon>jumper.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SMART\login.aspx.cs">
|
||||
<DependentUpon>login.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -334,6 +341,13 @@
|
||||
<Compile Include="SMART\SmartStarter.aspx.designer.cs">
|
||||
<DependentUpon>SmartStarter.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SMART\tryLogin.aspx.cs">
|
||||
<DependentUpon>tryLogin.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SMART\tryLogin.aspx.designer.cs">
|
||||
<DependentUpon>tryLogin.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_activeParams.ascx.cs">
|
||||
<DependentUpon>cmp_activeParams.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -726,10 +740,12 @@
|
||||
<Content Include="Reports\queueConf.json" />
|
||||
<Content Include="SMART\Default.aspx" />
|
||||
<Content Include="SMART\EnrollDevice.aspx" />
|
||||
<Content Include="SMART\jumper.ascx" />
|
||||
<Content Include="SMART\login.aspx" />
|
||||
<Content Include="SMART\packList.aspx" />
|
||||
<Content Include="SMART\PLScanner.aspx" />
|
||||
<Content Include="SMART\SmartStarter.aspx" />
|
||||
<Content Include="SMART\tryLogin.aspx" />
|
||||
<Content Include="WebUserControls\cmp_activeParams.ascx" />
|
||||
<Content Include="WebUserControls\cmp_barcode.ascx" />
|
||||
<Content Include="SMART\elencoLotti.aspx" />
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="jumper.ascx.cs" Inherits="MP_MAG.SMART.jumper" %>
|
||||
@@ -0,0 +1,57 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MP_MAG.SMART
|
||||
{
|
||||
public partial class jumper : System.Web.UI.UserControl
|
||||
{
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
int MatrOpr = memLayer.ML.QSI("MatrOpr");
|
||||
// salvo in cookie i dati idxODL, idxMacchina e QtaUdc x successivo impiego
|
||||
int IdxODL = memLayer.ML.QSI("IdxODL");
|
||||
string IdxMacchina = memLayer.ML.QSS("IdxMacchina");
|
||||
int QtaUdc = memLayer.ML.QSI("QtaUdc");
|
||||
MagData.prodPrintData newProdPrintData = new MagData.prodPrintData(MatrOpr, IdxODL, IdxMacchina, QtaUdc);
|
||||
// salvo in oggetto dedicato...
|
||||
MagData.MagDataLayer.man.currProdPrintData = newProdPrintData;
|
||||
|
||||
// se l'operatore in sessione è DIVERSO da quello appena inviato --> effettuo NUOVO login
|
||||
if (MatrOpr == memLayer.ML.IntSessionObj("MatrOpr"))
|
||||
{
|
||||
// rimando a pagina di stampa.. secondo tipo finiti / semilavorati
|
||||
// FARE!!! verifica SL/FI (NON E' ancora implementato davvero
|
||||
string tgtPage = newProdPrintData.isProdFinito ? "prtFiniti" : "prtSemilav";
|
||||
Response.Redirect(tgtPage);
|
||||
}
|
||||
else
|
||||
{
|
||||
// elimino precedenti cookie e valori utente...
|
||||
memLayer.ML.emptySessionVal("MatrOpr");
|
||||
memLayer.ML.emptySessionVal("UserAuthKey");
|
||||
string UserAuthKey = memLayer.ML.QSS("UserAuthKey");
|
||||
user_std.UtSn.logOffUtente();
|
||||
memLayer.ML.emptyCookieVal(memLayer.ML.CRS("cookieName"));
|
||||
|
||||
// salvo in sessione i dati x successivo impiego login...
|
||||
if (MatrOpr >= 0 && !string.IsNullOrEmpty(UserAuthKey))
|
||||
{
|
||||
// salvo in sessione
|
||||
memLayer.ML.setSessionVal("MatrOpr", MatrOpr);
|
||||
memLayer.ML.setSessionVal("UserAuthKey", UserAuthKey);
|
||||
}
|
||||
// redirect x login...
|
||||
Response.Redirect("tryLogin");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
Generated
+16
@@ -0,0 +1,16 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace MP_MAG.SMART
|
||||
{
|
||||
public partial class jumper
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="tryLogin.aspx.cs" Inherits="MP_MAG.SMART.tryLogin" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControls/mod_enrollByJumperAuthKey.ascx" TagPrefix="uc1" TagName="mod_enrollByJumperAuthKey" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
<uc1:mod_enrollByJumperAuthKey runat="server" ID="mod_enrollByJumperAuthKey" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MP_MAG.SMART
|
||||
{
|
||||
public partial class tryLogin : System.Web.UI.Page
|
||||
{
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
Generated
+35
@@ -0,0 +1,35 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MP_MAG.SMART
|
||||
{
|
||||
|
||||
|
||||
public partial class tryLogin
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo form1.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_enrollByJumperAuthKey.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MP_MAG.WebUserControls.mod_enrollByJumperAuthKey mod_enrollByJumperAuthKey;
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,28 @@ namespace MagData
|
||||
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dati Prod e Print correnti x sessione utente salvati come cookie
|
||||
/// </summary>
|
||||
public prodPrintData currProdPrintData
|
||||
{
|
||||
set
|
||||
{
|
||||
string rawData = JsonConvert.SerializeObject(value);
|
||||
memLayer.ML.setSessionVal("currProdPrintData", rawData, true);
|
||||
}
|
||||
get
|
||||
{
|
||||
prodPrintData answ = new prodPrintData();
|
||||
string rawData = memLayer.ML.StringSessionObj("currProdPrintData");
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
answ = JsonConvert.DeserializeObject<prodPrintData>(rawData);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce un array JSon x le conf delle code di stampa leggendo dal file
|
||||
/// </summary>
|
||||
|
||||
+179
-61
@@ -6,69 +6,187 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace MagData
|
||||
{
|
||||
/// <summary>
|
||||
/// Valori decodificati
|
||||
/// </summary>
|
||||
public class decodedData
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Codice decodificato
|
||||
/// </summary>
|
||||
public string code { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice decodificato in formato INT
|
||||
/// </summary>
|
||||
public int codeInt { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Tipo codice decodificato
|
||||
/// </summary>
|
||||
public codeType codeType { get; set; } = codeType.UNK;
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione associata
|
||||
/// </summary>
|
||||
public string description { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Dato letto RAW
|
||||
/// </summary>
|
||||
public string rawData { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Valori decodificati
|
||||
/// </summary>
|
||||
public class decodedData
|
||||
{
|
||||
/// <summary>
|
||||
/// Tipo codice decodificato
|
||||
/// Oggetto dei dati di produzione attuali (per serializzazione json)
|
||||
/// </summary>
|
||||
public codeType codeType { get; set; } = codeType.UNK;
|
||||
public class prodData
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Cod Cliente corrente
|
||||
/// </summary>
|
||||
public string CodCli { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Cod operatore corrente
|
||||
/// </summary>
|
||||
public string CodOpr { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Cod Postazione corrente
|
||||
/// </summary>
|
||||
public string CodPost { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Cod Articolo corrente
|
||||
/// </summary>
|
||||
public string CurrArtCod { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione Articolo corrente
|
||||
/// </summary>
|
||||
public string CurrArtDesc { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice ODL corrente
|
||||
/// </summary>
|
||||
public string CurrODL { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Coda di stampa attiva
|
||||
/// </summary>
|
||||
public string PrintQueue { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice riferimento esterno produzione
|
||||
/// </summary>
|
||||
public string RifExt { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Codice decodificato
|
||||
/// Oggetto dei dati di produzione e stampa attuali (per serializzazione json)
|
||||
/// </summary>
|
||||
public string code { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Codice decodificato in formato INT
|
||||
/// </summary>
|
||||
public int codeInt { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Descrizione associata
|
||||
/// </summary>
|
||||
public string description { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Dato letto RAW
|
||||
/// </summary>
|
||||
public string rawData { get; set; } = "";
|
||||
}
|
||||
/// <summary>
|
||||
/// Oggetto dei dati di produzione attuali (per serializzazione json)
|
||||
/// </summary>
|
||||
public class prodData
|
||||
{
|
||||
/// <summary>
|
||||
/// Cod Cliente corrente
|
||||
/// </summary>
|
||||
public string CodCli { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Cod operatore corrente
|
||||
/// </summary>
|
||||
public string CodOpr { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Cod Postazione corrente
|
||||
/// </summary>
|
||||
public string CodPost { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Cod Articolo corrente
|
||||
/// </summary>
|
||||
public string CurrArtCod { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Descrizione Articolo corrente
|
||||
/// </summary>
|
||||
public string CurrArtDesc { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Codice ODL corrente
|
||||
/// </summary>
|
||||
public string CurrODL { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Codice riferimento esterno produzione
|
||||
/// </summary>
|
||||
public string RifExt { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Coda di stampa attiva
|
||||
/// </summary>
|
||||
public string PrintQueue { get; set; } = "";
|
||||
}
|
||||
}
|
||||
public class prodPrintData
|
||||
{
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Cod operatore corrente
|
||||
/// </summary>
|
||||
public string CodOpr { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Cod Postazione corrente
|
||||
/// </summary>
|
||||
public string CodPost { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Codice ODL corrente
|
||||
/// </summary>
|
||||
public string CurrODL { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Cod Articolo corrente
|
||||
/// </summary>
|
||||
public string CurrArtCod { get; set; } = "ToDo";
|
||||
/// <summary>
|
||||
/// Descrizione Articolo corrente
|
||||
/// </summary>
|
||||
public string CurrArtDesc { get; set; } = "ToDo";
|
||||
/// <summary>
|
||||
/// Cod Cliente corrente
|
||||
/// </summary>
|
||||
public string CodCli { get; set; } = "ToDo";
|
||||
/// <summary>
|
||||
/// Codice riferimento esterno produzione
|
||||
/// </summary>
|
||||
public string RifExt { get; set; } = "ToDo";
|
||||
#endif
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Inizializzazione oggetto
|
||||
/// </summary>
|
||||
/// <param name="MatrOpr"></param>
|
||||
/// <param name="IdxOdl"></param>
|
||||
/// <param name="IdxMacchina"></param>
|
||||
/// <param name="QtaUdc"></param>
|
||||
public prodPrintData(int MatrOpr, int IdxOdl, string IdxMacchina, int QtaUdc)
|
||||
{
|
||||
this.MatrOpr = MatrOpr;
|
||||
this.IdxOdl = IdxOdl;
|
||||
this.IdxMacchina = IdxMacchina;
|
||||
this.QtaUdc = QtaUdc;
|
||||
}
|
||||
|
||||
public prodPrintData()
|
||||
{
|
||||
this.MatrOpr = 0;
|
||||
this.IdxOdl = 0;
|
||||
this.IdxMacchina = "";
|
||||
this.QtaUdc = 1;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Codice macchina selezionata
|
||||
/// </summary>
|
||||
public string IdxMacchina { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Codice ODL corrente
|
||||
/// </summary>
|
||||
public int IdxOdl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indica se si tratta di un FINITO (cs semilavorato)
|
||||
/// FIXME TODO FARE !!!!
|
||||
/// </summary>
|
||||
public bool isProdFinito { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Matricola Operatore
|
||||
/// </summary>
|
||||
public int MatrOpr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Coda di stampa attiva
|
||||
/// </summary>
|
||||
public string PrintQueue { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Quantità standard x stampa UDC
|
||||
/// </summary>
|
||||
public int QtaUdc { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user