diff --git a/MP-ADM/WebUserControls/mod_gestioneODL.ascx b/MP-ADM/WebUserControls/mod_gestioneODL.ascx
index 581ded3c..a3f69ae5 100644
--- a/MP-ADM/WebUserControls/mod_gestioneODL.ascx
+++ b/MP-ADM/WebUserControls/mod_gestioneODL.ascx
@@ -50,6 +50,7 @@
diff --git a/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs b/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs
index fbc7af44..10b55ed2 100644
--- a/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs
+++ b/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs
@@ -7,541 +7,573 @@ using System.Web.UI.WebControls;
namespace MoonPro_site.WebUserControls
{
- public partial class mod_gestioneODL : System.Web.UI.UserControl
- {
- ///
- /// Oggetto datalayer specifico
- ///
- DataLayer DataLayerObj = new DataLayer();
-
- ///
- /// dimensione pagina
- ///
- public int pageSize
+ public partial class mod_gestioneODL : System.Web.UI.UserControl
{
- get
- {
- int answ = 10;
- try
+ ///
+ /// Oggetto datalayer specifico
+ ///
+ DataLayer DataLayerObj = new DataLayer();
+
+ ///
+ /// dimensione pagina
+ ///
+ public int pageSize
{
- answ = Convert.ToInt32(txtPageSize.Text);
- }
- catch
- { }
- return answ;
- }
- set
- {
- txtPageSize.Text = value.ToString();
- }
- }
- #region area da NON modificare
-
- #region area protected
-
- protected string _idxGridView;
-
- ///
- /// reset della selezione
- ///
- ///
- ///
- protected void btnReset_Click(object sender, EventArgs e)
- {
- resetSelezione();
- }
- ///
- /// gestione cambio selezione valore
- ///
- ///
- ///
- protected void grView_SelectedIndexChanged(object sender, EventArgs e)
- {
- // salvo in session il valore selezionato...
- SteamWare.memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false);
- // mostro edit quantità...
- divEditQta.Visible = true;
- lbtNewODL.Visible = enableCreateNew;
- mod_newOdl1.Visible = false;
- var riga = DataLayerObj.taODL.getByIdx(idxOdlSel, false)[0];
- numPz = riga.NumPezzi;
- pzPallet = riga.PzPallet;
- }
- ///
- /// traduce gli header delle colonne
- ///
- ///
- ///
- protected void grView_DataBound(object sender, EventArgs e)
- {
- if (grView.Rows.Count > 0)
- {
- LinkButton lb;
- // aggiorno gli headers
- foreach (TableCell cella in grView.HeaderRow.Cells)
- {
- try
- {
- lb = (LinkButton)cella.Controls[0];
- lb.Text = traduci(lb.Text);
- }
- catch
- { }
- }
- int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
- lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
- }
- else
- {
- lblNumRec.Text = "";
- }
- }
- ///
- /// recupera i dati di un nuovo record contenuti nel footer di un gridView;
- /// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...)
- ///
- ///
- ///
- protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e)
- {
- //recupero la riga footer...
- DataColumnCollection colonne = colonneObj();
- string nomeCol;
- string tipoColonna = "";
- foreach (DataColumn colonna in colonne)
- {
- nomeCol = colonna.ColumnName;
- // cerco un textbox o quello che sia...
- if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null)
- {
- tipoColonna = "textBox";
- }
- else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null)
- {
- tipoColonna = "dropDownList";
- }
- else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null)
- {
- tipoColonna = "checkBox";
- }
- else if (grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol)) != null)
- {
- tipoColonna = "selAjax";
- }
- // in base al tipo salvo negli inputparameters dell'ODS
- switch (tipoColonna)
- {
- case "textBox":
- e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text;
- break;
- case "dropDownList":
- e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue;
- break;
- case "checkBox":
- e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked;
- break;
- //case "selAjax":
- // e.InputParameters[nomeCol] = ((mod_selettore_ajax)grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol))).valore;
- // break;
- default:
- break;
- }
- tipoColonna = "";
- }
- }
- ///
- /// svuoto da cache post update
- ///
- ///
- ///
- protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
- {
- // evento come nuovo...
- if (eh_nuovoValore != null)
- {
- eh_nuovoValore(this, new EventArgs());
- }
- }
-
- #endregion
-
- #region are public
-
- ///
- /// effettua traduzione del lemma
- ///
- ///
- ///
- public string traduci(string lemma)
- {
- return user_std.UtSn.Traduci(lemma);
- }
- ///
- /// effettua traduzione in inglese del lemma
- ///
- ///
- ///
- public string traduciEn(string lemma)
- {
- return user_std.UtSn.TraduciEn(lemma);
- }
- ///
- /// resetta la selezione dei valori in caso di modifiche su altri controlli
- ///
- public void resetSelezione()
- {
- SteamWare.memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView));
- grView.SelectedIndex = -1;
- grView.DataBind();
- divEditQta.Visible = false;
- mod_newOdl1.Visible = false;
- lbtNewODL.Visible = enableCreateNew;
- lblWarning.Visible = false;
- if (eh_resetSelezione != null)
- {
- eh_resetSelezione(this, new EventArgs());
- }
-
- }
- #endregion
-
- #endregion
-
- #region gestione eventi
-
- public event EventHandler eh_resetSelezione;
- public event EventHandler eh_nuovoValore;
-
- #endregion
-
- #region area da modificare
-
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
- if (!Page.IsPostBack)
- {
- mod_newOdl1.Visible = false;
- grView.PageSize = pageSize;
- lbtNewODL.Visible = enableCreateNew;
- }
- mod_newOdl1.eh_nuovoValore += new EventHandler(mod_newOdl1_eh_nuovoValore);
- }
-
- public bool enableCreateNew
- {
- get
- {
- return !memLayer.ML.CRB("enableRPO");
- }
- }
-
- /// inizializzazione valori di default
- ///
- ///
- protected override void OnInit(EventArgs e)
- {
- base.OnInit(e);
- _idxGridView = "IdxODL";
- }
- ///
- /// nuovo valore creato...
- ///
- ///
- ///
- void mod_newOdl1_eh_nuovoValore(object sender, EventArgs e)
- {
- // nascondo controllo e mostro button
- mod_newOdl1.Visible = false;
- lbtNewODL.Visible = enableCreateNew;
- // aggiorno!
- resetSelezione();
- }
-
- ///
- /// elenco colonne del datagrid
- ///
- ///
- protected DataColumnCollection colonneObj()
- {
- MapoDb.DS_ProdTempi.ODLDataTable tabella = new MapoDb.DS_ProdTempi.ODLDataTable();
- DataColumnCollection colonne = tabella.Columns;
- return colonne;
- }
- public bool delEnabled(object _idxOdl)
- {
- bool answ = false;
- int idxOdl = 0;
- // controllo non sia già stata iniziata la produzione sennò non posso cancellare...
- try
- {
- idxOdl = Convert.ToInt32(_idxOdl);
- answ = (DataLayerObj.taODL.getByIdx(idxOdl, true).Count > 0);
- }
- catch
- { }
- return answ;
- }
- ///
- /// mostra creazione nuovo ODL
- ///
- ///
- ///
- protected void lbtNewODL_Click(object sender, EventArgs e)
- {
- // mostro controllo creazione ODL
- mod_newOdl1.Visible = true;
- divEditQta.Visible = false;
- lbtNewODL.Visible = false;
- grView.SelectedIndex = -1;
- grView.DataBind();
- }
- ///
- /// formatot url x stampa ODL
- ///
- ///
- ///
- public string formattaUrlOdl(object idx)
- {
- string answ = String.Format(memLayer.ML.CRS("exportFormat1"), Convert.ToInt32(reportRichiesto.SchedaODL), idx);
- return answ;
- }
-
- ///
- /// cambio dim pagina
- ///
- ///
- ///
- protected void txtPageSize_TextChanged(object sender, EventArgs e)
- {
- grView.PageSize = pageSize;
- }
- ///
- /// verifica se ODL sia current = aperto (iniziato, NON concluso)
- ///
- ///
- ///
- ///
- public bool OdlIsCurrent(object DataInizio, object DataFine)
- {
- bool answ = false;
- try
- {
- if ((DataInizio.ToString() == "") && (DataFine.ToString() == ""))
- {
- answ = true;
- }
- }
- catch
- { }
- if (!answ)
- {
- try
- {
- if ((Convert.ToDateTime(DataInizio) <= DateTime.Now) && (DataFine.ToString() == ""))
- {
- answ = true;
- }
- }
- catch
- { }
- }
- return answ;
- }
-
- #endregion
-
- protected void btnOk_Click(object sender, EventArgs e)
- {
- if (idxOdlSel > 0)
- {
- DataLayerObj.taODL.updateQta(numPz, pzPallet, idxOdlSel);
- }
- updateCtrl();
- }
-
- private void updateCtrl()
- {
- divEditQta.Visible = false;
- grView.SelectedIndex = -1;
- grView.DataBind();
- }
- ///
- /// idxOdl selezionato
- ///
- protected int idxOdlSel
- {
- get
- {
- int answ = 0;
- try
- {
- answ = Convert.ToInt32(grView.SelectedValue);
- }
- catch
- { }
- return answ;
- }
- }
- ///
- /// Nuovo num pz
- ///
- protected int numPz
- {
- get
- {
- int answ = 0;
- try
- {
- answ = Convert.ToInt32(txtNewQta.Text.Trim());
- }
- catch
- { }
- return answ;
- }
- set
- {
- txtNewQta.Text = value.ToString();
- }
- }
- ///
- /// Nuovo num pz per pallet
- ///
- protected int pzPallet
- {
- get
- {
- int answ = 1;
- try
- {
- answ = Convert.ToInt32(txtNewPzPallet.Text.Trim());
- }
- catch
- { }
- // controllo sia > 0...
- if (answ < 1)
- {
- answ = 1;
+ get
+ {
+ int answ = 10;
+ try
+ {
+ answ = Convert.ToInt32(txtPageSize.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ txtPageSize.Text = value.ToString();
+ }
}
- return answ;
- }
- set
- {
- txtNewPzPallet.Text = value.ToString();
- }
- }
- protected void btnCancel_Click(object sender, EventArgs e)
- {
- updateCtrl();
- }
+ #region area da NON modificare
- ///
- /// Aggiorno Gridview
- ///
- private void updateGrView()
- {
- grView.DataBind();
- }
+ #region area protected
- ///
- /// IdxMacchina filtrata
- ///
- protected string idxMacc
- {
- get
- {
- return lblIdxMacc.Text;
- }
- set
- {
- lblIdxMacc.Text = value;
- }
- }
- ///
- /// Nome filtrata
- ///
- protected string NomeMacc
- {
- get
- {
- return lblNomeMacc.Text;
- }
- set
- {
- lblNomeMacc.Text = value;
- }
- }
- ///
- /// CodArt filtrato
- ///
- protected string CodArt
- {
- get
- {
- return lblCodArt.Text;
- }
- set
- {
- lblCodArt.Text = value;
- }
- }
- ///
- /// CodArt filtrato
- ///
- protected string DescArt
- {
- get
- {
- return lblDescArt.Text;
- }
- set
- {
- lblDescArt.Text = value;
- }
- }
+ protected string _idxGridView;
- ///
- /// Selezionato un condominio --> riporto selezione
- ///
- ///
- ///
- protected void lbtSelArt_Click(object sender, EventArgs e)
- {
- LinkButton lb = (LinkButton)sender;
- // imposto articolo, splittando
- string[] artData = lb.CommandArgument.Split('|');
- CodArt = artData[0];
- DescArt = artData[1];
- updateGrView();
- }
- ///
- /// Selezionato un condominio --> riporto selezione
- ///
- ///
- ///
- protected void lbtSelMacc_Click(object sender, EventArgs e)
- {
- LinkButton lb = (LinkButton)sender;
- // imposto articolo, splittando
- string[] maccData = lb.CommandArgument.Split('|');
- idxMacc = maccData[0];
- NomeMacc = maccData[1];
- updateGrView();
- }
+ ///
+ /// reset della selezione
+ ///
+ ///
+ ///
+ protected void btnReset_Click(object sender, EventArgs e)
+ {
+ resetSelezione();
+ }
+ ///
+ /// gestione cambio selezione valore
+ ///
+ ///
+ ///
+ protected void grView_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ // salvo in session il valore selezionato...
+ SteamWare.memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false);
+ // mostro edit quantità...
+ divEditQta.Visible = true;
+ lbtNewODL.Visible = enableCreateNew;
+ mod_newOdl1.Visible = false;
+ var riga = DataLayerObj.taODL.getByIdx(idxOdlSel, false)[0];
+ numPz = riga.NumPezzi;
+ idxMaccEdit = riga.IdxMacchina;
+ pzPallet = riga.PzPallet;
+ }
+ ///
+ /// traduce gli header delle colonne
+ ///
+ ///
+ ///
+ protected void grView_DataBound(object sender, EventArgs e)
+ {
+ if (grView.Rows.Count > 0)
+ {
+ LinkButton lb;
+ // aggiorno gli headers
+ foreach (TableCell cella in grView.HeaderRow.Cells)
+ {
+ try
+ {
+ lb = (LinkButton)cella.Controls[0];
+ lb.Text = traduci(lb.Text);
+ }
+ catch
+ { }
+ }
+ int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
+ lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
+ }
+ else
+ {
+ lblNumRec.Text = "";
+ }
+ }
+ ///
+ /// recupera i dati di un nuovo record contenuti nel footer di un gridView;
+ /// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...)
+ ///
+ ///
+ ///
+ protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e)
+ {
+ //recupero la riga footer...
+ DataColumnCollection colonne = colonneObj();
+ string nomeCol;
+ string tipoColonna = "";
+ foreach (DataColumn colonna in colonne)
+ {
+ nomeCol = colonna.ColumnName;
+ // cerco un textbox o quello che sia...
+ if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null)
+ {
+ tipoColonna = "textBox";
+ }
+ else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null)
+ {
+ tipoColonna = "dropDownList";
+ }
+ else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null)
+ {
+ tipoColonna = "checkBox";
+ }
+ else if (grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol)) != null)
+ {
+ tipoColonna = "selAjax";
+ }
+ // in base al tipo salvo negli inputparameters dell'ODS
+ switch (tipoColonna)
+ {
+ case "textBox":
+ e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text;
+ break;
+ case "dropDownList":
+ e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue;
+ break;
+ case "checkBox":
+ e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked;
+ break;
+ //case "selAjax":
+ // e.InputParameters[nomeCol] = ((mod_selettore_ajax)grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol))).valore;
+ // break;
+ default:
+ break;
+ }
+ tipoColonna = "";
+ }
+ }
+ ///
+ /// svuoto da cache post update
+ ///
+ ///
+ ///
+ protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
+ {
+ // evento come nuovo...
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
+ }
- protected void lbtResArt_Click(object sender, EventArgs e)
- {
- CodArt = "";
- DescArt = "";
- updateGrView();
- }
+ #endregion
- protected void lbtResMacc_Click(object sender, EventArgs e)
- {
- idxMacc = "";
- NomeMacc = "";
- updateGrView();
+ #region are public
+
+ ///
+ /// effettua traduzione del lemma
+ ///
+ ///
+ ///
+ public string traduci(string lemma)
+ {
+ return user_std.UtSn.Traduci(lemma);
+ }
+ ///
+ /// effettua traduzione in inglese del lemma
+ ///
+ ///
+ ///
+ public string traduciEn(string lemma)
+ {
+ return user_std.UtSn.TraduciEn(lemma);
+ }
+ ///
+ /// resetta la selezione dei valori in caso di modifiche su altri controlli
+ ///
+ public void resetSelezione()
+ {
+ SteamWare.memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView));
+ grView.SelectedIndex = -1;
+ grView.DataBind();
+ idxMaccEdit = "";
+ divEditQta.Visible = false;
+ mod_newOdl1.Visible = false;
+ lbtNewODL.Visible = enableCreateNew;
+ lblWarning.Visible = false;
+ if (eh_resetSelezione != null)
+ {
+ eh_resetSelezione(this, new EventArgs());
+ }
+
+ }
+
+ #endregion
+
+ #endregion
+
+ #region gestione eventi
+
+ public event EventHandler eh_resetSelezione;
+ public event EventHandler eh_nuovoValore;
+
+ #endregion
+
+ #region area da modificare
+
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad(e);
+ if (!Page.IsPostBack)
+ {
+ mod_newOdl1.Visible = false;
+ grView.PageSize = pageSize;
+ lbtNewODL.Visible = enableCreateNew;
+ }
+ mod_newOdl1.eh_nuovoValore += new EventHandler(mod_newOdl1_eh_nuovoValore);
+ }
+
+ public bool enableCreateNew
+ {
+ get
+ {
+ return !memLayer.ML.CRB("enableRPO");
+ }
+ }
+
+ /// inizializzazione valori di default
+ ///
+ ///
+ protected override void OnInit(EventArgs e)
+ {
+ base.OnInit(e);
+ _idxGridView = "IdxODL";
+ }
+ ///
+ /// nuovo valore creato...
+ ///
+ ///
+ ///
+ void mod_newOdl1_eh_nuovoValore(object sender, EventArgs e)
+ {
+ // nascondo controllo e mostro button
+ mod_newOdl1.Visible = false;
+ lbtNewODL.Visible = enableCreateNew;
+ // aggiorno!
+ resetSelezione();
+ }
+
+ ///
+ /// elenco colonne del datagrid
+ ///
+ ///
+ protected DataColumnCollection colonneObj()
+ {
+ MapoDb.DS_ProdTempi.ODLDataTable tabella = new MapoDb.DS_ProdTempi.ODLDataTable();
+ DataColumnCollection colonne = tabella.Columns;
+ return colonne;
+ }
+ public bool delEnabled(object _idxOdl)
+ {
+ bool answ = false;
+ int idxOdl = 0;
+ // controllo non sia già stata iniziata la produzione sennò non posso cancellare...
+ try
+ {
+ idxOdl = Convert.ToInt32(_idxOdl);
+ answ = (DataLayerObj.taODL.getByIdx(idxOdl, true).Count > 0);
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// mostra creazione nuovo ODL
+ ///
+ ///
+ ///
+ protected void lbtNewODL_Click(object sender, EventArgs e)
+ {
+ // mostro controllo creazione ODL
+ mod_newOdl1.Visible = true;
+ divEditQta.Visible = false;
+ lbtNewODL.Visible = false;
+ grView.SelectedIndex = -1;
+ grView.DataBind();
+ }
+ ///
+ /// formatot url x stampa ODL
+ ///
+ ///
+ ///
+ public string formattaUrlOdl(object idx)
+ {
+ string answ = String.Format(memLayer.ML.CRS("exportFormat1"), Convert.ToInt32(reportRichiesto.SchedaODL), idx);
+ return answ;
+ }
+
+ ///
+ /// cambio dim pagina
+ ///
+ ///
+ ///
+ protected void txtPageSize_TextChanged(object sender, EventArgs e)
+ {
+ grView.PageSize = pageSize;
+ }
+ ///
+ /// verifica se ODL sia current = aperto (iniziato, NON concluso)
+ ///
+ ///
+ ///
+ ///
+ public bool OdlIsCurrent(object DataInizio, object DataFine)
+ {
+ bool answ = false;
+ try
+ {
+ if ((DataInizio.ToString() == "") && (DataFine.ToString() == ""))
+ {
+ answ = true;
+ }
+ }
+ catch
+ { }
+ if (!answ)
+ {
+ try
+ {
+ if ((Convert.ToDateTime(DataInizio) <= DateTime.Now) && (DataFine.ToString() == ""))
+ {
+ answ = true;
+ }
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+
+ #endregion
+
+ protected void btnOk_Click(object sender, EventArgs e)
+ {
+ if (idxOdlSel > 0)
+ {
+ DataLayerObj.taODL.updateQta(numPz, pzPallet, idxOdlSel);
+ }
+ updateCtrl();
+ }
+
+ private void updateCtrl()
+ {
+ divEditQta.Visible = false;
+ grView.SelectedIndex = -1;
+ grView.DataBind();
+ }
+ ///
+ /// idxOdl selezionato
+ ///
+ protected int idxOdlSel
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = Convert.ToInt32(grView.SelectedValue);
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ ///
+ /// Nuovo num pz
+ ///
+ protected int numPz
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = Convert.ToInt32(txtNewQta.Text.Trim());
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ txtNewQta.Text = value.ToString();
+ }
+ }
+ ///
+ /// Nuovo num pz per pallet
+ ///
+ protected int pzPallet
+ {
+ get
+ {
+ int answ = 1;
+ try
+ {
+ answ = Convert.ToInt32(txtNewPzPallet.Text.Trim());
+ }
+ catch
+ { }
+ // controllo sia > 0...
+ if (answ < 1)
+ {
+ answ = 1;
+ }
+
+ return answ;
+ }
+ set
+ {
+ txtNewPzPallet.Text = value.ToString();
+ // verifico SE sia editabile...
+ bool nPzEnab = false;
+ try
+ {
+ DS_ProdTempi.DatiMacchineDataTable tabDatiMacc = DataLayerObj.taDatiMacchine.getByIdx(idxMaccEdit);
+ if (tabDatiMacc != null && tabDatiMacc.Count > 0)
+ {
+ DS_ProdTempi.DatiMacchineRow rigaMacc = tabDatiMacc[0];
+ nPzEnab = !rigaMacc.hasCounter;
+ }
+ }
+ catch
+ { }
+ txtNewPzPallet.Enabled = nPzEnab;
+ }
+ }
+ protected void btnCancel_Click(object sender, EventArgs e)
+ {
+ updateCtrl();
+ }
+
+ ///
+ /// Aggiorno Gridview
+ ///
+ private void updateGrView()
+ {
+ grView.DataBind();
+ }
+
+ ///
+ /// IdxMacchina filtrata
+ ///
+ protected string idxMacc
+ {
+ get
+ {
+ return lblIdxMacc.Text;
+ }
+ set
+ {
+ lblIdxMacc.Text = value;
+ }
+ }
+ ///
+ /// IdxMacchina in EDIT
+ ///
+ protected string idxMaccEdit
+ {
+ get
+ {
+ return hfIdxMacc.Value;
+ }
+ set
+ {
+ hfIdxMacc.Value = value;
+ }
+ }
+ ///
+ /// Nome filtrata
+ ///
+ protected string NomeMacc
+ {
+ get
+ {
+ return lblNomeMacc.Text;
+ }
+ set
+ {
+ lblNomeMacc.Text = value;
+ }
+ }
+ ///
+ /// CodArt filtrato
+ ///
+ protected string CodArt
+ {
+ get
+ {
+ return lblCodArt.Text;
+ }
+ set
+ {
+ lblCodArt.Text = value;
+ }
+ }
+ ///
+ /// CodArt filtrato
+ ///
+ protected string DescArt
+ {
+ get
+ {
+ return lblDescArt.Text;
+ }
+ set
+ {
+ lblDescArt.Text = value;
+ }
+ }
+
+ ///
+ /// Selezionato un condominio --> riporto selezione
+ ///
+ ///
+ ///
+ protected void lbtSelArt_Click(object sender, EventArgs e)
+ {
+ LinkButton lb = (LinkButton)sender;
+ // imposto articolo, splittando
+ string[] artData = lb.CommandArgument.Split('|');
+ CodArt = artData[0];
+ DescArt = artData[1];
+ updateGrView();
+ }
+ ///
+ /// Selezionato un condominio --> riporto selezione
+ ///
+ ///
+ ///
+ protected void lbtSelMacc_Click(object sender, EventArgs e)
+ {
+ LinkButton lb = (LinkButton)sender;
+ // imposto articolo, splittando
+ string[] maccData = lb.CommandArgument.Split('|');
+ idxMacc = maccData[0];
+ NomeMacc = maccData[1];
+ updateGrView();
+ }
+
+ protected void lbtResArt_Click(object sender, EventArgs e)
+ {
+ CodArt = "";
+ DescArt = "";
+ updateGrView();
+ }
+
+ protected void lbtResMacc_Click(object sender, EventArgs e)
+ {
+ idxMacc = "";
+ NomeMacc = "";
+ updateGrView();
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-ADM/WebUserControls/mod_gestioneODL.ascx.designer.cs b/MP-ADM/WebUserControls/mod_gestioneODL.ascx.designer.cs
index 519c3db7..6932ff3e 100644
--- a/MP-ADM/WebUserControls/mod_gestioneODL.ascx.designer.cs
+++ b/MP-ADM/WebUserControls/mod_gestioneODL.ascx.designer.cs
@@ -7,11 +7,13 @@
//
//------------------------------------------------------------------------------
-namespace MoonPro_site.WebUserControls {
-
-
- public partial class mod_gestioneODL {
-
+namespace MoonPro_site.WebUserControls
+{
+
+
+ public partial class mod_gestioneODL
+ {
+
///
/// Controllo lbtResArt.
///
@@ -20,7 +22,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.LinkButton lbtResArt;
-
+
///
/// Controllo lblCodArt.
///
@@ -29,7 +31,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblCodArt;
-
+
///
/// Controllo lblDescArt.
///
@@ -38,7 +40,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblDescArt;
-
+
///
/// Controllo lbtResMacc.
///
@@ -47,7 +49,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.LinkButton lbtResMacc;
-
+
///
/// Controllo lblNomeMacc.
///
@@ -56,7 +58,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblNomeMacc;
-
+
///
/// Controllo lblIdxMacc.
///
@@ -65,7 +67,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblIdxMacc;
-
+
///
/// Controllo lbtNewODL.
///
@@ -74,7 +76,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.LinkButton lbtNewODL;
-
+
///
/// Controllo mod_newOdl1.
///
@@ -83,7 +85,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::MoonPro_site.WebUserControls.mod_newOdl mod_newOdl1;
-
+
///
/// Controllo divEditQta.
///
@@ -92,7 +94,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divEditQta;
-
+
///
/// Controllo btnOk.
///
@@ -101,7 +103,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Button btnOk;
-
+
///
/// Controllo txtNewQta.
///
@@ -110,7 +112,16 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.TextBox txtNewQta;
-
+
+ ///
+ /// Controllo hfIdxMacc.
+ ///
+ ///
+ /// 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.HiddenField hfIdxMacc;
+
///
/// Controllo txtNewPzPallet.
///
@@ -119,7 +130,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.TextBox txtNewPzPallet;
-
+
///
/// Controllo btnCancel.
///
@@ -128,7 +139,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Button btnCancel;
-
+
///
/// Controllo grView.
///
@@ -137,7 +148,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.GridView grView;
-
+
///
/// Controllo ods.
///
@@ -146,7 +157,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
-
+
///
/// Controllo lblNumRec.
///
@@ -155,7 +166,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblNumRec;
-
+
///
/// Controllo lblWarning.
///
@@ -164,7 +175,7 @@ namespace MoonPro_site.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblWarning;
-
+
///
/// Controllo txtPageSize.
///