diff --git a/GMW/GMW_Term/GMW_Term.csproj b/GMW/GMW_Term/GMW_Term.csproj
index 7d151b4a..c12dce7d 100644
--- a/GMW/GMW_Term/GMW_Term.csproj
+++ b/GMW/GMW_Term/GMW_Term.csproj
@@ -110,6 +110,13 @@
mod_barcode.ascx
+
+ mod_btnUdc.ascx
+ ASPXCodeBehind
+
+
+ mod_btnUdc.ascx
+
mod_currentTask.ascx
ASPXCodeBehind
@@ -299,6 +306,7 @@
+
diff --git a/GMW/GMW_Term/Style.css b/GMW/GMW_Term/Style.css
index b99a49c8..32d07617 100644
--- a/GMW/GMW_Term/Style.css
+++ b/GMW/GMW_Term/Style.css
@@ -10,8 +10,8 @@
#content
{
- width: 230px;
- height: 260px;
+ width: 220px;
+ height: 240px;
padding: 0px;
border: 1px black solid;
background-position: center bottom;
@@ -49,7 +49,7 @@
.quadro1, .quadro2
{
float: left;
- width: 120px;
+ width: 100px;
height: 100px;
text-align: center;
vertical-align: middle;
@@ -127,3 +127,75 @@
color: #333333;
background-color: #D1DDF1;
}
+.btnDeposita
+{
+ display: block;
+ width: 100px;
+ border: solid 2px red;
+ background-color: #FFAAAA;
+ padding: 0px 2px 0px 2px;
+}
+.btnSposta
+{
+ display: block;
+ width: 100px;
+ border: solid 2px green;
+ background-color: #AAFFAA;
+ padding: 0px 2px 0px 2px;
+}
+.btnRettifica
+{
+ display: block;
+ width: 100px;
+ border: solid 2px blue;
+ background-color: #AAAAFF;
+ padding: 0px 2px 0px 2px;
+}
+.btnPreleva
+{
+ display: block;
+ width: 100px;
+ border: solid 2px yellow;
+ background-color: #FFFFAA;
+ padding: 0px 2px 0px 2px;
+}
+.btnConferma
+{
+ display: block;
+ width: 100px;
+ border: solid 2px yellow;
+ background-color: #FFFFAA;
+ padding: 0px 2px 0px 2px;
+}
+.btnCellaPiena
+{
+ display: block;
+ width: 100px;
+ border: solid 2px yellow;
+ background-color: #FFFFAA;
+ padding: 0px 2px 0px 2px;
+}
+.btnBarcode
+{
+ display: block;
+ width: 100px;
+ border: solid 2px yellow;
+ background-color: #FFFFAA;
+ padding: 0px 2px 0px 2px;
+}
+.btnChiudi
+{
+ display: block;
+ width: 100px;
+ border: solid 2px yellow;
+ background-color: #FFFFAA;
+ padding: 0px 2px 0px 2px;
+}
+.btnChiudiInput
+{
+ display: block;
+ width: 100px;
+ border: solid 2px yellow;
+ background-color: #FFFFAA;
+ padding: 0px 2px 0px 2px;
+}
diff --git a/GMW/GMW_Term/WebUserControls/mod_btnUdc.ascx b/GMW/GMW_Term/WebUserControls/mod_btnUdc.ascx
new file mode 100644
index 00000000..cbeaa62c
--- /dev/null
+++ b/GMW/GMW_Term/WebUserControls/mod_btnUdc.ascx
@@ -0,0 +1,34 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_btnUdc.ascx.cs"
+ Inherits="GMW_Term.WebUserControls.mod_btnUdc" %>
+
+
+
+
+
+
+
+
+
+
diff --git a/GMW/GMW_Term/WebUserControls/mod_btnUdc.ascx.cs b/GMW/GMW_Term/WebUserControls/mod_btnUdc.ascx.cs
new file mode 100644
index 00000000..874f5ae8
--- /dev/null
+++ b/GMW/GMW_Term/WebUserControls/mod_btnUdc.ascx.cs
@@ -0,0 +1,636 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GMW_data;
+
+namespace GMW_Term.WebUserControls
+{
+ public partial class mod_btnUdc : System.Web.UI.UserControl
+ {
+ #region variabili globali controllo
+
+ ///
+ /// codice company/sito in sessione
+ ///
+ protected string _CodCS
+ {
+ get
+ {
+ return memLayer.ML.StringSessionObj("CodCS");
+ }
+ }
+ ///
+ /// UDC correntemente selezionato
+ ///
+ protected string _UDC
+ {
+ get
+ {
+ return memLayer.ML.StringSessionObj("UDC_sel");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("UDC_sel", value);
+ }
+ }
+ ///
+ /// CodLista della lsita di prelievo correntemente attiva
+ ///
+ protected string _CodLista
+ {
+ get
+ {
+ return memLayer.ML.StringSessionObj("CodListaAttiva");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("CodListaAttiva", value);
+ }
+ }
+ ///
+ /// Particolare dell'UDC correntemente selezionato
+ ///
+ protected string _PartUdc
+ {
+ get
+ {
+ string answ = "";
+ try
+ {
+ answ = MagClass.magazzino.taDettUDC.getByFullUdc(_UDC, _CodCS)[0].Particolare;
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ ///
+ /// Indica se l'UDC correntemente selezionato sia disponibile x prelievo
+ ///
+ protected bool _UdcDisp
+ {
+ get
+ {
+ bool answ = false;
+ try
+ {
+ answ = (MagClass.magazzino.taRigheListePrelievo.getPrelevateByUdc(_UDC).Rows.Count == 0);
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ ///
+ /// Indica se la cella DI DESTINAZIONE dell'azione sia da indicare come piena
+ ///
+ protected bool _cellaPiena
+ {
+ get
+ {
+ return memLayer.ML.BoolSessionObj("cellaPiena");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("cellaPiena", value);
+ }
+ }
+ ///
+ /// Particolare della Lista di Prelievo correntemente attiva
+ ///
+ protected string _PartLdP
+ {
+ get
+ {
+ string answ = "";
+ if (_CodLista != "")
+ {
+ try
+ {
+ answ = MagClass.magazzino.taElencoListePrelievo.getByCodLista(_CodLista)[0].Particolare;
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+ }
+
+ ///
+ /// testo contenuto nella textbox
+ ///
+ public string txtScansione
+ {
+ get
+ {
+ return txtInput.Text.Trim();
+ }
+ set
+ {
+ txtInput.Text = value;
+ }
+ }
+
+ ///
+ /// valore della scansione barcode
+ ///
+ public string valoreScanUdc
+ {
+ get
+ {
+ return memLayer.ML.StringSessionObj("scannedValueUdc");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("scannedValueUdc", value, false);
+ }
+ }
+ ///
+ /// tipologia di edit attivo (in session...)
+ ///
+ protected tipoEditUdc editAttivo
+ {
+ get
+ {
+ tipoEditUdc answ = tipoEditUdc.nd;
+ try
+ {
+ answ = (tipoEditUdc)memLayer.ML.objSessionObj("EditAttivo");
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("EditAttivo", value, false);
+ }
+ }
+
+
+ #endregion
+
+ #region area eventi
+
+ public event EventHandler eh_btnPressed;
+ public event EventHandler eh_reqSposta;
+ public event EventHandler eh_reqDeposita;
+
+ #endregion
+
+ #region setup modulo
+ ///
+ /// caricamento pagina
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ pnlButtons.Visible = true;
+ pnlInput.Visible = false;
+ traduciObj();
+ setupBtn();
+ }
+ txtInput.Focus();
+ }
+
+ ///
+ /// resetta panel input
+ ///
+ private void resetInputPanel()
+ {
+ pnlButtons.Visible = false;
+ pnlInput.Visible = true;
+ lblData.Text = "";
+ btnConferma.Enabled = false;
+ btnCellaPiena.Enabled = false;
+ }
+ ///
+ /// sistemo abilitazione buttons (a seconda dello stato dell'UDC)
+ ///
+ private void setupBtn()
+ {
+ bool posizAssegn = false;
+ bool udcPieno = false;
+ DS_magazzino.v_UdcDetailRow rigaUdc;
+ try
+ {
+ rigaUdc = MagClass.magazzino.taDettUDC.getByFullUdc(_UDC, _CodCS)[0];
+ posizAssegn = (rigaUdc.CodCella != "");
+ }
+ catch
+ { }
+ try
+ {
+ rigaUdc = MagClass.magazzino.taDettUDC.getByFullUdc(_UDC, _CodCS)[0];
+ udcPieno = (rigaUdc.Particolare != "");
+ }
+ catch
+ { }
+ // abilito rettifica, deposita e sposta SOLO SE contiene dei particolari...
+ if (udcPieno)
+ {
+ // in base a che sia in una posizione magazzino o meno scelgo che buttons abilitare
+ if (posizAssegn)
+ {
+ btnDeposita.Enabled = false;
+ btnSposta.Enabled = true;
+ }
+ else
+ {
+ btnDeposita.Enabled = true;
+ btnSposta.Enabled = false;
+ }
+ btnRettifica.Enabled = true;
+ }
+ else
+ {
+ btnDeposita.Enabled = false;
+ btnSposta.Enabled = false;
+ btnRettifica.Enabled = false;
+ }
+ // permetto dichiudere sempre
+ btnChiudi.Enabled = true;
+ // button preleva abilitato SOLO SE c'è una lista di prelievo attiva per l'utente e per il particolare corrente... e se l'UDC non è stato prelevato
+ if (_CodLista != "" && (_PartLdP == _PartUdc) && _UdcDisp)
+ {
+ btnPreleva.Enabled = true;
+ }
+ else
+ {
+ btnPreleva.Enabled = false;
+ }
+ setupBtnChiudi();
+ }
+ ///
+ /// sistemo btn x chiusura
+ ///
+ private void setupBtnChiudi()
+ {
+ // mostro chiudi generale o chiudi del modulo a seconda dello stato
+ switch (editAttivo)
+ {
+ case tipoEditUdc.nd:
+ btnBarcode.Visible = true;
+ btnChiudiInput.Visible = false;
+ btnChiudi.Visible = true;
+ break;
+ case tipoEditUdc.deposito:
+ btnBarcode.Visible = true;
+ btnChiudiInput.Visible = true;
+ btnChiudi.Visible = false;
+ break;
+ case tipoEditUdc.prelievo:
+ btnBarcode.Visible = true;
+ btnChiudiInput.Visible = true;
+ btnChiudi.Visible = false;
+ break;
+ case tipoEditUdc.rettifica:
+ btnBarcode.Visible = true;
+ btnChiudiInput.Visible = true;
+ btnChiudi.Visible = false;
+ break;
+ case tipoEditUdc.spostamento:
+ btnBarcode.Visible = true;
+ btnChiudiInput.Visible = true;
+ btnChiudi.Visible = false;
+ break;
+ default:
+ btnBarcode.Visible = true;
+ btnChiudiInput.Visible = false;
+ btnChiudi.Visible = true;
+ break;
+ }
+ }
+ ///
+ /// sistemazione buttons
+ ///
+ private void traduciObj()
+ {
+ // buttons primari
+ btnDeposita.Text = "[4] - " + traduci("Store");
+ btnDeposita.AccessKey = "4";
+ btnSposta.Text = "[5] - " + traduci("Move");
+ btnSposta.AccessKey = "5";
+ btnRettifica.Text = "[6] -" + traduci("Correct");
+ btnRettifica.AccessKey = "6";
+ btnPreleva.Text = "[7] - " + traduci("Take");
+ btnPreleva.AccessKey = "7";
+ btnChiudi.Text = "[9] - Home";
+ btnChiudi.AccessKey = "9";
+ btnChiudiInput.Text = "[0] - " + traduci("Close");
+ btnChiudiInput.AccessKey = "0";
+ btnBarcode.Text = "[1] - Barcode";
+ btnBarcode.AccessKey = "1";
+ // buttons secondari
+ btnConferma.Text = "[2] - OK";
+ btnConferma.AccessKey = "2";
+ btnCellaPiena.Text = "[4] - " + traduci("OkFull");
+ btnCellaPiena.AccessKey = "4";
+ }
+ ///
+ /// wrapper traduzione termini
+ ///
+ ///
+ ///
+ public string traduci(string lemma)
+ {
+ return user_std.UtSn.Traduci(lemma);
+ }
+ ///
+ /// effettua reset del controllo
+ ///
+ ///
+ public void doReset()
+ {
+ // svuoto dati temporanei
+ valoreScanUdc = "";
+ txtScansione = "";
+ editAttivo = tipoEditUdc.nd;
+ // sistema visibilitÃ
+ pnlButtons.Visible = true;
+ pnlInput.Visible = false;
+ // sistemo buttons
+ setupBtn();
+ }
+ ///
+ /// nasconde buttons standard e mostra area "chiudi"
+ ///
+ public void doHideBtn()
+ {
+ // nascondo i bottoni...
+ pnlButtons.Visible = false;
+ setupBtnChiudi();
+ }
+ ///
+ /// resetta panel buttons
+ ///
+ public void doResetPnl()
+ {
+ // nasconde/mostra panels
+ resetInputPanel();
+ setupBtnChiudi();
+ }
+
+ #endregion
+
+ #region gestione input barcode
+
+ ///
+ /// inserito testo nella TextBox
+ ///
+ ///
+ ///
+ protected void txtInput_TextChanged(object sender, EventArgs e)
+ {
+ // salvo in sessione la scansione attuale...
+ valoreScanUdc = txtScansione;
+ // verifica l'input immesso
+ tipoCodiceBarcode answ = TermClass.Ter.riconosciBarcode(txtScansione);
+ switch (editAttivo)
+ {
+ case tipoEditUdc.nd:
+ break;
+ case tipoEditUdc.deposito:
+ verificaInputFaseDepositaSposta(answ);
+ break;
+ case tipoEditUdc.prelievo:
+ break;
+ case tipoEditUdc.rettifica:
+ break;
+ case tipoEditUdc.spostamento:
+ verificaInputFaseDepositaSposta(answ);
+ break;
+ default:
+ break;
+ }
+
+ }
+ ///
+ /// effettua le verifiche dell'input e di conseguenza esegue task quando si è in fase di deposito in cella
+ ///
+ ///
+ private void verificaInputFaseDepositaSposta(tipoCodiceBarcode answ)
+ {
+ switch (answ)
+ {
+ case tipoCodiceBarcode.Cella:
+ lblData.Text = traduci("Box") + ": " + txtScansione;
+ txtScansione = "";
+ // mostro btnConferma
+ btnConferma.Enabled = true;
+ // metto focus
+ btnConferma.Focus();
+ // controllo se la cella sia "papabile" per indicazione "piena"
+ bool alertCapa = false;
+ bool cellaPiena = false;
+ try
+ {
+ DS_magazzino.V_statoCelleCapienzaAssegnatiRow rigaStato = MagClass.magazzino.taStatoCelle.getByCodCella(valoreScanUdc)[0];
+ alertCapa = ((rigaStato.Capienza - rigaStato.UdcAssegnati) <= 1);
+ cellaPiena = MagClass.magazzino.cellaPiena(_CodCS, MagClass.magazzino.IdxCellaByCodCella(_CodCS, valoreScanUdc));
+ }
+ catch
+ { }
+ if (alertCapa && !(cellaPiena))
+ {
+ btnCellaPiena.Enabled = true;
+ btnCellaPiena.Focus();
+ }
+ else
+ {
+ btnCellaPiena.Enabled = false;
+ }
+ break;
+
+ default:
+ lblData.Text = traduci("Code Not Recognized") + ": " + valoreScanUdc;
+ txtInput.Text = "";
+ txtInput.Focus();
+ break;
+ }
+ }
+
+ #endregion
+
+ #region area buttons
+
+ ///
+ /// ritorna alla home
+ ///
+ ///
+ ///
+ protected void btnChiudi_Click(object sender, EventArgs e)
+ {
+ // svuoto da session l'UDC corrente... e pure il barcode corrente...
+ memLayer.ML.emptySessionVal("scannedValue");
+ //memLayer.ML.emptySessionVal("UDC_sel");
+ _UDC = "";
+ memLayer.ML.emptySessionVal("activeTask");
+ Response.Redirect("Home.aspx");
+ }
+ ///
+ /// ritorna alla home
+ ///
+ ///
+ ///
+ protected void btnChiudiInput_Click(object sender, EventArgs e)
+ {
+ // svuoto da session l'UDC corrente... e pure il barcode corrente...
+ memLayer.ML.emptySessionVal("scannedValue");
+ editAttivo = tipoEditUdc.nd;
+ Response.Redirect("UDC.aspx");
+ }
+ ///
+ /// richiesta rettifica dati UDC: qta
+ ///
+ ///
+ ///
+ protected void btnRettifica_Click(object sender, EventArgs e)
+ {
+
+ editAttivo = tipoEditUdc.rettifica;
+#if false
+ frmView.ChangeMode(FormViewMode.Edit);
+ // nascondo i bottoni...
+ pnlButtons.Visible = false;
+ setupBtnChiudi();
+#endif
+ doHideBtn();
+ if (eh_btnPressed != null)
+ {
+ eh_btnPressed(this, new EventArgs());
+ }
+ }
+ ///
+ /// click button deposito
+ ///
+ ///
+ ///
+ protected void btnDeposita_Click(object sender, EventArgs e)
+ {
+ editAttivo = tipoEditUdc.deposito;
+#if false
+ // nasconde/mostra panels
+ resetInputPanel();
+ setupBtnChiudi();
+#endif
+ doResetPnl();
+ if (eh_btnPressed != null)
+ {
+ eh_btnPressed(this, new EventArgs());
+ }
+ }
+ ///
+ /// richiesta di spostamento di un UDC: mostro input x nuova posizione!
+ ///
+ ///
+ ///
+ protected void btnSposta_Click(object sender, EventArgs e)
+ {
+ editAttivo = tipoEditUdc.spostamento;
+#if false
+ // nasconde/mostra panels
+ resetInputPanel();
+ setupBtnChiudi();
+#endif
+ doResetPnl();
+ if (eh_btnPressed != null)
+ {
+ eh_btnPressed(this, new EventArgs());
+ }
+ }
+
+ ///
+ /// richiesto caricamento UDC
+ ///
+ ///
+ ///
+ protected void btnConferma_Click(object sender, EventArgs e)
+ {
+ _cellaPiena = false;
+ callAzioneCella();
+ }
+ ///
+ /// richiesto caricamento UDC e set a piena della cella
+ ///
+ ///
+ ///
+ protected void btnCellaPiena_Click(object sender, EventArgs e)
+ {
+ _cellaPiena = true;
+ callAzioneCella();
+ }
+ ///
+ /// fa una chiamata sulla celal a seconda del tipo di edit attivo
+ ///
+ private void callAzioneCella()
+ {
+ switch (editAttivo)
+ {
+ case tipoEditUdc.nd:
+ break;
+ case tipoEditUdc.deposito:
+ if (eh_btnPressed != null)
+ {
+ eh_btnPressed(this, new EventArgs());
+ }
+#if false
+ depositaUdc(cellaPiena);
+#endif
+ break;
+ case tipoEditUdc.prelievo:
+ break;
+ case tipoEditUdc.rettifica:
+ break;
+ case tipoEditUdc.spostamento:
+ if (eh_btnPressed != null)
+ {
+ eh_btnPressed(this, new EventArgs());
+ }
+#if false
+ spostaUdc(cellaPiena);
+#endif
+ break;
+ default:
+ break;
+ }
+ }
+ ///
+ /// associa l'UDC corrente alla lsita di prelievo attualmente in essere...
+ ///
+ ///
+ ///
+ protected void btnPreleva_Click(object sender, EventArgs e)
+ {
+ MagClass.magazzino.confermaUdcPrelevatoPerLista(_CodLista, _UDC);
+ editAttivo = tipoEditUdc.nd;
+#if false
+ // nasconde/mostra panels
+ resetInputPanel();
+ pnlInput.Visible = false;
+ setupBtnChiudi();
+#endif
+ doHideBtn();
+ doResetPnl();
+ }
+ ///
+ /// passa al barcode!
+ ///
+ ///
+ ///
+ protected void btnBarcode_Click(object sender, EventArgs e)
+ {
+ Response.Redirect("~/Barcode.aspx");
+ }
+
+ #endregion
+
+ }
+}
\ No newline at end of file
diff --git a/GMW/GMW_Term/WebUserControls/mod_btnUdc.ascx.designer.cs b/GMW/GMW_Term/WebUserControls/mod_btnUdc.ascx.designer.cs
new file mode 100644
index 00000000..3907b5a9
--- /dev/null
+++ b/GMW/GMW_Term/WebUserControls/mod_btnUdc.ascx.designer.cs
@@ -0,0 +1,142 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+namespace GMW_Term.WebUserControls {
+
+
+ public partial class mod_btnUdc {
+
+ ///
+ /// pnlButtons control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlButtons;
+
+ ///
+ /// btnDeposita control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnDeposita;
+
+ ///
+ /// btnSposta control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnSposta;
+
+ ///
+ /// btnRettifica control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnRettifica;
+
+ ///
+ /// btnPreleva control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnPreleva;
+
+ ///
+ /// pnlInput control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlInput;
+
+ ///
+ /// txtInput control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtInput;
+
+ ///
+ /// lblData control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblData;
+
+ ///
+ /// btnConferma control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnConferma;
+
+ ///
+ /// btnCellaPiena control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCellaPiena;
+
+ ///
+ /// pnlChiudi control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlChiudi;
+
+ ///
+ /// btnBarcode control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnBarcode;
+
+ ///
+ /// btnChiudi control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnChiudi;
+
+ ///
+ /// btnChiudiInput control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnChiudiInput;
+ }
+}
diff --git a/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx b/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx
index b4e70ae3..f1dfee24 100644
--- a/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx
+++ b/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx
@@ -1,5 +1,6 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_execUdc.ascx.cs"
Inherits="GMW_Term.WebUserControls.mod_execUdc" %>
+<%@ Register Src="mod_btnUdc.ascx" TagName="mod_btnUdc" TagPrefix="uc1" %>
@@ -90,7 +91,8 @@
-
+
+<%--
-
+--%>
\ No newline at end of file
diff --git a/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx.cs b/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx.cs
index b7f94139..e7029b09 100644
--- a/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx.cs
+++ b/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx.cs
@@ -87,6 +87,20 @@ namespace GMW_Term.WebUserControls
}
}
///
+ /// Indica se la cella DI DESTINAZIONE dell'azione sia da indicare come piena
+ ///
+ protected bool _cellaPiena
+ {
+ get
+ {
+ return memLayer.ML.BoolSessionObj("cellaPiena");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("cellaPiena", value);
+ }
+ }
+ ///
/// Particolare della Lista di Prelievo correntemente attiva
///
protected string _PartLdP
@@ -106,6 +120,7 @@ namespace GMW_Term.WebUserControls
return answ;
}
}
+#if false
///
/// testo contenuto nella textbox
///
@@ -119,7 +134,9 @@ namespace GMW_Term.WebUserControls
{
txtInput.Text = value;
}
- }
+ }
+#endif
+
///
/// valore della scansione barcode
///
@@ -169,15 +186,47 @@ namespace GMW_Term.WebUserControls
///
protected void Page_Load(object sender, EventArgs e)
{
+ mod_btnUdc1.eh_btnPressed += new EventHandler(mod_btnUdc1_eh_btnPressed);
if (!Page.IsPostBack)
{
+#if false
pnlButtons.Visible = true;
- pnlInput.Visible = false;
+ pnlInput.Visible = false;
traduciObj();
- setupBtn();
+ setupBtn();
+#endif
}
- txtInput.Focus();
+#if false
+ txtInput.Focus();
+#endif
}
+ ///
+ /// premuto un bottone, di conseguenza adatta grafica e/o funzionalitÃ
+ ///
+ ///
+ ///
+ void mod_btnUdc1_eh_btnPressed(object sender, EventArgs e)
+ {
+ switch (editAttivo)
+ {
+ case tipoEditUdc.nd:
+ break;
+ case tipoEditUdc.deposito:
+ depositaUdc(_cellaPiena);
+ break;
+ case tipoEditUdc.prelievo:
+ break;
+ case tipoEditUdc.rettifica:
+ frmView.ChangeMode(FormViewMode.Edit);
+ break;
+ case tipoEditUdc.spostamento:
+ spostaUdc(_cellaPiena);
+ break;
+ default:
+ break;
+ }
+ }
+#if false
///
/// resetta panel input
///
@@ -285,7 +334,9 @@ namespace GMW_Term.WebUserControls
btnChiudi.Visible = true;
break;
}
- }
+ }
+#endif
+#if false
///
/// sistemazione buttons
///
@@ -311,7 +362,8 @@ namespace GMW_Term.WebUserControls
btnConferma.AccessKey = "2";
btnCellaPiena.Text = "[4] - " + traduci("OkFull");
btnCellaPiena.AccessKey = "4";
- }
+ }
+#endif
///
/// wrapper traduzione termini
///
@@ -340,17 +392,21 @@ namespace GMW_Term.WebUserControls
{
MagClass.magazzino.taCelle.stp_celle_updPiena(idxCella, true);
}
+#if false
// svuoto dati temporanei
valoreScanUdc = "";
txtScansione = "";
editAttivo = tipoEditUdc.nd;
// sistema visibilitÃ
pnlButtons.Visible = true;
- pnlInput.Visible = false;
- // aggiorna dati
- frmView.DataBind();
+ pnlInput.Visible = false;
// sistemo buttons
setupBtn();
+#endif
+ // resetto buttons
+ mod_btnUdc1.doReset();
+ // aggiorna dati
+ frmView.DataBind();
}
///
/// chiama lo spostamento dell'UDC tra la cella attuale e la nuova...
@@ -371,6 +427,7 @@ namespace GMW_Term.WebUserControls
{
MagClass.magazzino.taCelle.stp_celle_updPiena(idxCellaTo, true);
}
+#if false
// svuoto dati temporanei
valoreScanUdc = "";
txtScansione = "";
@@ -378,14 +435,18 @@ namespace GMW_Term.WebUserControls
// sistema visibilitÃ
pnlButtons.Visible = true;
pnlInput.Visible = false;
+ // sistemo buttons
+ setupBtn();
+#endif
+ // resetto buttons
+ mod_btnUdc1.doReset();
// aggiorna dati
frmView.DataBind();
- // sistemo buttons
- setupBtn();
}
#endregion
+#if false
#region gestione input barcode
///
@@ -464,6 +525,8 @@ namespace GMW_Term.WebUserControls
}
#endregion
+
+#endif
#region gestione interazione (buttons & update...)
@@ -485,9 +548,12 @@ namespace GMW_Term.WebUserControls
{
// aggiorno frmView
frmView.DataBind();
+ mod_btnUdc1.doReset();
+#if false
// mostro di nuovo i buttons...
pnlButtons.Visible = true;
- setupBtn();
+ setupBtn();
+#endif
}
///
/// alla chiusura fase di editing
@@ -520,149 +586,6 @@ namespace GMW_Term.WebUserControls
#endregion
- #region area buttons
-
- ///
- /// ritorna alla home
- ///
- ///
- ///
- protected void btnChiudi_Click(object sender, EventArgs e)
- {
- // svuoto da session l'UDC corrente... e pure il barcode corrente...
- memLayer.ML.emptySessionVal("scannedValue");
- //memLayer.ML.emptySessionVal("UDC_sel");
- _UDC = "";
- memLayer.ML.emptySessionVal("activeTask");
- Response.Redirect("Home.aspx");
- }
- ///
- /// ritorna alla home
- ///
- ///
- ///
- protected void btnChiudiInput_Click(object sender, EventArgs e)
- {
- // svuoto da session l'UDC corrente... e pure il barcode corrente...
- memLayer.ML.emptySessionVal("scannedValue");
- editAttivo = tipoEditUdc.nd;
- Response.Redirect("UDC.aspx");
- }
- ///
- /// richiesta rettifica dati UDC: qta
- ///
- ///
- ///
- protected void btnRettifica_Click(object sender, EventArgs e)
- {
- frmView.ChangeMode(FormViewMode.Edit);
- // nascondo i bottoni...
- pnlButtons.Visible = false;
- editAttivo = tipoEditUdc.rettifica;
- setupBtnChiudi();
- }
- ///
- /// click button deposito
- ///
- ///
- ///
- protected void btnDeposita_Click(object sender, EventArgs e)
- {
- // nasconde/mostra panels
- resetInputPanel();
- editAttivo = tipoEditUdc.deposito;
- setupBtnChiudi();
- }
- ///
- /// richiesta di spostamento di un UDC: mostro input x nuova posizione!
- ///
- ///
- ///
- protected void btnSposta_Click(object sender, EventArgs e)
- {
- // nasconde/mostra panels
- resetInputPanel();
- editAttivo = tipoEditUdc.spostamento;
- setupBtnChiudi();
- }
-
- ///
- /// richiesto caricamento UDC
- ///
- ///
- ///
- protected void btnConferma_Click(object sender, EventArgs e)
- {
- bool cellaPiena = false;
- switch (editAttivo)
- {
- case tipoEditUdc.nd:
- break;
- case tipoEditUdc.deposito:
- depositaUdc(cellaPiena);
- break;
- case tipoEditUdc.prelievo:
- break;
- case tipoEditUdc.rettifica:
- break;
- case tipoEditUdc.spostamento:
- spostaUdc(cellaPiena);
- break;
- default:
- break;
- }
- }
- ///
- /// richiesto caricamento UDC e set a piena della cella
- ///
- ///
- ///
- protected void btnCellaPiena_Click(object sender, EventArgs e)
- {
- bool cellaPiena = true;
- switch (editAttivo)
- {
- case tipoEditUdc.nd:
- break;
- case tipoEditUdc.deposito:
- depositaUdc(cellaPiena);
- break;
- case tipoEditUdc.prelievo:
- break;
- case tipoEditUdc.rettifica:
- break;
- case tipoEditUdc.spostamento:
- spostaUdc(cellaPiena);
- break;
- default:
- break;
- }
- }
- ///
- /// associa l'UDC corrente alla lsita di prelievo attualmente in essere...
- ///
- ///
- ///
- protected void btnPreleva_Click(object sender, EventArgs e)
- {
- MagClass.magazzino.confermaUdcPrelevatoPerLista(_CodLista, _UDC);
- // nasconde/mostra panels
- resetInputPanel();
- pnlInput.Visible = false;
- editAttivo = tipoEditUdc.nd;
- setupBtnChiudi();
- }
- ///
- /// passa al barcode!
- ///
- ///
- ///
- protected void btnBarcode_Click(object sender, EventArgs e)
- {
- Response.Redirect("~/Barcode.aspx");
- }
-
- #endregion
#endregion
diff --git a/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx.designer.cs b/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx.designer.cs
index e8449b88..d6d11593 100644
--- a/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx.designer.cs
+++ b/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx.designer.cs
@@ -32,129 +32,12 @@ namespace GMW_Term.WebUserControls {
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
///
- /// pnlButtons control.
+ /// mod_btnUdc1 control.
///
///
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::System.Web.UI.WebControls.Panel pnlButtons;
-
- ///
- /// btnDeposita control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button btnDeposita;
-
- ///
- /// btnSposta control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button btnSposta;
-
- ///
- /// btnRettifica control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button btnRettifica;
-
- ///
- /// btnPreleva control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button btnPreleva;
-
- ///
- /// pnlInput control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Panel pnlInput;
-
- ///
- /// txtInput control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.TextBox txtInput;
-
- ///
- /// lblData control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Label lblData;
-
- ///
- /// btnConferma control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button btnConferma;
-
- ///
- /// btnCellaPiena control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button btnCellaPiena;
-
- ///
- /// pnlChiudi control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Panel pnlChiudi;
-
- ///
- /// btnBarcode control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button btnBarcode;
-
- ///
- /// btnChiudi control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button btnChiudi;
-
- ///
- /// btnChiudiInput control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button btnChiudiInput;
+ protected global::GMW_Term.WebUserControls.mod_btnUdc mod_btnUdc1;
}
}
diff --git a/GMW/GMW_Term/bin/GMW_Term.dll b/GMW/GMW_Term/bin/GMW_Term.dll
index 029ed100..e9f659f9 100644
Binary files a/GMW/GMW_Term/bin/GMW_Term.dll and b/GMW/GMW_Term/bin/GMW_Term.dll differ
diff --git a/GMW/GMW_Term/bin/GMW_data.dll b/GMW/GMW_Term/bin/GMW_data.dll
index 830998a0..92f8b662 100644
Binary files a/GMW/GMW_Term/bin/GMW_data.dll and b/GMW/GMW_Term/bin/GMW_data.dll differ
diff --git a/GMW/GMW_Term/bin/SteamWare.dll b/GMW/GMW_Term/bin/SteamWare.dll
index 138a5124..be3e9969 100644
Binary files a/GMW/GMW_Term/bin/SteamWare.dll and b/GMW/GMW_Term/bin/SteamWare.dll differ
diff --git a/GMW/GMW_Term/obj/Debug/GMW_Term.dll b/GMW/GMW_Term/obj/Debug/GMW_Term.dll
index 029ed100..e9f659f9 100644
Binary files a/GMW/GMW_Term/obj/Debug/GMW_Term.dll and b/GMW/GMW_Term/obj/Debug/GMW_Term.dll differ
diff --git a/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache b/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache
index 7cdf79d7..21dca8f7 100644
Binary files a/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache differ
diff --git a/GMW/GMW_data/SqlScripts/GMW_00258.sql b/GMW/GMW_data/SqlScripts/GMW_00258.sql
index 3aeb7f45..96b7740a 100644
--- a/GMW/GMW_data/SqlScripts/GMW_00258.sql
+++ b/GMW/GMW_data/SqlScripts/GMW_00258.sql
@@ -1,7 +1,131 @@
+-- svuotamento tabelle e dati test da UDC, posizioni e storici
+-- eliminazione posizioni storiche
+delete from PosizioneUdcStorico
+go
+
+-- eliminazione posizioni attuali
+delete from PosizioneUdcCorrente
+go
+
+-- eliminazione posizioni storiche
+delete from PosizioneUdcStorico
+go
+-- elimino da tab batch AS400
+delete from AS400_BatchMovimenti
+go
+
+
+-- elimino storico cartellini
+delete from StoricoCartellini
+go
+
+-- elimino righe liste di prelievo AS
+delete from RigheListePrelievo_AS
+go
+
+-- elimino righe liste di prelievo
+delete from RigheListePrelievo
+go
+
+-- elimino liste di prelievo AS
+delete from ElencoListePrelievo_as
+go
+
+-- elimino liste di prelievo
+delete from ElencoListePrelievo
+go
+
+-- elimino da delibere
+delete from Delibere
+go
+
+-- =============================================
+-- Author: Samuele E. Locatelli
+-- Create date: 2009-09-20
+-- Description: trigger x inserimento movimenti
+-- nella coda di trasferimento batch
+-- verso AS400 x DELETE UDC
+-- =============================================
+ALTER TRIGGER dbo.trg_DelMovAS
+ ON dbo.ElencoCartellini
+ AFTER DELETE
+AS
+BEGIN
+
+ -- setup variabili e verbosità
+ SET NOCOUNT ON;
+ DECLARE @partOk AS BIT
+
+ -- rifare: se c'è delete in blocco DEVE andare ad operare 1 riga alla volta...
+
+ /*
+ -- controllo che CI SIA il particolare (altrimenti non eseguo)
+ SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM deleted)
+
+ IF(@partOk = 1)
+ BEGIN
+ -- metto in storico la posizione attuale dell'UDC (SE esiste) CANCELLATO
+ INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
+ (
+ SELECT GETDATE(), 'UDC_DEL', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), -Qta
+ FROM deleted
+ WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
+ )
+ END
+ */
+END
+
+
+-- elimino cartellini correnti
+delete from ElencoCartellini
+go
+
+-- rimetto trigger
+-- =============================================
+-- Author: Samuele E. Locatelli
+-- Create date: 2009-09-20
+-- Description: trigger x inserimento movimenti
+-- nella coda di trasferimento batch
+-- verso AS400 x DELETE UDC
+-- =============================================
+ALTER TRIGGER dbo.trg_DelMovAS
+ ON dbo.ElencoCartellini
+ AFTER DELETE
+AS
+BEGIN
+
+ -- setup variabili e verbosità
+ SET NOCOUNT ON;
+ -- inserisco movimenti AS
+ INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
+ (
+ SELECT GETDATE(), 'UDC_DEL', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), -Qta
+ FROM deleted
+ WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1) AND ((CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END) = 1)
+ )
+
+END
+go
+
+
+-- elimino storico cartellini
+DELETE FROM StoricoCartellini
+go
+
+-- indico tutte celle vuote!
+update Celle
+set Piena = 0
+GO
+
+-- resetto contatori!
+delete from ContatoriListePrelievo
+go
+
+delete from ContatoriUdc
+go
--- aggiungo stored di alimentazione multistep tabelle AS400 (RawData e RilPro)
-- registro versione...
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(258, GETDATE())
diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll
index 64402b5b..92f8b662 100644
Binary files a/GMW/GMW_data/bin/Debug/GMW_data.dll and b/GMW/GMW_data/bin/Debug/GMW_data.dll differ
diff --git a/GMW/GMW_data/bin/Debug/SteamWare.dll b/GMW/GMW_data/bin/Debug/SteamWare.dll
index 4f6c4f69..be3e9969 100644
Binary files a/GMW/GMW_data/bin/Debug/SteamWare.dll and b/GMW/GMW_data/bin/Debug/SteamWare.dll differ
diff --git a/GMW/GMW_data/obj/Debug/GMW_data.dll b/GMW/GMW_data/obj/Debug/GMW_data.dll
index 64402b5b..92f8b662 100644
Binary files a/GMW/GMW_data/obj/Debug/GMW_data.dll and b/GMW/GMW_data/obj/Debug/GMW_data.dll differ
diff --git a/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll b/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll
index a7ae4930..748bf6f1 100644
Binary files a/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll and b/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll differ
diff --git a/GMW/GMW_data/obj/Debug/ResolveAssemblyReference.cache b/GMW/GMW_data/obj/Debug/ResolveAssemblyReference.cache
index f972974e..f43094bd 100644
Binary files a/GMW/GMW_data/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW_data/obj/Debug/ResolveAssemblyReference.cache differ