Merge branch 'release/FixDataLayerSingleton'
This commit is contained in:
@@ -83,7 +83,7 @@ namespace AppData
|
||||
/// <summary>
|
||||
/// avvio classe
|
||||
/// </summary>
|
||||
protected dataLayer()
|
||||
public dataLayer()
|
||||
{
|
||||
avvioTA();
|
||||
setupConnectionStringBase();
|
||||
|
||||
Binary file not shown.
+96
-96
@@ -3,107 +3,107 @@ using System.Text.RegularExpressions;
|
||||
|
||||
namespace AppData
|
||||
{
|
||||
/// <summary>
|
||||
/// macchina di gestione degli stati
|
||||
/// </summary>
|
||||
public class stateMachine
|
||||
{
|
||||
/// <summary>
|
||||
/// macchina di gestione degli stati
|
||||
/// </summary>
|
||||
public class stateMachine
|
||||
{
|
||||
|
||||
protected DS_AppTableAdapters.AnagEventiTableAdapter taEv;
|
||||
protected DS_AppTableAdapters.TraEv2StatiTableAdapter taEv2St;
|
||||
//protected DS_applicazioneTableAdapters.IstObjTableAdapter taIstObj;
|
||||
protected stateMachine()
|
||||
{
|
||||
avvioTA();
|
||||
setupConnectionStringBase();
|
||||
}
|
||||
/// <summary>
|
||||
/// avvia table adapters
|
||||
/// </summary>
|
||||
private void avvioTA()
|
||||
{
|
||||
taEv = new DS_AppTableAdapters.AnagEventiTableAdapter();
|
||||
taEv2St = new DS_AppTableAdapters.TraEv2StatiTableAdapter();
|
||||
//taIstObj = new DS_applicazioneTableAdapters.IstObjTableAdapter();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua setup dei connection strings da web.config della singola applicazione
|
||||
/// </summary>
|
||||
protected virtual void setupConnectionStringBase()
|
||||
{
|
||||
string connString = memLayer.ML.confReadString("CTrackConnectionString");
|
||||
// connections strings del db
|
||||
taEv.Connection.ConnectionString = connString;
|
||||
taEv2St.Connection.ConnectionString = connString;
|
||||
//taIstObj.Connection.ConnectionString = connString;
|
||||
}
|
||||
public static stateMachine st = new stateMachine();
|
||||
/// <summary>
|
||||
/// restituisce il tipo di comando associato...
|
||||
/// </summary>
|
||||
/// <param name="comando"></param>
|
||||
/// <returns></returns>
|
||||
public tipoAzione azioneComando(inputComando comando)
|
||||
{
|
||||
Match testNumTask = Regex.Match(comando.valore, mUtils.reNumTask);
|
||||
Match testOper = Regex.Match(comando.valore, mUtils.reCodOper);
|
||||
Match testPost = Regex.Match(comando.valore, mUtils.reCodPost);
|
||||
tipoAzione _azione = tipoAzione.noAct;
|
||||
// se è un SET OPR o POST è un azione IMPLICITA...
|
||||
if (testOper.Success || testPost.Success)
|
||||
{
|
||||
_azione = tipoAzione.esegui;
|
||||
}
|
||||
else if (testNumTask.Success)
|
||||
{
|
||||
_azione = tipoAzione.esegui;
|
||||
}
|
||||
else if (dataLayer.man.taAF.getByKey(comando.currCmdIn).Rows.Count > 0)
|
||||
{
|
||||
_azione = tipoAzione.esegui;
|
||||
}
|
||||
else
|
||||
{
|
||||
// altrimenti controllo azione
|
||||
string toDo = "";
|
||||
try
|
||||
protected DS_AppTableAdapters.AnagEventiTableAdapter taEv;
|
||||
protected DS_AppTableAdapters.TraEv2StatiTableAdapter taEv2St;
|
||||
//protected DS_applicazioneTableAdapters.IstObjTableAdapter taIstObj;
|
||||
protected stateMachine()
|
||||
{
|
||||
toDo = taEv.getByKey(comando.currCmdIn)[0].Action;
|
||||
avvioTA();
|
||||
setupConnectionStringBase();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
switch (toDo)
|
||||
/// <summary>
|
||||
/// avvia table adapters
|
||||
/// </summary>
|
||||
private void avvioTA()
|
||||
{
|
||||
case "ok":
|
||||
_azione = tipoAzione.conferma;
|
||||
break;
|
||||
case "ko":
|
||||
_azione = tipoAzione.annulla;
|
||||
break;
|
||||
case "act":
|
||||
_azione = tipoAzione.esegui;
|
||||
break;
|
||||
default:
|
||||
_azione = tipoAzione.noAct;
|
||||
break;
|
||||
taEv = new DS_AppTableAdapters.AnagEventiTableAdapter();
|
||||
taEv2St = new DS_AppTableAdapters.TraEv2StatiTableAdapter();
|
||||
//taIstObj = new DS_applicazioneTableAdapters.IstObjTableAdapter();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua setup dei connection strings da web.config della singola applicazione
|
||||
/// </summary>
|
||||
protected virtual void setupConnectionStringBase()
|
||||
{
|
||||
string connString = memLayer.ML.confReadString("CTrackConnectionString");
|
||||
// connections strings del db
|
||||
taEv.Connection.ConnectionString = connString;
|
||||
taEv2St.Connection.ConnectionString = connString;
|
||||
//taIstObj.Connection.ConnectionString = connString;
|
||||
}
|
||||
public static stateMachine st = new stateMachine();
|
||||
/// <summary>
|
||||
/// restituisce il tipo di comando associato...
|
||||
/// </summary>
|
||||
/// <param name="comando"></param>
|
||||
/// <returns></returns>
|
||||
public tipoAzione azioneComando(inputComando comando)
|
||||
{
|
||||
Match testNumTask = Regex.Match(comando.valore, mUtils.reNumTask);
|
||||
Match testOper = Regex.Match(comando.valore, mUtils.reCodOper);
|
||||
Match testPost = Regex.Match(comando.valore, mUtils.reCodPost);
|
||||
tipoAzione _azione = tipoAzione.noAct;
|
||||
// se è un SET OPR o POST è un azione IMPLICITA...
|
||||
if (testOper.Success || testPost.Success)
|
||||
{
|
||||
_azione = tipoAzione.esegui;
|
||||
}
|
||||
else if (testNumTask.Success)
|
||||
{
|
||||
_azione = tipoAzione.esegui;
|
||||
}
|
||||
else if (dataLayer.man.taAF.getByKey(comando.currCmdIn).Rows.Count > 0)
|
||||
{
|
||||
_azione = tipoAzione.esegui;
|
||||
}
|
||||
else
|
||||
{
|
||||
// altrimenti controllo azione
|
||||
string toDo = "";
|
||||
try
|
||||
{
|
||||
toDo = taEv.getByKey(comando.currCmdIn)[0].Action;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
switch (toDo)
|
||||
{
|
||||
case "ok":
|
||||
_azione = tipoAzione.conferma;
|
||||
break;
|
||||
case "ko":
|
||||
_azione = tipoAzione.annulla;
|
||||
break;
|
||||
case "act":
|
||||
_azione = tipoAzione.esegui;
|
||||
break;
|
||||
default:
|
||||
_azione = tipoAzione.noAct;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return _azione;
|
||||
}
|
||||
}
|
||||
return _azione;
|
||||
}
|
||||
}
|
||||
|
||||
public enum tipoAzione
|
||||
{
|
||||
annulla,
|
||||
conferma,
|
||||
esegui,
|
||||
noAct,
|
||||
setup
|
||||
}
|
||||
public enum tipoEsito
|
||||
{
|
||||
error,
|
||||
ok,
|
||||
undef
|
||||
}
|
||||
public enum tipoAzione
|
||||
{
|
||||
annulla,
|
||||
conferma,
|
||||
esegui,
|
||||
noAct,
|
||||
setup
|
||||
}
|
||||
public enum tipoEsito
|
||||
{
|
||||
error,
|
||||
ok,
|
||||
undef
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using AppData;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace C_TRACK
|
||||
{
|
||||
public class BasePage : System.Web.UI.Page
|
||||
{
|
||||
protected dataLayer DLMan = new dataLayer();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Newtonsoft.Json;
|
||||
using AppData;
|
||||
using Newtonsoft.Json;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -11,6 +12,8 @@ namespace C_TRACK
|
||||
{
|
||||
#region Public Events
|
||||
|
||||
protected dataLayer DLMan = new dataLayer();
|
||||
|
||||
/// <summary>
|
||||
/// Generico evento di richiesta refresh a aprent
|
||||
/// </summary>
|
||||
|
||||
@@ -550,6 +550,9 @@
|
||||
<Compile Include="barcode.aspx.designer.cs">
|
||||
<DependentUpon>barcode.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BasePage.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BaseUserControl.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Text.RegularExpressions;
|
||||
|
||||
namespace C_TRACK.WebUserControls
|
||||
{
|
||||
public partial class mod_addTask : System.Web.UI.UserControl
|
||||
public partial class mod_addTask : BaseUserControl
|
||||
{
|
||||
#region Public Events
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace C_TRACK.WebUserControls
|
||||
else if (testDelete.Success)
|
||||
{
|
||||
// creo...
|
||||
dataLayer.man.taTL.deleteQuery(NumTask);
|
||||
DLMan.taTL.deleteQuery(NumTask);
|
||||
// resetto!
|
||||
CodArticolo = "";
|
||||
NumTask = "";
|
||||
@@ -160,7 +160,7 @@ namespace C_TRACK.WebUserControls
|
||||
if (Quantita > 0 && !string.IsNullOrEmpty(CodArticolo) && !string.IsNullOrEmpty(NumTask) && (!confAddTaskReqTime || TimeEst > 0))
|
||||
{
|
||||
// creo...
|
||||
dataLayer.man.taTL.insertQuery(NumTask, CodArticolo, Quantita, TimeEst);
|
||||
DLMan.taTL.insertQuery(NumTask, CodArticolo, Quantita, TimeEst);
|
||||
// resetto!
|
||||
CodArticolo = "";
|
||||
NumTask = "";
|
||||
@@ -212,14 +212,14 @@ namespace C_TRACK.WebUserControls
|
||||
// non match con RegExp --> ricerca ESPLICITA, se abilitato ricerca estesa
|
||||
if (memLayer.ML.CRB("OptEnableMapoIn") && !(testCodArt.Success || testNumTask.Success))
|
||||
{
|
||||
var tabArt = dataLayer.man.taAnArt.getByKey(value);
|
||||
var tabArt = DLMan.taAnArt.getByKey(value);
|
||||
if (tabArt.Rows.Count > 0)
|
||||
{
|
||||
CodArticolo = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
var tabTask = dataLayer.man.taTL.getByKey(value);
|
||||
var tabTask = DLMan.taTL.getByKey(value);
|
||||
if (tabTask.Rows.Count > 0)
|
||||
{
|
||||
NumTask = value;
|
||||
|
||||
@@ -5,143 +5,143 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace C_TRACK.WebUserControls
|
||||
{
|
||||
public partial class mod_btnComandi : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Codice TASK corrente
|
||||
/// </summary>
|
||||
public string CurrNumTask
|
||||
public partial class mod_btnComandi : BaseUserControl
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("CurrNumTask");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("CurrNumTask", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// evento comando clicked
|
||||
/// </summary>
|
||||
public event EventHandler eh_clickComando;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
updateBtn();
|
||||
}
|
||||
/// <summary>
|
||||
/// segnala click su button comando
|
||||
/// </summary>
|
||||
public void segnalaClick()
|
||||
{
|
||||
eh_clickComando?.Invoke(this, new EventArgs());
|
||||
}
|
||||
|
||||
protected void lbtCmd_Click(object sender, EventArgs e)
|
||||
{
|
||||
// PROCEDO SOLO SE non ho veto...
|
||||
if (!hasVeto)
|
||||
{
|
||||
LinkButton lb = (LinkButton)sender;
|
||||
memLayer.ML.setSessionVal("btnCmdPress", lb.CommandArgument, false);
|
||||
segnalaClick();
|
||||
}
|
||||
else
|
||||
{
|
||||
updateBtn();
|
||||
}
|
||||
}
|
||||
|
||||
public void updateBtn()
|
||||
{
|
||||
// verifico se ho comandi PREVALENTI (es: ho UNA FASE APERTA)
|
||||
if (mUtils.CodOpr != "")
|
||||
{
|
||||
var tabTR = dataLayer.man.taTR.getAttiveByOpr(mUtils.CodOpr);
|
||||
if (tabTR.Rows.Count > 0)
|
||||
/// <summary>
|
||||
/// Codice TASK corrente
|
||||
/// </summary>
|
||||
public string CurrNumTask
|
||||
{
|
||||
// se NON HO una commessa attiva, SELEZIONO la PRIMA commessa aperta...
|
||||
if (CurrNumTask == "")
|
||||
{
|
||||
CurrNumTask = tabTR[0].NumTask;
|
||||
}
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("CurrNumTask");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("CurrNumTask", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// evento comando clicked
|
||||
/// </summary>
|
||||
public event EventHandler eh_clickComando;
|
||||
|
||||
// controllo se HO una fase corrente...
|
||||
repComandi.Visible = !hasVeto;
|
||||
if (!hasVeto)
|
||||
{
|
||||
// altrimenti imposto fasi da postazione...
|
||||
repComandi.DataBind();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica btn siano abilitati e nel caso x css aggiunge DISABLED
|
||||
/// - ho una commessa
|
||||
/// - la commessa NON E' chiusa...
|
||||
/// </summary>
|
||||
public string datiCommessa
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
// controllos e ho in sessione numTask altrimenti NON E' abilitato...
|
||||
if (CurrNumTask == "")
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// se NON E' multi
|
||||
if (mUtils.postIsMulti)
|
||||
{
|
||||
answ = "<-- Gestione commesse";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "Manca Commessa";
|
||||
}
|
||||
updateBtn();
|
||||
}
|
||||
else
|
||||
/// <summary>
|
||||
/// segnala click su button comando
|
||||
/// </summary>
|
||||
public void segnalaClick()
|
||||
{
|
||||
answ = hasVeto ? "Commessa Chiusa: " + CurrNumTask.ToString() : "";
|
||||
eh_clickComando?.Invoke(this, new EventArgs());
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se la commessa sia assente/chiusa
|
||||
/// </summary>
|
||||
public bool hasVeto
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
bool noTask = CurrNumTask == "";
|
||||
bool isChiuso = false;
|
||||
try
|
||||
|
||||
protected void lbtCmd_Click(object sender, EventArgs e)
|
||||
{
|
||||
isChiuso = dataLayer.man.taTL.getByKey(CurrNumTask)[0].Concluso;
|
||||
// PROCEDO SOLO SE non ho veto...
|
||||
if (!hasVeto)
|
||||
{
|
||||
LinkButton lb = (LinkButton)sender;
|
||||
memLayer.ML.setSessionVal("btnCmdPress", lb.CommandArgument, false);
|
||||
segnalaClick();
|
||||
}
|
||||
else
|
||||
{
|
||||
updateBtn();
|
||||
}
|
||||
}
|
||||
|
||||
public void updateBtn()
|
||||
{
|
||||
// verifico se ho comandi PREVALENTI (es: ho UNA FASE APERTA)
|
||||
if (mUtils.CodOpr != "")
|
||||
{
|
||||
var tabTR = DLMan.taTR.getAttiveByOpr(mUtils.CodOpr);
|
||||
if (tabTR.Rows.Count > 0)
|
||||
{
|
||||
// se NON HO una commessa attiva, SELEZIONO la PRIMA commessa aperta...
|
||||
if (CurrNumTask == "")
|
||||
{
|
||||
CurrNumTask = tabTR[0].NumTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// controllo se HO una fase corrente...
|
||||
repComandi.Visible = !hasVeto;
|
||||
if (!hasVeto)
|
||||
{
|
||||
// altrimenti imposto fasi da postazione...
|
||||
repComandi.DataBind();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica btn siano abilitati e nel caso x css aggiunge DISABLED
|
||||
/// - ho una commessa
|
||||
/// - la commessa NON E' chiusa...
|
||||
/// </summary>
|
||||
public string datiCommessa
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
// controllos e ho in sessione numTask altrimenti NON E' abilitato...
|
||||
if (CurrNumTask == "")
|
||||
{
|
||||
// se NON E' multi
|
||||
if (mUtils.postIsMulti)
|
||||
{
|
||||
answ = "<-- Gestione commesse";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "Manca Commessa";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = hasVeto ? "Commessa Chiusa: " + CurrNumTask.ToString() : "";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se la commessa sia assente/chiusa
|
||||
/// </summary>
|
||||
public bool hasVeto
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
bool noTask = CurrNumTask == "";
|
||||
bool isChiuso = false;
|
||||
try
|
||||
{
|
||||
isChiuso = DLMan.taTL.getByKey(CurrNumTask)[0].Concluso;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllos e ho in sessione numTask altrimenti NON E' abilitato...
|
||||
answ = noTask || isChiuso;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica btn siano abilitati e nel caso x css aggiunge DISABLED
|
||||
/// - ho una commessa
|
||||
/// - la commessa NON E' chiusa...
|
||||
/// </summary>
|
||||
public string cssEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
// controllos e ho in sessione numTask altrimenti NON E' abilitato...
|
||||
answ = hasVeto ? "disabled" : "";
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllos e ho in sessione numTask altrimenti NON E' abilitato...
|
||||
answ = noTask || isChiuso;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica btn siano abilitati e nel caso x css aggiunge DISABLED
|
||||
/// - ho una commessa
|
||||
/// - la commessa NON E' chiusa...
|
||||
/// </summary>
|
||||
public string cssEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
// controllos e ho in sessione numTask altrimenti NON E' abilitato...
|
||||
answ = hasVeto ? "disabled" : "";
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,35 +4,35 @@ using System;
|
||||
|
||||
namespace C_TRACK.WebUserControls
|
||||
{
|
||||
public partial class mod_checkPost : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
public partial class mod_checkPost : BaseUserControl
|
||||
{
|
||||
// se ho operatore in sessione ma NON HO postazione... cerco di recuperare postazione
|
||||
if (mUtils.CodOpr != "" && mUtils.CodPost == "")
|
||||
{
|
||||
// cerco da tab se ha una postazione (prendo la prima...)
|
||||
var righeOpr = dataLayer.man.taAP.getByOpr(mUtils.CodOpr);
|
||||
if (righeOpr.Rows.Count > 0)
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
mUtils.CodPost = righeOpr[0].CodPost;
|
||||
// se ho operatore in sessione ma NON HO postazione... cerco di recuperare postazione
|
||||
if (mUtils.CodOpr != "" && mUtils.CodPost == "")
|
||||
{
|
||||
// cerco da tab se ha una postazione (prendo la prima...)
|
||||
var righeOpr = DLMan.taAP.getByOpr(mUtils.CodOpr);
|
||||
if (righeOpr.Rows.Count > 0)
|
||||
{
|
||||
mUtils.CodPost = righeOpr[0].CodPost;
|
||||
}
|
||||
}
|
||||
// verifico di avere CodOpr in sessione...
|
||||
if (mUtils.CodPost == "")
|
||||
{
|
||||
// mostro warning..
|
||||
divWarning.Visible = true;
|
||||
// se NON sono in pagina bcode --> rimando a richiesta dichiarazione POSTAZIONE (con BARCODE)
|
||||
if (devicesAuthProxy.pagCorrente != "barcode")
|
||||
{
|
||||
Response.Redirect("~/barcode");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
divWarning.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// verifico di avere CodOpr in sessione...
|
||||
if (mUtils.CodPost == "")
|
||||
{
|
||||
// mostro warning..
|
||||
divWarning.Visible = true;
|
||||
// se NON sono in pagina bcode --> rimando a richiesta dichiarazione POSTAZIONE (con BARCODE)
|
||||
if (devicesAuthProxy.pagCorrente != "barcode")
|
||||
{
|
||||
Response.Redirect("~/barcode");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
divWarning.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,172 +4,173 @@ using System;
|
||||
|
||||
namespace C_TRACK.WebUserControls
|
||||
{
|
||||
public partial class mod_faseCurr : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
public partial class mod_faseCurr : BaseUserControl
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
mod_numKeyb.Visible = false;
|
||||
setupValori();
|
||||
}
|
||||
mod_numKeyb.eh_comandoRegistrato += Mod_numKeyb_eh_comandoRegistrato;
|
||||
mod_numKeyb.eh_reset += Mod_numKeyb_eh_reset;
|
||||
}
|
||||
|
||||
private void Mod_numKeyb_eh_reset(object sender, EventArgs e)
|
||||
{
|
||||
// nascondo keyb...
|
||||
mod_numKeyb.Visible = false;
|
||||
}
|
||||
|
||||
private void Mod_numKeyb_eh_comandoRegistrato(object sender, EventArgs e)
|
||||
{
|
||||
// recupero valore
|
||||
if (mod_numKeyb.numSelected >= 0)
|
||||
{
|
||||
txtQta.Text = mod_numKeyb.numSelected.ToString();
|
||||
refreshQtaSel();
|
||||
// nascondo keyb...
|
||||
mod_numKeyb.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void setupValori()
|
||||
{
|
||||
// recupero riga TR e popolo valori visualizzati
|
||||
var tabTR = dataLayer.man.taTR.getByPost(mUtils.CodPost, false);
|
||||
bool showDiv = false;
|
||||
if (tabTR.Rows.Count > 0)
|
||||
{
|
||||
DescFaseCurr = tabTR[0].DescrFase;
|
||||
QtaFaseCurr = tabTR[0].QtaEv;
|
||||
txtQta.Text = QtaFaseCurr.ToString();
|
||||
idxRecCurr = tabTR[0].IdxRec;
|
||||
showDiv = true;
|
||||
}
|
||||
divFaseCurr.Visible = showDiv;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione fase attiva
|
||||
/// </summary>
|
||||
public string DescFaseCurr
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("DescFaseCurr");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("DescFaseCurr", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Qta della fase attiva
|
||||
/// </summary>
|
||||
public int QtaFaseCurr
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("QtaFaseCurr");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("QtaFaseCurr", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idxRec della fase attiva
|
||||
/// </summary>
|
||||
public int idxRecCurr
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxRecCurr");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxRecCurr", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Codice postazione di lavoro
|
||||
/// </summary>
|
||||
public string DescPost
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject("DescPost"))
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj("DescPost");
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
mod_numKeyb.Visible = false;
|
||||
setupValori();
|
||||
}
|
||||
mod_numKeyb.eh_comandoRegistrato += Mod_numKeyb_eh_comandoRegistrato;
|
||||
mod_numKeyb.eh_reset += Mod_numKeyb_eh_reset;
|
||||
}
|
||||
if (answ == "")
|
||||
|
||||
private void Mod_numKeyb_eh_reset(object sender, EventArgs e)
|
||||
{
|
||||
var tabPost = dataLayer.man.taAP.getByKey(mUtils.CodPost);
|
||||
if (tabPost.Rows.Count > 0)
|
||||
{
|
||||
answ = tabPost[0].Descrizione;
|
||||
}
|
||||
memLayer.ML.setSessionVal("DescPost", answ);
|
||||
// nascondo keyb...
|
||||
mod_numKeyb.Visible = false;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Codice Operatore
|
||||
/// </summary>
|
||||
public string NomeOpr
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject("NomeOpr"))
|
||||
|
||||
private void Mod_numKeyb_eh_comandoRegistrato(object sender, EventArgs e)
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj("NomeOpr");
|
||||
// recupero valore
|
||||
if (mod_numKeyb.numSelected >= 0)
|
||||
{
|
||||
txtQta.Text = mod_numKeyb.numSelected.ToString();
|
||||
refreshQtaSel();
|
||||
// nascondo keyb...
|
||||
mod_numKeyb.Visible = false;
|
||||
}
|
||||
}
|
||||
if (answ == "")
|
||||
|
||||
private void setupValori()
|
||||
{
|
||||
var tabOpr = dataLayer.man.taAO.getByKey(mUtils.CodOpr);
|
||||
if (tabOpr.Rows.Count > 0)
|
||||
{
|
||||
answ = string.Format("{0} {1}", tabOpr[0].Cognome, tabOpr[0].Nome);
|
||||
}
|
||||
memLayer.ML.setSessionVal("NomeOpr", answ);
|
||||
// recupero riga TR e popolo valori visualizzati
|
||||
var tabTR = DLMan.taTR.getByPost(mUtils.CodPost, false);
|
||||
bool showDiv = false;
|
||||
if (tabTR.Rows.Count > 0)
|
||||
{
|
||||
DescFaseCurr = tabTR[0].DescrFase;
|
||||
QtaFaseCurr = tabTR[0].QtaEv;
|
||||
txtQta.Text = QtaFaseCurr.ToString();
|
||||
idxRecCurr = tabTR[0].IdxRec;
|
||||
showDiv = true;
|
||||
}
|
||||
divFaseCurr.Visible = showDiv;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected void txtQta_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
refreshQtaSel();
|
||||
}
|
||||
/// <summary>
|
||||
/// Descrizione fase attiva
|
||||
/// </summary>
|
||||
public string DescFaseCurr
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("DescFaseCurr");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("DescFaseCurr", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Qta della fase attiva
|
||||
/// </summary>
|
||||
public int QtaFaseCurr
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("QtaFaseCurr");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("QtaFaseCurr", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idxRec della fase attiva
|
||||
/// </summary>
|
||||
public int idxRecCurr
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxRecCurr");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxRecCurr", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Codice postazione di lavoro
|
||||
/// </summary>
|
||||
public string DescPost
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject("DescPost"))
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj("DescPost");
|
||||
}
|
||||
if (answ == "")
|
||||
{
|
||||
var tabPost = DLMan.taAP.getByKey(mUtils.CodPost);
|
||||
if (tabPost.Rows.Count > 0)
|
||||
{
|
||||
answ = tabPost[0].Descrizione;
|
||||
}
|
||||
memLayer.ML.setSessionVal("DescPost", answ);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Codice Operatore
|
||||
/// </summary>
|
||||
public string NomeOpr
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject("NomeOpr"))
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj("NomeOpr");
|
||||
}
|
||||
if (answ == "")
|
||||
{
|
||||
var tabOpr = DLMan.taAO.getByKey(mUtils.CodOpr);
|
||||
if (tabOpr.Rows.Count > 0)
|
||||
{
|
||||
answ = string.Format("{0} {1}", tabOpr[0].Cognome, tabOpr[0].Nome);
|
||||
}
|
||||
memLayer.ML.setSessionVal("NomeOpr", answ);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
private void refreshQtaSel()
|
||||
{
|
||||
int newQta = QtaFaseCurr;
|
||||
int.TryParse(txtQta.Text, out newQta);
|
||||
// salvo nuova qta...
|
||||
QtaFaseCurr = newQta;
|
||||
}
|
||||
protected void txtQta_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
refreshQtaSel();
|
||||
}
|
||||
|
||||
protected void lbtKeyb_Click(object sender, EventArgs e)
|
||||
{
|
||||
toggleNumKeyb();
|
||||
}
|
||||
/// <summary>
|
||||
/// Toggle visibilità numKeyb
|
||||
/// </summary>
|
||||
private void toggleNumKeyb()
|
||||
{
|
||||
mod_numKeyb.Visible = !mod_numKeyb.Visible;
|
||||
}
|
||||
private void refreshQtaSel()
|
||||
{
|
||||
int newQta = QtaFaseCurr;
|
||||
int.TryParse(txtQta.Text, out newQta);
|
||||
// salvo nuova qta...
|
||||
QtaFaseCurr = newQta;
|
||||
}
|
||||
|
||||
protected void lbtReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect("~/barcode");
|
||||
protected void lbtKeyb_Click(object sender, EventArgs e)
|
||||
{
|
||||
toggleNumKeyb();
|
||||
}
|
||||
/// <summary>
|
||||
/// Toggle visibilità numKeyb
|
||||
/// </summary>
|
||||
private void toggleNumKeyb()
|
||||
{
|
||||
mod_numKeyb.Visible = !mod_numKeyb.Visible;
|
||||
}
|
||||
|
||||
protected void lbtReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect("~/barcode");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,18 +3,18 @@ using System;
|
||||
|
||||
namespace C_TRACK.WebUserControls
|
||||
{
|
||||
public partial class mod_fasiAttive : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
public partial class mod_fasiAttive : BaseUserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void lbtCloseAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiama la procedura che chiude tutte la fasi rimaste attive...
|
||||
dataLayer.man.taTR.closePending();
|
||||
Response.Redirect("~/task");
|
||||
protected void lbtCloseAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiama la procedura che chiude tutte la fasi rimaste attive...
|
||||
DLMan.taTR.closePending();
|
||||
Response.Redirect("~/task");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,132 +6,132 @@ using System.Web.UI;
|
||||
|
||||
namespace C_TRACK.WebUserControls
|
||||
{
|
||||
public partial class mod_menuTopCompact : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
public partial class mod_menuTopCompact : BaseUserControl
|
||||
{
|
||||
string lastPage = Request.Url.LocalPath.Split('/').Last();
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// fix visibilità TASK
|
||||
hlTask.Visible = devicesAuthProxy.stObj.userHasRight("CT_userStart");
|
||||
hlReset.Visible = false;
|
||||
// se l'utente NON c'è torno a login...
|
||||
if (!devicesAuthProxy.stObj.isAuth)
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (lastPage != "" && lastPage != "login")
|
||||
{
|
||||
Session["nextPage"] = lastPage;
|
||||
}
|
||||
// SE non sono in "safe page"
|
||||
if (memLayer.ML.CRS("_loginPages").ToLower().IndexOf(lastPage.ToLower()) < 0)
|
||||
{
|
||||
Response.Redirect("~/login");
|
||||
}
|
||||
string lastPage = Request.Url.LocalPath.Split('/').Last();
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// fix visibilità TASK
|
||||
hlTask.Visible = devicesAuthProxy.stObj.userHasRight("CT_userStart");
|
||||
hlReset.Visible = false;
|
||||
// se l'utente NON c'è torno a login...
|
||||
if (!devicesAuthProxy.stObj.isAuth)
|
||||
{
|
||||
if (lastPage != "" && lastPage != "login")
|
||||
{
|
||||
Session["nextPage"] = lastPage;
|
||||
}
|
||||
// SE non sono in "safe page"
|
||||
if (memLayer.ML.CRS("_loginPages").ToLower().IndexOf(lastPage.ToLower()) < 0)
|
||||
{
|
||||
Response.Redirect("~/login");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PagCorrente();
|
||||
// leggo da conf SE mostrare logout...
|
||||
hlReset.Visible = memLayer.ML.CRB("enableLogOut");
|
||||
}
|
||||
}
|
||||
// controllo pagina...
|
||||
bool pageAuth = devicesAuthProxy.stObj.isPageEnabled(lastPage);
|
||||
// controllo pag auth...
|
||||
if (!pageAuth && memLayer.ML.confReadString("_safePages").ToLower().IndexOf(lastPage.ToLower()) < 0)
|
||||
{
|
||||
Response.Redirect("~/login");
|
||||
}
|
||||
lblTitolo.Text = memLayer.ML.CRS("appName");
|
||||
}
|
||||
else
|
||||
/// <summary>
|
||||
/// salva in variabile pagina il nome della pagina corrente
|
||||
/// </summary>
|
||||
protected void PagCorrente()
|
||||
{
|
||||
PagCorrente();
|
||||
// leggo da conf SE mostrare logout...
|
||||
hlReset.Visible = memLayer.ML.CRB("enableLogOut");
|
||||
string[] uri = Request.Url.LocalPath.Split('/');
|
||||
// salvo pagina corrente
|
||||
devicesAuthProxy.pagCorrente = uri.Last();
|
||||
if (devicesAuthProxy.pagPrecedente == "")
|
||||
{
|
||||
devicesAuthProxy.pagPrecedente = devicesAuthProxy.pagCorrente;
|
||||
}
|
||||
}
|
||||
}
|
||||
// controllo pagina...
|
||||
bool pageAuth = devicesAuthProxy.stObj.isPageEnabled(lastPage);
|
||||
// controllo pag auth...
|
||||
if (!pageAuth && memLayer.ML.confReadString("_safePages").ToLower().IndexOf(lastPage.ToLower()) < 0)
|
||||
{
|
||||
Response.Redirect("~/login");
|
||||
}
|
||||
lblTitolo.Text = memLayer.ML.CRS("appName");
|
||||
}
|
||||
/// <summary>
|
||||
/// salva in variabile pagina il nome della pagina corrente
|
||||
/// </summary>
|
||||
protected void PagCorrente()
|
||||
{
|
||||
string[] uri = Request.Url.LocalPath.Split('/');
|
||||
// salvo pagina corrente
|
||||
devicesAuthProxy.pagCorrente = uri.Last();
|
||||
if (devicesAuthProxy.pagPrecedente == "")
|
||||
{
|
||||
devicesAuthProxy.pagPrecedente = devicesAuthProxy.pagCorrente;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Codice TASK corrente
|
||||
/// </summary>
|
||||
public string CurrNumTask
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("CurrNumTask");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Codice ART corrente
|
||||
/// </summary>
|
||||
public string CurrCodArt
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("CurrCodArt");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Codice postazione di lavoro
|
||||
/// </summary>
|
||||
public string DescPost
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject("DescPost"))
|
||||
/// <summary>
|
||||
/// Codice TASK corrente
|
||||
/// </summary>
|
||||
public string CurrNumTask
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj("DescPost");
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("CurrNumTask");
|
||||
}
|
||||
}
|
||||
if (answ == "")
|
||||
/// <summary>
|
||||
/// Codice ART corrente
|
||||
/// </summary>
|
||||
public string CurrCodArt
|
||||
{
|
||||
var tabPost = dataLayer.man.taAP.getByKey(mUtils.CodPost);
|
||||
if (tabPost.Rows.Count > 0)
|
||||
{
|
||||
answ = tabPost[0].Descrizione;
|
||||
}
|
||||
memLayer.ML.setSessionVal("DescPost", answ);
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("CurrCodArt");
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Codice Operatore
|
||||
/// </summary>
|
||||
public string NomeOpr
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject("NomeOpr"))
|
||||
/// <summary>
|
||||
/// Codice postazione di lavoro
|
||||
/// </summary>
|
||||
public string DescPost
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj("NomeOpr");
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject("DescPost"))
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj("DescPost");
|
||||
}
|
||||
if (answ == "")
|
||||
{
|
||||
var tabPost = DLMan.taAP.getByKey(mUtils.CodPost);
|
||||
if (tabPost.Rows.Count > 0)
|
||||
{
|
||||
answ = tabPost[0].Descrizione;
|
||||
}
|
||||
memLayer.ML.setSessionVal("DescPost", answ);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
if (answ == "")
|
||||
/// <summary>
|
||||
/// Codice Operatore
|
||||
/// </summary>
|
||||
public string NomeOpr
|
||||
{
|
||||
var tabOpr = dataLayer.man.taAO.getByKey(mUtils.CodOpr);
|
||||
if (tabOpr.Rows.Count > 0)
|
||||
{
|
||||
answ = string.Format("{0} {1}", tabOpr[0].Cognome, tabOpr[0].Nome);
|
||||
}
|
||||
memLayer.ML.setSessionVal("NomeOpr", answ);
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject("NomeOpr"))
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj("NomeOpr");
|
||||
}
|
||||
if (answ == "")
|
||||
{
|
||||
var tabOpr = DLMan.taAO.getByKey(mUtils.CodOpr);
|
||||
if (tabOpr.Rows.Count > 0)
|
||||
{
|
||||
answ = string.Format("{0} {1}", tabOpr[0].Cognome, tabOpr[0].Nome);
|
||||
}
|
||||
memLayer.ML.setSessionVal("NomeOpr", answ);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Forzo refresh pannello superiore
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
divCurr.DataBind();
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Forzo refresh pannello superiore
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
divCurr.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,106 +10,106 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace C_TRACK.WebUserControls
|
||||
{
|
||||
public partial class mod_opr2post : System.Web.UI.UserControl
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// evento aggiunta record
|
||||
/// </summary>
|
||||
public event EventHandler eh_reqUpdate;
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
public partial class mod_opr2post : BaseUserControl
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
if (mUtils.postIsMulti)
|
||||
|
||||
/// <summary>
|
||||
/// evento aggiunta record
|
||||
/// </summary>
|
||||
public event EventHandler eh_reqUpdate;
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
lbtClosePeriod.DataBind();
|
||||
doUpdate();
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
if (mUtils.postIsMulti)
|
||||
{
|
||||
lbtClosePeriod.DataBind();
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void doUpdate()
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
public void doUpdate()
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CodPost selezionato in sessione
|
||||
/// </summary>
|
||||
protected string codPost
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("CodPost");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// CodPost selezionato in sessione
|
||||
/// </summary>
|
||||
protected string codPost
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("CodPost");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void lbtClosePeriod_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiude il turno andando a ripartire tutte le ore operatore sulle commesse attive e senza riportare attivi gli operatori
|
||||
dataLayer.man.taTR.checkAlloc(codPost, false);
|
||||
grView.DataBind();
|
||||
reportUpdate();
|
||||
}
|
||||
protected void lbtClosePeriod_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiude il turno andando a ripartire tutte le ore operatore sulle commesse attive e senza riportare attivi gli operatori
|
||||
DLMan.taTR.checkAlloc(codPost, false);
|
||||
grView.DataBind();
|
||||
reportUpdate();
|
||||
}
|
||||
|
||||
protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e)
|
||||
{
|
||||
reportUpdate();
|
||||
}
|
||||
protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e)
|
||||
{
|
||||
reportUpdate();
|
||||
}
|
||||
|
||||
private void reportUpdate()
|
||||
{
|
||||
// invoco update...
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
private void reportUpdate()
|
||||
{
|
||||
// invoco update...
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Input da processare (tipo codOperatore...)...
|
||||
/// </summary>
|
||||
public string newInput
|
||||
{
|
||||
set
|
||||
{
|
||||
processInput(value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Input da processare (tipo codOperatore...)...
|
||||
/// </summary>
|
||||
public string newInput
|
||||
{
|
||||
set
|
||||
{
|
||||
processInput(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cod OPERATORE corrente
|
||||
/// </summary>
|
||||
public string codOper
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("currCodOperMulti");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("currCodOperMulti", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Effettua riconoscimento input e determina valori commessa / articolo / qta
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
private void processInput(string value)
|
||||
{
|
||||
// verifico se sia un operatore...
|
||||
Match testOper = Regex.Match(value, mUtils.reCodOper);
|
||||
/// <summary>
|
||||
/// Cod OPERATORE corrente
|
||||
/// </summary>
|
||||
public string codOper
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("currCodOperMulti");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("currCodOperMulti", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Effettua riconoscimento input e determina valori commessa / articolo / qta
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
private void processInput(string value)
|
||||
{
|
||||
// verifico se sia un operatore...
|
||||
Match testOper = Regex.Match(value, mUtils.reCodOper);
|
||||
|
||||
if (testOper.Success)
|
||||
{
|
||||
// salvo nuovo operatore SE non ci fosse...
|
||||
codOper = value;
|
||||
dataLayer.man.taO2P.InsertQuery(codPost, codOper, DateTime.Now);
|
||||
reportUpdate();
|
||||
}
|
||||
doUpdate();
|
||||
if (testOper.Success)
|
||||
{
|
||||
// salvo nuovo operatore SE non ci fosse...
|
||||
codOper = value;
|
||||
DLMan.taO2P.InsertQuery(codPost, codOper, DateTime.Now);
|
||||
reportUpdate();
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,113 +5,113 @@ using System.Web.UI;
|
||||
|
||||
namespace C_TRACK.WebUserControls
|
||||
{
|
||||
public partial class mod_postazioni : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
public partial class mod_postazioni : BaseUserControl
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
memLayer.ML.emptySessionVal("DescPost");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// salvo la postazione selezionata
|
||||
string newCodPost = grView.SelectedValue.ToString();
|
||||
mUtils.CodPost = newCodPost;
|
||||
// vedo di recuperare dati postazione...
|
||||
try
|
||||
{
|
||||
DS_App.AnagPostRow datiPost = dataLayer.man.taAP.getByKey(newCodPost)[0];
|
||||
// salvo!
|
||||
mUtils.postIsMulti = datiPost.IsMultiOpr;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
string nextPage = "";
|
||||
if (memLayer.ML.StringSessionObj("nextObjCommand") == "setOpr")
|
||||
{
|
||||
// salvo su DB...
|
||||
dataLayer.man.taAP.setOpr(mUtils.CodPost, mUtils.CodOpr);
|
||||
// set rimando a BCode con settato Postazione
|
||||
nextPage = "~/barcode";
|
||||
}
|
||||
else if (memLayer.ML.StringSessionObj("nextObjCommand") == "freePost")
|
||||
{
|
||||
// salvo su DB...
|
||||
dataLayer.man.taAP.setOpr(mUtils.CodPost, "");
|
||||
mUtils.CodPost = "";
|
||||
// set rimando a postazioni
|
||||
nextPage = "~/postazioni";
|
||||
}
|
||||
else if (memLayer.ML.StringSessionObj("nextObjCommand") == "selPost")
|
||||
{
|
||||
// set rimando a BCode con settato Postazione
|
||||
nextPage = "~/barcode";
|
||||
}
|
||||
memLayer.ML.setSessionVal("nextObjCommand", "");
|
||||
// reload pagina!
|
||||
Response.Redirect(nextPage);
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
memLayer.ML.emptySessionVal("DescPost");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// salvo la postazione selezionata
|
||||
string newCodPost = grView.SelectedValue.ToString();
|
||||
mUtils.CodPost = newCodPost;
|
||||
// vedo di recuperare dati postazione...
|
||||
try
|
||||
{
|
||||
DS_App.AnagPostRow datiPost = DLMan.taAP.getByKey(newCodPost)[0];
|
||||
// salvo!
|
||||
mUtils.postIsMulti = datiPost.IsMultiOpr;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
string nextPage = "";
|
||||
if (memLayer.ML.StringSessionObj("nextObjCommand") == "setOpr")
|
||||
{
|
||||
// salvo su DB...
|
||||
DLMan.taAP.setOpr(mUtils.CodPost, mUtils.CodOpr);
|
||||
// set rimando a BCode con settato Postazione
|
||||
nextPage = "~/barcode";
|
||||
}
|
||||
else if (memLayer.ML.StringSessionObj("nextObjCommand") == "freePost")
|
||||
{
|
||||
// salvo su DB...
|
||||
DLMan.taAP.setOpr(mUtils.CodPost, "");
|
||||
mUtils.CodPost = "";
|
||||
// set rimando a postazioni
|
||||
nextPage = "~/postazioni";
|
||||
}
|
||||
else if (memLayer.ML.StringSessionObj("nextObjCommand") == "selPost")
|
||||
{
|
||||
// set rimando a BCode con settato Postazione
|
||||
nextPage = "~/barcode";
|
||||
}
|
||||
memLayer.ML.setSessionVal("nextObjCommand", "");
|
||||
// reload pagina!
|
||||
Response.Redirect(nextPage);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è liberare postazione...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtFreePost_Click(object sender, EventArgs e)
|
||||
{
|
||||
memLayer.ML.setSessionVal("nextObjCommand", "freePost");
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è impostare operatore...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSetOpr_Click(object sender, EventArgs e)
|
||||
{
|
||||
memLayer.ML.setSessionVal("nextObjCommand", "setOpr");
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è impostare postazione...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSelPost_Click(object sender, EventArgs e)
|
||||
{
|
||||
memLayer.ML.setSessionVal("nextObjCommand", "selPost");
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se sia possibile sbloccare la postazione (togliere Opr corrente:
|
||||
/// - è un user "power"
|
||||
/// - è LUI STESSO l'utente da levare
|
||||
/// </summary>
|
||||
public bool canUnlock(string thisCodOpr)
|
||||
{
|
||||
bool hasLock = thisCodOpr != "";
|
||||
bool isAdmin = devicesAuthProxy.stObj.userHasRight("CT_admin");
|
||||
bool isStart = devicesAuthProxy.stObj.userHasRight("CT_userStart");
|
||||
bool isPower = devicesAuthProxy.stObj.userHasRight("CT_powerUser");
|
||||
bool isHimself = (mUtils.CodOpr == thisCodOpr);
|
||||
return hasLock && (isPower || isAdmin || isStart || isHimself);
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è liberare postazione...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtFreePost_Click(object sender, EventArgs e)
|
||||
{
|
||||
memLayer.ML.setSessionVal("nextObjCommand", "freePost");
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è impostare operatore...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSetOpr_Click(object sender, EventArgs e)
|
||||
{
|
||||
memLayer.ML.setSessionVal("nextObjCommand", "setOpr");
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è impostare postazione...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSelPost_Click(object sender, EventArgs e)
|
||||
{
|
||||
memLayer.ML.setSessionVal("nextObjCommand", "selPost");
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se sia possibile sbloccare la postazione (togliere Opr corrente:
|
||||
/// - è un user "power"
|
||||
/// - è LUI STESSO l'utente da levare
|
||||
/// </summary>
|
||||
public bool canUnlock(string thisCodOpr)
|
||||
{
|
||||
bool hasLock = thisCodOpr != "";
|
||||
bool isAdmin = devicesAuthProxy.stObj.userHasRight("CT_admin");
|
||||
bool isStart = devicesAuthProxy.stObj.userHasRight("CT_userStart");
|
||||
bool isPower = devicesAuthProxy.stObj.userHasRight("CT_powerUser");
|
||||
bool isHimself = (mUtils.CodOpr == thisCodOpr);
|
||||
return hasLock && (isPower || isAdmin || isStart || isHimself);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se sia possibile sbloccare la postazione (togliere Opr corrente:
|
||||
/// - è un user "power"
|
||||
/// - è LUI STESSO l'utente da levare
|
||||
/// </summary>
|
||||
public bool canSelPost(string thisCodOpr)
|
||||
{
|
||||
bool hasLock = thisCodOpr != "";
|
||||
bool isHimself = (mUtils.CodOpr == thisCodOpr);
|
||||
return hasLock && isHimself;
|
||||
/// <summary>
|
||||
/// Verifica se sia possibile sbloccare la postazione (togliere Opr corrente:
|
||||
/// - è un user "power"
|
||||
/// - è LUI STESSO l'utente da levare
|
||||
/// </summary>
|
||||
public bool canSelPost(string thisCodOpr)
|
||||
{
|
||||
bool hasLock = thisCodOpr != "";
|
||||
bool isHimself = (mUtils.CodOpr == thisCodOpr);
|
||||
return hasLock && isHimself;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,91 +1,106 @@
|
||||
using AppData;
|
||||
using SteamWare;
|
||||
using SteamWare;
|
||||
using System;
|
||||
|
||||
namespace C_TRACK.WebUserControls
|
||||
{
|
||||
public partial class mod_selTask : System.Web.UI.UserControl
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// evento selezione dati
|
||||
/// </summary>
|
||||
public event EventHandler eh_dataSel;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
public partial class mod_selTask : BaseUserControl
|
||||
{
|
||||
#region Public Events
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// evento selezione dati
|
||||
/// </summary>
|
||||
public event EventHandler eh_dataSel;
|
||||
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// selezionata una richiesta
|
||||
int idxProm = 0;
|
||||
int.TryParse(grView.SelectedValue.ToString(), out idxProm);
|
||||
if (idxProm > 0)
|
||||
{
|
||||
// --> ho IdxPromessa --> recupero KeyRichiesta = CurrNumTask
|
||||
var tab = dataLayer.man.taPODL.getByKey(idxProm);
|
||||
string _numTask = "";
|
||||
if (tab.Rows.Count > 0)
|
||||
#endregion Public Events
|
||||
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Codice ART corrente
|
||||
/// </summary>
|
||||
public string CurrCodArt
|
||||
{
|
||||
// recupero NumTask
|
||||
_numTask = tab[0].KeyRichiesta;
|
||||
if (_numTask != "")
|
||||
{
|
||||
// verifica preliminare se vada creato Task...
|
||||
checkTask(idxProm);
|
||||
// salvo commessa
|
||||
CurrNumTask = _numTask;
|
||||
// salvo articolo...
|
||||
CurrCodArt = tab[0].CodArticolo;
|
||||
// segnalo update
|
||||
if (eh_dataSel != null)
|
||||
get
|
||||
{
|
||||
eh_dataSel(this, new EventArgs());
|
||||
return memLayer.ML.StringSessionObj("CurrCodArt");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("CurrCodArt", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se il task vada importato
|
||||
/// </summary>
|
||||
/// <param name="idxPromessa"></param>
|
||||
private void checkTask(int idxPromessa)
|
||||
{
|
||||
dataLayer.man.taTL.ImportNew(idxPromessa);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Codice TASK corrente
|
||||
/// </summary>
|
||||
public string CurrNumTask
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("CurrNumTask");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("CurrNumTask", value);
|
||||
// salvo anche come btn pressed...
|
||||
memLayer.ML.setSessionVal("btnCmdPress", value);
|
||||
}
|
||||
/// <summary>
|
||||
/// Codice TASK corrente
|
||||
/// </summary>
|
||||
public string CurrNumTask
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("CurrNumTask");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("CurrNumTask", value);
|
||||
// salvo anche come btn pressed...
|
||||
memLayer.ML.setSessionVal("btnCmdPress", value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se il task vada importato
|
||||
/// </summary>
|
||||
/// <param name="idxPromessa"></param>
|
||||
private void checkTask(int idxPromessa)
|
||||
{
|
||||
DLMan.taTL.ImportNew(idxPromessa);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// selezionata una richiesta
|
||||
int idxProm = 0;
|
||||
int.TryParse(grView.SelectedValue.ToString(), out idxProm);
|
||||
if (idxProm > 0)
|
||||
{
|
||||
// --> ho IdxPromessa --> recupero KeyRichiesta = CurrNumTask
|
||||
var tab = DLMan.taPODL.getByKey(idxProm);
|
||||
string _numTask = "";
|
||||
if (tab.Rows.Count > 0)
|
||||
{
|
||||
// recupero NumTask
|
||||
_numTask = tab[0].KeyRichiesta;
|
||||
if (_numTask != "")
|
||||
{
|
||||
// verifica preliminare se vada creato Task...
|
||||
checkTask(idxProm);
|
||||
// salvo commessa
|
||||
CurrNumTask = _numTask;
|
||||
// salvo articolo...
|
||||
CurrCodArt = tab[0].CodArticolo;
|
||||
// segnalo update
|
||||
if (eh_dataSel != null)
|
||||
{
|
||||
eh_dataSel(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
/// <summary>
|
||||
/// Codice ART corrente
|
||||
/// </summary>
|
||||
public string CurrCodArt
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("CurrCodArt");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("CurrCodArt", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace C_TRACK.WebUserControls
|
||||
{
|
||||
public partial class mod_task2post : System.Web.UI.UserControl
|
||||
public partial class mod_task2post : BaseUserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// evento aggiunta record
|
||||
@@ -76,7 +76,7 @@ namespace C_TRACK.WebUserControls
|
||||
{
|
||||
string numTask = grView.SelectedValue.ToString();
|
||||
// chiamo toggle status, segnalo update!
|
||||
dataLayer.man.taTL2Post.ToggleActive(codPost, numTask);
|
||||
DLMan.taTL2Post.ToggleActive(codPost, numTask);
|
||||
reportUpdate();
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace C_TRACK.WebUserControls
|
||||
{
|
||||
NumTask = value;
|
||||
string codTag = mUtils.optValueBC != "" ? mUtils.optValueBC : "";
|
||||
dataLayer.man.taTL2Post.InsertQuery(codPost, NumTask, codTag);
|
||||
DLMan.taTL2Post.InsertQuery(codPost, NumTask, codTag);
|
||||
reportUpdate();
|
||||
}
|
||||
doUpdate();
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Web.UI;
|
||||
|
||||
namespace C_TRACK.WebUserControls
|
||||
{
|
||||
public partial class mod_taskList : System.Web.UI.UserControl
|
||||
public partial class mod_taskList : BaseUserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Gestione load pagina
|
||||
@@ -153,7 +153,7 @@ namespace C_TRACK.WebUserControls
|
||||
if (memLayer.ML.StringSessionObj("nextObjCommand") == "reopenTask")
|
||||
{
|
||||
// salvo su DB...
|
||||
dataLayer.man.taTL.updateClose(NumTask, false);
|
||||
DLMan.taTL.updateClose(NumTask, false);
|
||||
// tolgo comando reopen...
|
||||
memLayer.ML.emptySessionVal("nextObjCommand");
|
||||
// set rimando a BCode con settato Postazione
|
||||
|
||||
+18
-18
@@ -9,7 +9,7 @@ using System.Web.UI;
|
||||
|
||||
namespace C_TRACK
|
||||
{
|
||||
public partial class barcode : System.Web.UI.Page
|
||||
public partial class barcode : BasePage
|
||||
{
|
||||
/// <summary>
|
||||
/// idxRec della fase attiva
|
||||
@@ -47,7 +47,7 @@ namespace C_TRACK
|
||||
string CurrCodArt = "";
|
||||
try
|
||||
{
|
||||
CurrCodArt = dataLayer.man.taTL.getByKey(value)[0].CodArt;
|
||||
CurrCodArt = DLMan.taTL.getByKey(value)[0].CodArt;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
@@ -420,7 +420,7 @@ namespace C_TRACK
|
||||
Dictionary<string, string> valori = new Dictionary<string, string>();
|
||||
|
||||
// aggiungo i COD OPERATORE
|
||||
var tabOpr = dataLayer.man.taAO.GetData();
|
||||
var tabOpr = DLMan.taAO.GetData();
|
||||
foreach (var rigaOpr in tabOpr)
|
||||
{
|
||||
valori.Add(rigaOpr.CodOpr, string.Format("{0} {1}", rigaOpr.Cognome, rigaOpr.Nome));
|
||||
@@ -431,7 +431,7 @@ namespace C_TRACK
|
||||
}
|
||||
|
||||
// aggiungo le POSTAZIONI
|
||||
var tabPost = dataLayer.man.taAP.GetData();
|
||||
var tabPost = DLMan.taAP.GetData();
|
||||
foreach (var rigaPost in tabPost)
|
||||
{
|
||||
valori.Add(rigaPost.CodPost, rigaPost.Descrizione);
|
||||
@@ -441,7 +441,7 @@ namespace C_TRACK
|
||||
logger.lg.scriviLog("Caricato POSTAZIONI per Barcode", tipoLog.INFO);
|
||||
}
|
||||
// aggiungo le commesse...
|
||||
var tabTask = dataLayer.man.taTL.getLastNumDD(numDD);
|
||||
var tabTask = DLMan.taTL.getLastNumDD(numDD);
|
||||
foreach (var rigaTask in tabTask)
|
||||
{
|
||||
valori.Add(rigaTask.NumTask, string.Format("Comm. {0} | Art. {1} | Qta {2}", rigaTask.NumTask, rigaTask.CodArt, rigaTask.QtaRic));
|
||||
@@ -478,14 +478,14 @@ namespace C_TRACK
|
||||
Dictionary<string, string> comandi = new Dictionary<string, string>();
|
||||
|
||||
// !!!FARE!!! togliere...
|
||||
var tabCmd = dataLayer.man.taTE2S.getByMappa("E_BC");
|
||||
var tabCmd = DLMan.taTE2S.getByMappa("E_BC");
|
||||
foreach (var rigaCmd in tabCmd)
|
||||
{
|
||||
comandi.Add(rigaCmd.CodEvento.ToUpper(), devicesAuthProxy.stObj.traduci(rigaCmd.text2show));
|
||||
}
|
||||
|
||||
|
||||
var tabFasi = dataLayer.man.taAF.GetData();
|
||||
var tabFasi = DLMan.taAF.GetData();
|
||||
foreach (var rigaFase in tabFasi)
|
||||
{
|
||||
comandi.Add(rigaFase.CodFase, rigaFase.DescrFase);
|
||||
@@ -575,7 +575,7 @@ namespace C_TRACK
|
||||
if (mod_barcode1.comandoRegistrato.prevCmdIn == mUtils.reCmdResetOper)
|
||||
{
|
||||
// rimuovo OPR da POST occupate
|
||||
dataLayer.man.taAP.resetOpr(mUtils.CodOpr);
|
||||
DLMan.taAP.resetOpr(mUtils.CodOpr);
|
||||
// rimuovo OPR da sessione
|
||||
mUtils.CodOpr = "";
|
||||
// rimuovo post corrente...
|
||||
@@ -607,13 +607,13 @@ namespace C_TRACK
|
||||
if (mUtils.CodPost != "")
|
||||
{
|
||||
// ...e SE la postazione è libera associo e registro
|
||||
var tabPost = dataLayer.man.taAP.getByKey(mUtils.CodPost);
|
||||
var tabPost = DLMan.taAP.getByKey(mUtils.CodPost);
|
||||
if (tabPost.Rows.Count == 1)
|
||||
{
|
||||
var rigaPost = tabPost[0];
|
||||
if (rigaPost.CodOpr == mUtils.CodOpr || rigaPost.CodOpr == "")
|
||||
{
|
||||
dataLayer.man.taAP.setOpr(mUtils.CodPost, mUtils.CodOpr);
|
||||
DLMan.taAP.setOpr(mUtils.CodPost, mUtils.CodOpr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -630,14 +630,14 @@ namespace C_TRACK
|
||||
if (mUtils.CodOpr != "")
|
||||
{
|
||||
// ...e SE la postazione è libera o c'è lui associo e registro
|
||||
var tabPost = dataLayer.man.taAP.getByKey(mod_barcode1.comandoRegistrato.valore);
|
||||
var tabPost = DLMan.taAP.getByKey(mod_barcode1.comandoRegistrato.valore);
|
||||
if (tabPost.Rows.Count == 1)
|
||||
{
|
||||
var rigaPost = tabPost[0];
|
||||
if (rigaPost.CodOpr == mUtils.CodOpr || rigaPost.CodOpr == "")
|
||||
{
|
||||
mUtils.CodPost = mod_barcode1.comandoRegistrato.valore;
|
||||
dataLayer.man.taAP.setOpr(mUtils.CodPost, mUtils.CodOpr);
|
||||
DLMan.taAP.setOpr(mUtils.CodPost, mUtils.CodOpr);
|
||||
// svuoto vallori
|
||||
}
|
||||
}
|
||||
@@ -652,25 +652,25 @@ namespace C_TRACK
|
||||
else if (mod_barcode1.comandoRegistrato.prevCmdIn == mUtils.reCmdPause)
|
||||
{
|
||||
// registro chiusura con qta 0 (pausa)
|
||||
dataLayer.man.taTR.updateQuery(idxRecCurr, DateTime.Now, 0);
|
||||
DLMan.taTR.updateQuery(idxRecCurr, DateTime.Now, 0);
|
||||
Response.Redirect("~/barcode");
|
||||
}
|
||||
else if (mod_barcode1.comandoRegistrato.prevCmdIn == mUtils.reCmdClose)
|
||||
{
|
||||
// registro chiusura con la qta indicata
|
||||
dataLayer.man.taTR.updateQuery(idxRecCurr, DateTime.Now, QtaFaseCurr);
|
||||
DLMan.taTR.updateQuery(idxRecCurr, DateTime.Now, QtaFaseCurr);
|
||||
Response.Redirect("~/barcode");
|
||||
}
|
||||
else if (dataLayer.man.taAF.getByKey(mod_barcode1.comandoRegistrato.prevCmdIn).Rows.Count > 0)
|
||||
else if (DLMan.taAF.getByKey(mod_barcode1.comandoRegistrato.prevCmdIn).Rows.Count > 0)
|
||||
{
|
||||
// se è un comando di fase --> registro INIZIO!
|
||||
dataLayer.man.taTR.insertQuery(mUtils.CodOpr, mUtils.CodPost, CurrNumTask, CurrCodTag, mod_barcode1.comandoRegistrato.prevCmdIn, DateTime.Now);
|
||||
DLMan.taTR.insertQuery(mUtils.CodOpr, mUtils.CodPost, CurrNumTask, CurrCodTag, mod_barcode1.comandoRegistrato.prevCmdIn, DateTime.Now);
|
||||
// controllo se sia fase di CHIUSURA DEFINITIVA registro con INIZIO e FINE insieme e CHIUDO commessa...
|
||||
var rigaFase = dataLayer.man.taAF.getByKey(mod_barcode1.comandoRegistrato.prevCmdIn)[0];
|
||||
var rigaFase = DLMan.taAF.getByKey(mod_barcode1.comandoRegistrato.prevCmdIn)[0];
|
||||
if (rigaFase.CloseTask)
|
||||
{
|
||||
// chiudo direttamente SIA fase che il TASK principale...
|
||||
dataLayer.man.taTL.updateClose(CurrNumTask, true);
|
||||
DLMan.taTL.updateClose(CurrNumTask, true);
|
||||
// se è abilitato PODL indico chiuso anche li... IdxOdl = -10
|
||||
|
||||
// tolgo comm corrente...
|
||||
|
||||
@@ -8,12 +8,12 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace C_TRACK
|
||||
{
|
||||
public partial class closeAllRec : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
public partial class closeAllRec : BasePage
|
||||
{
|
||||
// chiama la procedura che chiude tutte la fasi rimaste attive...
|
||||
dataLayer.man.taTR.closePending();
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// chiama la procedura che chiude tutte la fasi rimaste attive...
|
||||
DLMan.taTR.closePending();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
|
||||
namespace C_TRACK
|
||||
{
|
||||
public partial class doExport : System.Web.UI.Page
|
||||
public partial class doExport : BasePage
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
@@ -81,11 +81,11 @@ namespace C_TRACK
|
||||
// leggo tabella secondo il MODO
|
||||
if (mode == "aggr")
|
||||
{
|
||||
dt = (DataTable)dataLayer.man.taTRA.getByFilt("", dateFrom, dateTo);
|
||||
dt = (DataTable)DLMan.taTRA.getByFilt("", dateFrom, dateTo);
|
||||
}
|
||||
else
|
||||
{
|
||||
dt = (DataTable)dataLayer.man.taTR.getByFilt("", dateFrom, dateTo);
|
||||
dt = (DataTable)DLMan.taTR.getByFilt("", dateFrom, dateTo);
|
||||
}
|
||||
|
||||
// write the csv column headers
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user