diff --git a/MP-ADM/WebUserControls/mod_newOdl.ascx.cs b/MP-ADM/WebUserControls/mod_newOdl.ascx.cs
index f800f327..3245d2b9 100644
--- a/MP-ADM/WebUserControls/mod_newOdl.ascx.cs
+++ b/MP-ADM/WebUserControls/mod_newOdl.ascx.cs
@@ -2,162 +2,158 @@
using SteamWare;
using System;
-namespace MoonPro_site.WebUserControls
+namespace MP_ADM.WebUserControls
{
- public partial class mod_newOdl : System.Web.UI.UserControl
- {
- ///
- /// Oggetto datalayer specifico
- ///
- DataLayer DataLayerObj = new DataLayer();
- protected void Page_Load(object sender, EventArgs e)
+ public partial class mod_newOdl : BaseUserControl
{
-
- }
-
- #region gestione eventi
-
- public event EventHandler eh_nuovoValore;
-
- #endregion
-
- ///
- /// conferma inserimento TC
- ///
- ///
- ///
- protected void btnOk_Click(object sender, EventArgs e)
- {
- // controllo se ho tutti i valori ok...
- string CodArticolo = "";
- string IdxMacchina = "";
- int numPezzi = 0;
- int pzPallet = 1;
- decimal TCiclo = 0;
-
- try
- {
- CodArticolo = ddlArticolo.SelectedValue;
- IdxMacchina = ddlMacchine.SelectedValue;
- //IdxMacchina = txtMacchina.Text.Trim();
- // se IdxMacchina è vuoto metto null...
- if (IdxMacchina == "")
+ protected void Page_Load(object sender, EventArgs e)
{
- IdxMacchina = "0";
- }
- numPezzi = Convert.ToInt32(txtPezzi.Text.Trim());
- TCiclo = Convert.ToDecimal(txtTempoCiclo.Text.Trim().Replace(".", ","));
- pzPallet = Convert.ToInt32(txtPzPallet.Text.Trim());
- DataLayerObj.taODL.InsertQuery(CodArticolo, DataLayerObj.MatrOpr, IdxMacchina, numPezzi, TCiclo, pzPallet, chkToAs400.Checked, txtCommessa.Text.Trim());
- }
- catch
- {
- logger.lg.scriviLog(string.Format("Non sono riuscito ad inserire l'ODL con i seguenti parametri: {0} | {1} | {2} | {3} | {4}", CodArticolo, IdxMacchina, numPezzi, TCiclo, pzPallet), tipoLog.ERROR);
- }
- // segnalo update
- if (eh_nuovoValore != null)
- {
- eh_nuovoValore(this, new EventArgs());
- }
- }
- ///
- /// annullamento inserimento
- ///
- ///
- ///
- protected void btnCancel_Click(object sender, EventArgs e)
- {
- if (eh_nuovoValore != null)
- {
- eh_nuovoValore(this, new EventArgs());
- }
- }
- ///
- /// aggiorno label min e centesimi
- ///
- ///
- ///
- protected void txtTempoCiclo_TextChanged(object sender, EventArgs e)
- {
- string text = "";
- string txtMinCent = txtTempoCiclo.Text.Trim().Replace(".", ",");
- int min = 0;
- int sec = 0;
- try
- {
- // cerco di convertire in min/sec
- min = Convert.ToInt32(Math.Floor(Convert.ToDouble(txtMinCent)));
- sec = Convert.ToInt32((Convert.ToDouble(txtMinCent) - min) * 60);
- text = string.Format("{0}:{1:00}", min, sec);
- }
- catch
- { }
- lblMinSec.Text = text;
- }
- ///
- /// selezione articolo
- ///
- ///
- ///
- protected void ddlArticolo_SelectedIndexChanged(object sender, EventArgs e)
- {
- showLastTimeAndNote();
- }
- ///
- /// mostro elenco ultimi 5 tempi e note...
- ///
- private void showLastTimeAndNote()
- {
- // update tempi ciclo!
- grViewTempi.DataBind();
- }
- ///
- /// selezione impianto
- ///
- ///
- ///
- protected void ddlMacchine_SelectedIndexChanged(object sender, EventArgs e)
- {
- showLastTimeAndNote();
- }
- ///
- /// reset della selezione
- ///
- ///
- ///
- protected void btnReset_Click(object sender, EventArgs e)
- {
- resetSelezione();
+ }
+
+ #region gestione eventi
+
+ public event EventHandler eh_nuovoValore;
+
+ #endregion
+
+ ///
+ /// conferma inserimento TC
+ ///
+ ///
+ ///
+ protected void btnOk_Click(object sender, EventArgs e)
+ {
+ // controllo se ho tutti i valori ok...
+ string CodArticolo = "";
+ string IdxMacchina = "";
+ int numPezzi = 0;
+ int pzPallet = 1;
+ decimal TCiclo = 0;
+
+ try
+ {
+ CodArticolo = ddlArticolo.SelectedValue;
+ IdxMacchina = ddlMacchine.SelectedValue;
+ //IdxMacchina = txtMacchina.Text.Trim();
+ // se IdxMacchina è vuoto metto null...
+ if (IdxMacchina == "")
+ {
+ IdxMacchina = "0";
+ }
+ numPezzi = Convert.ToInt32(txtPezzi.Text.Trim());
+ TCiclo = Convert.ToDecimal(txtTempoCiclo.Text.Trim().Replace(".", ","));
+ pzPallet = Convert.ToInt32(txtPzPallet.Text.Trim());
+ DataLayerObj.taODL.InsertQuery(CodArticolo, DataLayerObj.MatrOpr, IdxMacchina, numPezzi, TCiclo, pzPallet, chkToAs400.Checked, txtCommessa.Text.Trim());
+ }
+ catch
+ {
+ logger.lg.scriviLog(string.Format("Non sono riuscito ad inserire l'ODL con i seguenti parametri: {0} | {1} | {2} | {3} | {4}", CodArticolo, IdxMacchina, numPezzi, TCiclo, pzPallet), tipoLog.ERROR);
+ }
+ // segnalo update
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
+ }
+ ///
+ /// annullamento inserimento
+ ///
+ ///
+ ///
+ protected void btnCancel_Click(object sender, EventArgs e)
+ {
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
+ }
+ ///
+ /// aggiorno label min e centesimi
+ ///
+ ///
+ ///
+ protected void txtTempoCiclo_TextChanged(object sender, EventArgs e)
+ {
+ string text = "";
+ string txtMinCent = txtTempoCiclo.Text.Trim().Replace(".", ",");
+ int min = 0;
+ int sec = 0;
+ try
+ {
+ // cerco di convertire in min/sec
+ min = Convert.ToInt32(Math.Floor(Convert.ToDouble(txtMinCent)));
+ sec = Convert.ToInt32((Convert.ToDouble(txtMinCent) - min) * 60);
+ text = string.Format("{0}:{1:00}", min, sec);
+ }
+ catch
+ { }
+ lblMinSec.Text = text;
+ }
+ ///
+ /// selezione articolo
+ ///
+ ///
+ ///
+ protected void ddlArticolo_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ showLastTimeAndNote();
+ }
+ ///
+ /// mostro elenco ultimi 5 tempi e note...
+ ///
+ private void showLastTimeAndNote()
+ {
+ // update tempi ciclo!
+ grViewTempi.DataBind();
+ }
+ ///
+ /// selezione impianto
+ ///
+ ///
+ ///
+ protected void ddlMacchine_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ showLastTimeAndNote();
+ }
+
+ ///
+ /// reset della selezione
+ ///
+ ///
+ ///
+ protected void btnReset_Click(object sender, EventArgs e)
+ {
+ resetSelezione();
+ }
+ ///
+ /// resetta la selezione dei valori in caso di modifiche su altri controlli
+ ///
+ public void resetSelezione()
+ {
+ grViewTempi.SelectedIndex = -1;
+ grViewTempi.DataBind();
+ }
+ ///
+ /// evento selezione riga: salvo tempo e qta nei campi input...
+ ///
+ ///
+ ///
+ protected void grViewTempi_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ // ricavo i dati selezionati
+ int idxOdl = 0;
+ try
+ {
+ idxOdl = Convert.ToInt32(grViewTempi.SelectedValue);
+ }
+ catch
+ { }
+ MapoDb.DS_ProdTempi.ODLRow rigaOdl = DataLayerObj.taODL.getByIdx(idxOdl, false)[0];
+ // precompilo dati pezzi/tempi
+ txtPezzi.Text = rigaOdl.NumPezzi.ToString();
+ txtTempoCiclo.Text = rigaOdl.TCAssegnato.ToString("0.00");
+ txtPzPallet.Text = rigaOdl.PzPallet.ToString();
+ }
}
- ///
- /// resetta la selezione dei valori in caso di modifiche su altri controlli
- ///
- public void resetSelezione()
- {
- grViewTempi.SelectedIndex = -1;
- grViewTempi.DataBind();
- }
- ///
- /// evento selezione riga: salvo tempo e qta nei campi input...
- ///
- ///
- ///
- protected void grViewTempi_SelectedIndexChanged(object sender, EventArgs e)
- {
- // ricavo i dati selezionati
- int idxOdl = 0;
- try
- {
- idxOdl = Convert.ToInt32(grViewTempi.SelectedValue);
- }
- catch
- { }
- MapoDb.DS_ProdTempi.ODLRow rigaOdl = DataLayerObj.taODL.getByIdx(idxOdl, false)[0];
- // precompilo dati pezzi/tempi
- txtPezzi.Text = rigaOdl.NumPezzi.ToString();
- txtTempoCiclo.Text = rigaOdl.TCAssegnato.ToString("0.00");
- txtPzPallet.Text = rigaOdl.PzPallet.ToString();
- }
- }
}
\ No newline at end of file
diff --git a/MP-ADM/WebUserControls/mod_newOdl.ascx.designer.cs b/MP-ADM/WebUserControls/mod_newOdl.ascx.designer.cs
index 4481a233..efa228e9 100644
--- a/MP-ADM/WebUserControls/mod_newOdl.ascx.designer.cs
+++ b/MP-ADM/WebUserControls/mod_newOdl.ascx.designer.cs
@@ -1,177 +1,178 @@
//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
+//
+// Codice generato da uno strumento.
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
+// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
+// il codice viene rigenerato.
+//
//------------------------------------------------------------------------------
-namespace MoonPro_site.WebUserControls
+namespace MP_ADM.WebUserControls
{
- public partial class mod_newOdl {
-
+ public partial class mod_newOdl
+ {
+
///
- /// ddlArticolo control.
+ /// Controllo ddlArticolo.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.DropDownList ddlArticolo;
-
+
///
- /// odsArticoli control.
+ /// Controllo odsArticoli.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.ObjectDataSource odsArticoli;
-
+
///
- /// ddlMacchine control.
+ /// Controllo ddlMacchine.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.DropDownList ddlMacchine;
-
+
///
- /// odsMacchine control.
+ /// Controllo odsMacchine.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.ObjectDataSource odsMacchine;
-
+
///
- /// txtPezzi control.
+ /// Controllo txtPezzi.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.TextBox txtPezzi;
-
+
///
- /// rfvPezzi control.
+ /// Controllo rfvPezzi.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvPezzi;
-
+
///
- /// chkToAs400 control.
+ /// Controllo chkToAs400.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.CheckBox chkToAs400;
-
+
///
- /// txtTempoCiclo control.
+ /// Controllo txtTempoCiclo.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.TextBox txtTempoCiclo;
-
+
///
- /// lblMinSec control.
+ /// Controllo lblMinSec.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblMinSec;
-
+
///
- /// rfvTempoCiclo control.
+ /// Controllo rfvTempoCiclo.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvTempoCiclo;
-
+
///
- /// txtPzPallet control.
+ /// Controllo txtPzPallet.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.TextBox txtPzPallet;
-
+
///
- /// rfvPzPallet control.
+ /// Controllo rfvPzPallet.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvPzPallet;
-
+
///
- /// txtCommessa control.
+ /// Controllo txtCommessa.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.TextBox txtCommessa;
-
+
///
- /// btnOk control.
+ /// Controllo btnOk.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Button btnOk;
-
+
///
- /// btnCancel control.
+ /// Controllo btnCancel.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Button btnCancel;
-
+
///
- /// divTempi control.
+ /// Controllo divTempi.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divTempi;
-
+
///
- /// grViewTempi control.
+ /// Controllo grViewTempi.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.GridView grViewTempi;
-
+
///
- /// odsTempi control.
+ /// Controllo odsTempi.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.ObjectDataSource odsTempi;
}
diff --git a/MP-ADM/WebUserControls/mod_newPromessaODL.ascx.cs b/MP-ADM/WebUserControls/mod_newPromessaODL.ascx.cs
index 7e8a7161..6675946d 100644
--- a/MP-ADM/WebUserControls/mod_newPromessaODL.ascx.cs
+++ b/MP-ADM/WebUserControls/mod_newPromessaODL.ascx.cs
@@ -5,211 +5,207 @@ using System.Web.UI;
namespace MP_ADM.WebUserControls
{
- public partial class mod_newPromessaODL : System.Web.UI.UserControl
- {
- ///
- /// Oggetto datalayer specifico
- ///
- DataLayer DataLayerObj = new DataLayer();
- protected void Page_Load(object sender, EventArgs e)
+ public partial class mod_newPromessaODL : BaseUserControl
{
- if (!Page.IsPostBack)
- {
- setDefaults();
- }
- }
- ///
- /// Testo conferma salvataggio (create/Edit)
- ///
- public string testoConf
- {
- get
- {
- string answ = "Crea Promessa ODL";
- if (memLayer.ML.isInSessionObject("idxProm2Edit"))
+ protected void Page_Load(object sender, EventArgs e)
{
- answ = "Edit Promessa ODL";
+ if (!Page.IsPostBack)
+ {
+ setDefaults();
+ }
}
- return answ;
- }
- }
- public void doSelPODL()
- {
- // se ho una promessa da clonare copio dati da quella...
- int idxProm = 0;
- try
- {
- if (memLayer.ML.isInSessionObject("idxProm2Clone"))
+ ///
+ /// Testo conferma salvataggio (create/Edit)
+ ///
+ public string testoConf
{
- idxProm = memLayer.ML.IntSessionObj("idxProm2Clone");
+ get
+ {
+ string answ = "Crea Promessa ODL";
+ if (memLayer.ML.isInSessionObject("idxProm2Edit"))
+ {
+ answ = "Edit Promessa ODL";
+ }
+ return answ;
+ }
}
- else if (memLayer.ML.isInSessionObject("idxProm2Edit"))
+ public void doSelPODL()
{
- idxProm = memLayer.ML.IntSessionObj("idxProm2Edit");
+ // se ho una promessa da clonare copio dati da quella...
+ int idxProm = 0;
+ try
+ {
+ if (memLayer.ML.isInSessionObject("idxProm2Clone"))
+ {
+ idxProm = memLayer.ML.IntSessionObj("idxProm2Clone");
+ }
+ else if (memLayer.ML.isInSessionObject("idxProm2Edit"))
+ {
+ idxProm = memLayer.ML.IntSessionObj("idxProm2Edit");
+ }
+ // provo a selezionare
+ var tPODL = DataLayerObj.taPODL.getByKey(idxProm);
+ if (tPODL.Rows.Count > 0)
+ {
+ var rPODL = tPODL[0];
+ txtSearch.Text = rPODL.CodArticolo;
+ ddlArticolo.DataBind();
+ ddlArticolo.SelectedValue = rPODL.CodArticolo;
+ ddlGruppi.DataBind();
+ ddlGruppi.SelectedValue = rPODL.CodGruppo;
+ txtNumPz.Text = rPODL.NumPezzi.ToString();
+ txtPzPallet.Text = rPODL.PzPallet.ToString();
+ txtPrio.Text = rPODL.Priorita.ToString();
+ if (memLayer.ML.cdvb("ADM_TC_MinSec"))
+ {
+ txtTCms.Text = TempiCiclo.minSec(rPODL.TCAssegnato);
+ }
+ else
+ {
+ txtTCmc.Text = rPODL.TCAssegnato.ToString("N3");
+ }
+ ddlMacchine.SelectedValue = rPODL.IdxMacchina;
+ txtKeyExt.Text = rPODL.KeyRichiesta;
+ // svuoto se ci fosse cloning......
+ memLayer.ML.emptySessionVal("idxProm2Clone");
+ }
+ }
+ catch
+ { }
}
- // provo a selezionare
- var tPODL = DataLayerObj.taPODL.getByKey(idxProm);
- if (tPODL.Rows.Count > 0)
- {
- var rPODL = tPODL[0];
- txtSearch.Text = rPODL.CodArticolo;
- ddlArticolo.DataBind();
- ddlArticolo.SelectedValue = rPODL.CodArticolo;
- ddlGruppi.DataBind();
- ddlGruppi.SelectedValue = rPODL.CodGruppo;
- txtNumPz.Text = rPODL.NumPezzi.ToString();
- txtPzPallet.Text = rPODL.PzPallet.ToString();
- txtPrio.Text = rPODL.Priorita.ToString();
- if (memLayer.ML.cdvb("ADM_TC_MinSec"))
- {
- txtTCms.Text = TempiCiclo.minSec(rPODL.TCAssegnato);
- }
- else
- {
- txtTCmc.Text = rPODL.TCAssegnato.ToString("N3");
- }
- ddlMacchine.SelectedValue = rPODL.IdxMacchina;
- txtKeyExt.Text = rPODL.KeyRichiesta;
- // svuoto se ci fosse cloning......
- memLayer.ML.emptySessionVal("idxProm2Clone");
- }
- }
- catch
- { }
- }
- private void setDefaults()
- {
- // se abilitato in config inserisce i valori defaults x insert...
- if (memLayer.ML.cdvb("resetDefaultPromessaOdl"))
- {
- txtNumPz.Text = "1";
- txtPzPallet.Text = "1";
- txtPrio.Text = "1";
- // in base ad impostazione mostro TC come min:sec o min.cent
- divTCms.Visible = false;
- divTCmc.Visible = false;
- if (memLayer.ML.cdvb("ADM_TC_MinSec"))
+ private void setDefaults()
{
- divTCms.Visible = true;
- txtTCms.Text = "1:00";
+ // se abilitato in config inserisce i valori defaults x insert...
+ if (memLayer.ML.cdvb("resetDefaultPromessaOdl"))
+ {
+ txtNumPz.Text = "1";
+ txtPzPallet.Text = "1";
+ txtPrio.Text = "1";
+ // in base ad impostazione mostro TC come min:sec o min.cent
+ divTCms.Visible = false;
+ divTCmc.Visible = false;
+ if (memLayer.ML.cdvb("ADM_TC_MinSec"))
+ {
+ divTCms.Visible = true;
+ txtTCms.Text = "1:00";
+ }
+ else
+ {
+ divTCmc.Visible = true;
+ txtTCmc.Text = "1.00";
+ }
+ memLayer.ML.emptySessionVal("idxProm2Clone");
+ memLayer.ML.emptySessionVal("idxProm2Edit");
+ }
}
- else
+
+ protected void txtSearch_TextChanged(object sender, EventArgs e)
{
- divTCmc.Visible = true;
- txtTCmc.Text = "1.00";
+ ddlArticolo.DataBind();
}
- memLayer.ML.emptySessionVal("idxProm2Clone");
- memLayer.ML.emptySessionVal("idxProm2Edit");
- }
- }
- protected void txtSearch_TextChanged(object sender, EventArgs e)
- {
- ddlArticolo.DataBind();
- }
+ #region gestione eventi
- #region gestione eventi
+ public event EventHandler eh_nuovoValore;
- public event EventHandler eh_nuovoValore;
+ #endregion
- #endregion
-
- ///
- /// conferma inserimento TC
- ///
- ///
- ///
- protected void btnOk_Click(object sender, EventArgs e)
- {
- // controllo se ho tutti i valori ok...
- string CodArticolo = "";
- string Gruppo = "";
- string IdxMacchina = "";
- string KeyReq = "";
- int numPezzi = 0;
- int pzPallet = 1;
- decimal TCiclo = 0;
- bool attiv = false;
- int prio = 0;
-
- try
- {
- CodArticolo = ddlArticolo.SelectedValue;
- Gruppo = ddlGruppi.SelectedValue;
- IdxMacchina = ddlMacchine.SelectedValue;
- KeyReq = txtKeyExt.Text.Trim();
- //IdxMacchina = txtMacchina.Text.Trim();
- // se IdxMacchina è vuoto metto null...
- if (IdxMacchina == "")
+ ///
+ /// conferma inserimento TC
+ ///
+ ///
+ ///
+ protected void btnOk_Click(object sender, EventArgs e)
{
- IdxMacchina = "0";
- }
- numPezzi = Convert.ToInt32(txtNumPz.Text.Trim());
+ // controllo se ho tutti i valori ok...
+ string CodArticolo = "";
+ string Gruppo = "";
+ string IdxMacchina = "";
+ string KeyReq = "";
+ int numPezzi = 0;
+ int pzPallet = 1;
+ decimal TCiclo = 0;
+ bool attiv = false;
+ int prio = 0;
- if (memLayer.ML.cdvb("ADM_TC_MinSec"))
- {
- string[] sTC = txtTCms.Text.Trim().Split(':');
- int numMin = 0;
- int numSec = 0;
- int.TryParse(sTC[0], out numMin);
- int.TryParse(sTC[1], out numSec);
- TCiclo = numMin + ((decimal)numSec) / 60;
- }
- else
- {
- decimal.TryParse(txtTCmc.Text.Replace(".", ","), out TCiclo);
- }
- pzPallet = Convert.ToInt32(txtPzPallet.Text.Trim());
- attiv = chkAttiv.Checked;
- int.TryParse(txtPrio.Text, out prio);
+ try
+ {
+ CodArticolo = ddlArticolo.SelectedValue;
+ Gruppo = ddlGruppi.SelectedValue;
+ IdxMacchina = ddlMacchine.SelectedValue;
+ KeyReq = txtKeyExt.Text.Trim();
+ //IdxMacchina = txtMacchina.Text.Trim();
+ // se IdxMacchina è vuoto metto null...
+ if (IdxMacchina == "")
+ {
+ IdxMacchina = "0";
+ }
+ numPezzi = Convert.ToInt32(txtNumPz.Text.Trim());
- // controllo se sono in modalità EDIT faccio un update, altrimenti faccio un INSERT...
- if (memLayer.ML.isInSessionObject("idxProm2Edit"))
- {
- int idxProm = memLayer.ML.IntSessionObj("idxProm2Edit");
- DataLayerObj.taPODL.updateQuery(KeyReq, KeyReq, attiv, CodArticolo, Gruppo, IdxMacchina, numPezzi, TCiclo, DateTime.Now, prio, pzPallet, idxProm);
- memLayer.ML.emptySessionVal("idxProm2Edit");
+ if (memLayer.ML.cdvb("ADM_TC_MinSec"))
+ {
+ string[] sTC = txtTCms.Text.Trim().Split(':');
+ int numMin = 0;
+ int numSec = 0;
+ int.TryParse(sTC[0], out numMin);
+ int.TryParse(sTC[1], out numSec);
+ TCiclo = numMin + ((decimal)numSec) / 60;
+ }
+ else
+ {
+ decimal.TryParse(txtTCmc.Text.Replace(".", ","), out TCiclo);
+ }
+ pzPallet = Convert.ToInt32(txtPzPallet.Text.Trim());
+ attiv = chkAttiv.Checked;
+ int.TryParse(txtPrio.Text, out prio);
+
+ // controllo se sono in modalità EDIT faccio un update, altrimenti faccio un INSERT...
+ if (memLayer.ML.isInSessionObject("idxProm2Edit"))
+ {
+ int idxProm = memLayer.ML.IntSessionObj("idxProm2Edit");
+ DataLayerObj.taPODL.updateQuery(KeyReq, KeyReq, attiv, CodArticolo, Gruppo, IdxMacchina, numPezzi, TCiclo, DateTime.Now, prio, pzPallet, idxProm);
+ memLayer.ML.emptySessionVal("idxProm2Edit");
+ }
+ else
+ {
+ // 2018.09.25 --> inserisco PROMESSA ODL
+ //MapoDb.DataLayerObj.taODL.InsertQuery(CodArticolo, MapoDb.DataLayer.MatrOpr, IdxMacchina, numPezzi, TCiclo, pzPallet, chkToAs400.Checked, txtCommessa.Text.Trim());
+ DataLayerObj.taPODL.insertQuery(KeyReq, KeyReq, attiv, CodArticolo, Gruppo, IdxMacchina, numPezzi, TCiclo, DateTime.Now, prio, pzPallet, "");
+ }
+ }
+ catch (Exception exc)
+ {
+ logger.lg.scriviLog(string.Format("Non sono riuscito ad inserire la PromessaODL con i seguenti parametri: {0} | {1} | {2} | {3} | {4} | {5} | {6} | {7} | {8}{9}{10}", KeyReq, attiv, CodArticolo, IdxMacchina, numPezzi, TCiclo, prio, pzPallet, memLayer.ML.IntSessionObj("idxProm2Edit"), Environment.NewLine, exc), tipoLog.EXCEPTION);
+ memLayer.ML.emptySessionVal("idxProm2Edit");
+ }
+ // segnalo update
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
}
- else
+ ///
+ /// annullamento inserimento
+ ///
+ ///
+ ///
+ protected void btnCancel_Click(object sender, EventArgs e)
{
- // 2018.09.25 --> inserisco PROMESSA ODL
- //MapoDb.DataLayerObj.taODL.InsertQuery(CodArticolo, MapoDb.DataLayer.MatrOpr, IdxMacchina, numPezzi, TCiclo, pzPallet, chkToAs400.Checked, txtCommessa.Text.Trim());
- DataLayerObj.taPODL.insertQuery(KeyReq, KeyReq, attiv, CodArticolo, Gruppo, IdxMacchina, numPezzi, TCiclo, DateTime.Now, prio, pzPallet, "");
+ memLayer.ML.emptySessionVal("idxProm2Clone");
+ memLayer.ML.emptySessionVal("idxProm2Edit");
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
}
- }
- catch (Exception exc)
- {
- logger.lg.scriviLog(string.Format("Non sono riuscito ad inserire la PromessaODL con i seguenti parametri: {0} | {1} | {2} | {3} | {4} | {5} | {6} | {7} | {8}{9}{10}", KeyReq, attiv, CodArticolo, IdxMacchina, numPezzi, TCiclo, prio, pzPallet, memLayer.ML.IntSessionObj("idxProm2Edit"), Environment.NewLine, exc), tipoLog.EXCEPTION);
- memLayer.ML.emptySessionVal("idxProm2Edit");
- }
- // segnalo update
- if (eh_nuovoValore != null)
- {
- eh_nuovoValore(this, new EventArgs());
- }
- }
- ///
- /// annullamento inserimento
- ///
- ///
- ///
- protected void btnCancel_Click(object sender, EventArgs e)
- {
- memLayer.ML.emptySessionVal("idxProm2Clone");
- memLayer.ML.emptySessionVal("idxProm2Edit");
- if (eh_nuovoValore != null)
- {
- eh_nuovoValore(this, new EventArgs());
- }
- }
- ///
- /// aggiorno label min e centesimi
- ///
- ///
- ///
- protected void txtTempoCiclo_TextChanged(object sender, EventArgs e)
- {
+ ///
+ /// aggiorno label min e centesimi
+ ///
+ ///
+ ///
+ protected void txtTempoCiclo_TextChanged(object sender, EventArgs e)
+ {
#if false
string text = "";
string txtMinCent = txtTempoCiclo.Text.Trim().Replace(".", ",");
@@ -226,87 +222,87 @@ namespace MP_ADM.WebUserControls
{ }
lblMinSec.Text = text;
#endif
- }
- ///
- /// selezione articolo
- ///
- ///
- ///
- protected void ddlArticolo_SelectedIndexChanged(object sender, EventArgs e)
- {
- showLastTimeAndNote();
- }
- ///
- /// mostro elenco ultimi 5 tempi e note...
- ///
- private void showLastTimeAndNote()
- {
- // update tempi ciclo!
- grViewTempi.DataBind();
- }
- ///
- /// selezione impianto
- ///
- ///
- ///
- protected void ddlMacchine_SelectedIndexChanged(object sender, EventArgs e)
- {
- showLastTimeAndNote();
- }
- ///
- /// selezione impianto
- ///
- ///
- ///
- protected void ddlGruppi_SelectedIndexChanged(object sender, EventArgs e)
- {
- ddlMacchine.DataBind();
- }
+ }
+ ///
+ /// selezione articolo
+ ///
+ ///
+ ///
+ protected void ddlArticolo_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ showLastTimeAndNote();
+ }
+ ///
+ /// mostro elenco ultimi 5 tempi e note...
+ ///
+ private void showLastTimeAndNote()
+ {
+ // update tempi ciclo!
+ grViewTempi.DataBind();
+ }
+ ///
+ /// selezione impianto
+ ///
+ ///
+ ///
+ protected void ddlMacchine_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ showLastTimeAndNote();
+ }
+ ///
+ /// selezione impianto
+ ///
+ ///
+ ///
+ protected void ddlGruppi_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ ddlMacchine.DataBind();
+ }
- ///
- /// reset della selezione
- ///
- ///
- ///
- protected void btnReset_Click(object sender, EventArgs e)
- {
- resetSelezione();
+ ///
+ /// reset della selezione
+ ///
+ ///
+ ///
+ protected void btnReset_Click(object sender, EventArgs e)
+ {
+ resetSelezione();
+ }
+ ///
+ /// resetta la selezione dei valori in caso di modifiche su altri controlli
+ ///
+ public void resetSelezione()
+ {
+ grViewTempi.SelectedIndex = -1;
+ grViewTempi.DataBind();
+ }
+ ///
+ /// evento selezione riga: salvo tempo e qta nei campi input...
+ ///
+ ///
+ ///
+ protected void grViewTempi_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ // ricavo i dati selezionati
+ int idxOdl = 0;
+ try
+ {
+ idxOdl = Convert.ToInt32(grViewTempi.SelectedValue);
+ }
+ catch
+ { }
+ DS_ProdTempi.ODLRow rigaOdl = DataLayerObj.taODL.getByIdx(idxOdl, false)[0];
+ // precompilo dati pezzi/tempi
+ txtNumPz.Text = rigaOdl.NumPezzi.ToString();
+ if (memLayer.ML.cdvb("ADM_TC_MinSec"))
+ {
+ txtTCms.Text = TempiCiclo.minSec(rigaOdl.TCAssegnato);
+ }
+ else
+ {
+ txtTCmc.Text = rigaOdl.TCAssegnato.ToString("N3");
+ }
+ txtPzPallet.Text = rigaOdl.PzPallet.ToString();
+ }
}
- ///
- /// resetta la selezione dei valori in caso di modifiche su altri controlli
- ///
- public void resetSelezione()
- {
- grViewTempi.SelectedIndex = -1;
- grViewTempi.DataBind();
- }
- ///
- /// evento selezione riga: salvo tempo e qta nei campi input...
- ///
- ///
- ///
- protected void grViewTempi_SelectedIndexChanged(object sender, EventArgs e)
- {
- // ricavo i dati selezionati
- int idxOdl = 0;
- try
- {
- idxOdl = Convert.ToInt32(grViewTempi.SelectedValue);
- }
- catch
- { }
- DS_ProdTempi.ODLRow rigaOdl = DataLayerObj.taODL.getByIdx(idxOdl, false)[0];
- // precompilo dati pezzi/tempi
- txtNumPz.Text = rigaOdl.NumPezzi.ToString();
- if (memLayer.ML.cdvb("ADM_TC_MinSec"))
- {
- txtTCms.Text = TempiCiclo.minSec(rigaOdl.TCAssegnato);
- }
- else
- {
- txtTCmc.Text = rigaOdl.TCAssegnato.ToString("N3");
- }
- txtPzPallet.Text = rigaOdl.PzPallet.ToString();
- }
- }
}
\ No newline at end of file
diff --git a/MP-ADM/WebUserControls/mod_ricercaGenerica.ascx.cs b/MP-ADM/WebUserControls/mod_ricercaGenerica.ascx.cs
index c1e2a038..b3fea8d2 100644
--- a/MP-ADM/WebUserControls/mod_ricercaGenerica.ascx.cs
+++ b/MP-ADM/WebUserControls/mod_ricercaGenerica.ascx.cs
@@ -67,12 +67,12 @@ public partial class mod_ricercaGenerica : ApplicationUserControl
{
if (testoRicerca == "")
{
- SteamWare.memLayer.ML.emptySessionVal("valoreCercato");
- SteamWare.memLayer.ML.emptySessionVal("listaMatricoleSearch");
+ memLayer.ML.emptySessionVal("valoreCercato");
+ memLayer.ML.emptySessionVal("listaMatricoleSearch");
}
else
{
- SteamWare.memLayer.ML.setSessionVal("valoreCercato", testoRicerca);
+ memLayer.ML.setSessionVal("valoreCercato", testoRicerca);
// verifico ricerche accessorie
if (_cercaMatricole)
{
@@ -105,7 +105,7 @@ public partial class mod_ricercaGenerica : ApplicationUserControl
{
listaMatricoleSearch = listaMatricoleSearch.Remove(listaMatricoleSearch.Length - 2);
}
- SteamWare.memLayer.ML.setSessionVal("listaMatricoleSearch", listaMatricoleSearch);
+ memLayer.ML.setSessionVal("listaMatricoleSearch", listaMatricoleSearch);
}
///
/// ricerca utenti e salva lista username x SQL IN
@@ -123,7 +123,7 @@ public partial class mod_ricercaGenerica : ApplicationUserControl
{
listaUsernameSearch = listaUsernameSearch.Remove(listaUsernameSearch.Length - 2);
}
- SteamWare.memLayer.ML.setSessionVal("listaUsernameSearch", listaUsernameSearch);
+ memLayer.ML.setSessionVal("listaUsernameSearch", listaUsernameSearch);
}
#endregion
@@ -135,9 +135,9 @@ public partial class mod_ricercaGenerica : ApplicationUserControl
///
public void updateText()
{
- if (SteamWare.memLayer.ML.StringSessionObj("valoreCercato") != "" && !Page.IsPostBack)
+ if (memLayer.ML.StringSessionObj("valoreCercato") != "" && !Page.IsPostBack)
{
- testoRicerca = SteamWare.memLayer.ML.StringSessionObj("valoreCercato");
+ testoRicerca = memLayer.ML.StringSessionObj("valoreCercato");
}
}
diff --git a/MP-ADM/WebUserControls/mod_storicoTC.ascx.cs b/MP-ADM/WebUserControls/mod_storicoTC.ascx.cs
index 9ee9c919..2e383fe2 100644
--- a/MP-ADM/WebUserControls/mod_storicoTC.ascx.cs
+++ b/MP-ADM/WebUserControls/mod_storicoTC.ascx.cs
@@ -3,7 +3,7 @@ using System.Web.UI;
namespace MP_ADM.WebUserControls
{
- public partial class mod_storicoTC : System.Web.UI.UserControl
+ public partial class mod_storicoTC : BaseUserControl
{
protected void Page_Load(object sender, EventArgs e)
{
diff --git a/MP-ADM/WebUserControls/mod_unauthorized.ascx b/MP-ADM/WebUserControls/mod_unauthorized.ascx
index a28b35cd..c02f3fda 100644
--- a/MP-ADM/WebUserControls/mod_unauthorized.ascx
+++ b/MP-ADM/WebUserControls/mod_unauthorized.ascx
@@ -1,16 +1,13 @@
-<%@ Control Language="C#" AutoEventWireup="true" Inherits="MoonPro_site.WebUserControls.mod_unauthorized" Codebehind="mod_unauthorized.ascx.cs" %>
-
-
- |
-
- |
-
-
- |
- |
-
-
- |
- |
-
-
+<%@ Control Language="C#" AutoEventWireup="true" Inherits="MP_ADM.WebUserControls.mod_unauthorized" CodeBehind="mod_unauthorized.ascx.cs" %>
+
+
diff --git a/MP-ADM/WebUserControls/mod_unauthorized.ascx.cs b/MP-ADM/WebUserControls/mod_unauthorized.ascx.cs
index 511b8989..edbcf7d8 100644
--- a/MP-ADM/WebUserControls/mod_unauthorized.ascx.cs
+++ b/MP-ADM/WebUserControls/mod_unauthorized.ascx.cs
@@ -1,14 +1,15 @@
+using MP_ADM;
using SteamWare;
using System;
-namespace MoonPro_site.WebUserControls
+namespace MP_ADM.WebUserControls
{
- public partial class mod_unauthorized : System.Web.UI.UserControl
+ public partial class mod_unauthorized : BaseUserControl
{
protected void Page_Load(object sender, EventArgs e)
{
- lblTitle.Text = user_std.UtSn.Traduci("NonDisponibile");
- lblMess.Text = user_std.UtSn.Traduci("NonAuth");
+ lblTitle.Text = traduci("NonDisponibile");
+ lblMess.Text = traduci("NonAuth");
}
}
}
\ No newline at end of file
diff --git a/MP-ADM/WebUserControls/mod_unauthorized.ascx.designer.cs b/MP-ADM/WebUserControls/mod_unauthorized.ascx.designer.cs
index 91966c1b..fac1f4a3 100644
--- a/MP-ADM/WebUserControls/mod_unauthorized.ascx.designer.cs
+++ b/MP-ADM/WebUserControls/mod_unauthorized.ascx.designer.cs
@@ -1,43 +1,43 @@
//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.4927
+//
+// Codice generato da uno strumento.
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
+// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
+// il codice viene rigenerato.
+//
//------------------------------------------------------------------------------
-namespace MoonPro_site.WebUserControls
+namespace MP_ADM.WebUserControls
{
- public partial class mod_unauthorized {
-
+ public partial class mod_unauthorized
+ {
+
///
- /// lblTitleMain control.
+ /// Controllo lblTitleMain.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblTitleMain;
-
+
///
- /// lblTitle control.
+ /// Controllo lblTitle.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblTitle;
-
+
///
- /// lblMess control.
+ /// Controllo lblMess.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblMess;
}
diff --git a/MP-ADM/approvazioneODL.aspx.cs b/MP-ADM/approvazioneODL.aspx.cs
index 7f861c96..74a36356 100644
--- a/MP-ADM/approvazioneODL.aspx.cs
+++ b/MP-ADM/approvazioneODL.aspx.cs
@@ -3,22 +3,22 @@ using System;
namespace MP_ADM
{
- public partial class approvazioneODL : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class approvazioneODL : BasePage
{
- checkEnabled();
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ checkEnabled();
+ }
+ private void checkEnabled()
+ {
+ bool optPar = memLayer.ML.CRB("OptAdmApprTempiEnabled");
+ divContent.Visible = optPar;
+ string messaggio = "";
+ if (!optPar)
+ {
+ messaggio = "Attenzione: gestione approvazione cambio TC disabilitata";
+ }
+ lblDataImportOut.Text = messaggio;
+ }
}
- private void checkEnabled()
- {
- bool optPar = memLayer.ML.CRB("OptAdmApprTempiEnabled");
- divContent.Visible = optPar;
- string messaggio = "";
- if (!optPar)
- {
- messaggio = "Attenzione: gestione approvazione cambio TC disabilitata";
- }
- lblDataImportOut.Text = messaggio;
- }
- }
}
\ No newline at end of file
diff --git a/MP-ADM/approvazioneODL.aspx.designer.cs b/MP-ADM/approvazioneODL.aspx.designer.cs
index eae322aa..f43c2f8f 100644
--- a/MP-ADM/approvazioneODL.aspx.designer.cs
+++ b/MP-ADM/approvazioneODL.aspx.designer.cs
@@ -1,4 +1,4 @@
-//------------------------------------------------------------------------------
+ //------------------------------------------------------------------------------
//
// Codice generato da uno strumento.
//
diff --git a/MP-ADM/calendChiusura.aspx b/MP-ADM/calendChiusura.aspx
index 309672d2..c0a77063 100644
--- a/MP-ADM/calendChiusura.aspx
+++ b/MP-ADM/calendChiusura.aspx
@@ -5,7 +5,7 @@
<%@ Register Src="~/WebUserControls/mod_fixCal.ascx" tagname="mod_fixCal" tagprefix="uc2" %>
-
+
diff --git a/MP-ADM/calendChiusura.aspx.designer.cs b/MP-ADM/calendChiusura.aspx.designer.cs
index 9bed917b..33605727 100644
--- a/MP-ADM/calendChiusura.aspx.designer.cs
+++ b/MP-ADM/calendChiusura.aspx.designer.cs
@@ -9,17 +9,18 @@
-public partial class calendChiusura {
-
+public partial class calendChiusura
+{
+
///
- /// Controllo mod_fixCal1.
+ /// Controllo mod_fixCal.
///
///
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
- protected global::mod_fixCal mod_fixCal1;
-
+ protected global::mod_fixCal mod_fixCal;
+
///
/// Controllo mod_calChiusura1.
///