diff --git a/Jenkinsfile b/Jenkinsfile index c1a44e89..4d6a0c47 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=1310']) { + withEnv(['NEXT_BUILD_NUMBER=1311']) { // env.versionNumber = VersionNumber(versionNumberString : '6.11.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '6.11.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO' diff --git a/MP-ADM/BaseUserControl.cs b/MP-ADM/BaseUserControl.cs index 2be6d28c..14c8bc5c 100644 --- a/MP-ADM/BaseUserControl.cs +++ b/MP-ADM/BaseUserControl.cs @@ -6,7 +6,16 @@ namespace MP_ADM { public class BaseUserControl : System.Web.UI.UserControl { - #region gestione eventi + #region Internal Fields + + /// + /// Oggetto datalayer specifico NON singleton x scalare + /// + internal DataLayer DataLayerObj = new DataLayer(); + + #endregion Internal Fields + + #region Public Events public event EventHandler eh_nuovoValore; @@ -14,6 +23,98 @@ namespace MP_ADM public event EventHandler eh_selValore; + #endregion Public Events + + #region Public Properties + + /// + /// titolo pagina + /// + public string titolo + { + get + { + return devicesAuthProxy.getPage(Request.Url).Replace(".aspx", ""); + } + } + + /// + /// UID formattato con "_" + /// + public string uid + { + get + { + return this.UniqueID.Replace("$", "_").Replace("-", "_"); + } + } + + #endregion Public Properties + + #region Protected Methods + + /// + /// Verifica se la macchina MAIN sia MASTER + /// + protected bool isMaster(string idxMacchina) + { + return DataLayerObj.isMaster(idxMacchina); + } + + /// + /// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...) + /// + protected bool isMulti(string idxMacchina) + { + return DataLayerObj.isMulti(idxMacchina); + } + + /// + /// Verifica se la macchina MAIN sia SLAVE + /// + protected bool isSlave(string idxMacchina) + { + return DataLayerObj.isSlave(idxMacchina); + } + + /// + /// conversione da tempo minuti centesimali a minuti/secondi + /// + /// + /// + protected TimeSpan minCent2Sec(decimal valore) + { + TimeSpan answ = new TimeSpan(0, 0, 1); + try + { + answ = new TimeSpan(0, Convert.ToInt32(valore), Convert.ToInt32((valore - Convert.ToInt32(valore)) * 60)); + } + catch + { } + return answ; + } + + #endregion Protected Methods + + #region Public Methods + + /// + /// formatta in minuti/sec partendo da min.cent + /// + /// + /// + public string minSec(object minCent) + { + string answ = ""; + try + { + answ = string.Format("{0:mm}:{0:ss}", minCent2Sec(Convert.ToDecimal(minCent.ToString().Replace(".", ",")))); + } + catch + { } + return answ; + } + /// /// Solleva evento nuovo valore /// @@ -26,15 +127,6 @@ namespace MP_ADM } } - public void raiseSelNew() - { - // sollevo evento nuovo valore... - if (eh_selValore != null) - { - eh_selValore(this, new EventArgs()); - } - } - /// /// Solleva evento reset /// @@ -46,37 +138,15 @@ namespace MP_ADM } } - #endregion gestione eventi - - /// - /// Oggetto datalayer specifico NON singleton x scalare - /// - internal DataLayer DataLayerObj = new DataLayer(); - - /// - /// UID formattato con "_" - /// - public string uid + public void raiseSelNew() { - get + // sollevo evento nuovo valore... + if (eh_selValore != null) { - return this.UniqueID.Replace("$", "_").Replace("-", "_"); + eh_selValore(this, new EventArgs()); } } - /// - /// titolo pagina - /// - public string titolo - { - get - { - return devicesAuthProxy.getPage(Request.Url).Replace(".aspx", ""); - } - } - - #region utils - /// /// effettua traduzione del lemma /// @@ -97,40 +167,6 @@ namespace MP_ADM return user_std.UtSn.TraduciEn(lemma); } - /// - /// formatta in minuti/sec partendo da min.cent - /// - /// - /// - public string minSec(object minCent) - { - string answ = ""; - try - { - answ = string.Format("{0:mm}:{0:ss}", minCent2Sec(Convert.ToDecimal(minCent.ToString().Replace(".", ",")))); - } - catch - { } - return answ; - } - - /// - /// conversione da tempo minuti centesimali a minuti/secondi - /// - /// - /// - protected TimeSpan minCent2Sec(decimal valore) - { - TimeSpan answ = new TimeSpan(0, 0, 1); - try - { - answ = new TimeSpan(0, Convert.ToInt32(valore), Convert.ToInt32((valore - Convert.ToInt32(valore)) * 60)); - } - catch - { } - return answ; - } - - #endregion utils + #endregion Public Methods } } \ No newline at end of file diff --git a/MP-ADM/WebUserControls/mod_gestioneODL.ascx b/MP-ADM/WebUserControls/mod_gestioneODL.ascx index 6620ef35..ecd553d9 100644 --- a/MP-ADM/WebUserControls/mod_gestioneODL.ascx +++ b/MP-ADM/WebUserControls/mod_gestioneODL.ascx @@ -83,7 +83,7 @@ + ToolTip="Modifica num pz" ImageUrl="~/images/edit_s.png" Visible='<%# OdlIsCurrent(Eval("IdxMacchina"),Eval("DataInizio"),Eval("DataFine")) %>' /> diff --git a/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs b/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs index 9389634c..dea14363 100644 --- a/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs +++ b/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs @@ -9,353 +9,72 @@ namespace MP_ADM.WebUserControls { public partial class mod_gestioneODL : BaseUserControl { - /// - /// dimensione pagina - /// - public int pageSize - { - get - { - int answ = 10; - try - { - answ = Convert.ToInt32(txtPageSize.Text); - } - catch - { } - return answ; - } - set - { - txtPageSize.Text = value.ToString(); - } - } - - #region area da NON modificare - - #region area protected + #region Protected Fields protected string _idxGridView; - /// - /// reset della selezione - /// - /// - /// - protected void btnReset_Click(object sender, EventArgs e) - { - resetSelezione(); - } + #endregion Protected Fields + + #region Protected Properties /// - /// gestione cambio selezione valore + /// CodArt filtrato /// - /// - /// - protected void grView_SelectedIndexChanged(object sender, EventArgs e) - { - // salvo in session il valore selezionato... - 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) - { - raiseNewVal(); - } - - #endregion area protected - - #region are public - - /// - /// resetta la selezione dei valori in caso di modifiche su altri controlli - /// - public void resetSelezione() - { - 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; - raiseReset(); - } - - #endregion are public - - #endregion area da NON modificare - - #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 + protected string CodArt { get { - return !memLayer.ML.CRB("enableRPO"); + return lblCodArt.Text; } - } - - /// inizializzazione valori di default - /// - /// - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - _idxGridView = "IdxODL"; - } - - /// - /// nuovo valore creato... - /// - /// - /// - private 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 + set { - idxOdl = Convert.ToInt32(_idxOdl); - answ = (DataLayerObj.taODL.getByIdx(idxOdl, true).Count > 0); + lblCodArt.Text = value; } - catch - { } - return answ; } /// - /// mostra creazione nuovo ODL + /// CodArt filtrato /// - /// - /// - protected void lbtNewODL_Click(object sender, EventArgs e) + protected string DescArt { - // 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 + get { - if ((DataInizio.ToString() == "") && (DataFine.ToString() == "")) - { - answ = true; - } + return lblDescArt.Text; } - catch - { } - if (!answ) + set { - try - { - if ((Convert.ToDateTime(DataInizio) <= DateTime.Now) && (DataFine.ToString() == "")) - { - answ = true; - } - } - catch - { } + lblDescArt.Text = value; } - return answ; } - #endregion area da modificare - - protected void btnOk_Click(object sender, EventArgs e) + /// + /// IdxMacchina filtrata + /// + protected string idxMacc { - if (idxOdlSel > 0) + get { - DataLayerObj.taODL.updateQta(numPz, pzPallet, idxOdlSel); - // se abilitata modifica numPzPallet --> chiamo stored update! - if (numPzEditable) - { - // recupero da config il max... - int numPzMaxFix = 100; - try - { - numPzMaxFix = memLayer.ML.cdvi("numPzMaxFix"); - } - catch - { } - DataLayerObj.taTempiCicloRilevati.TC_fixFromODL(idxOdlSel, numPzMaxFix); - } + return lblIdxMacc.Text; + } + set + { + lblIdxMacc.Text = value; } - updateCtrl(); } - private void updateCtrl() + /// + /// IdxMacchina in EDIT + /// + protected string idxMaccEdit { - divEditQta.Visible = false; - grView.SelectedIndex = -1; - grView.DataBind(); - idxMaccEdit = ""; + get + { + return hfIdxMacc.Value; + } + set + { + hfIdxMacc.Value = value; + } } /// @@ -376,6 +95,21 @@ namespace MP_ADM.WebUserControls } } + /// + /// Nome filtrata + /// + protected string NomeMacc + { + get + { + return lblNomeMacc.Text; + } + set + { + lblNomeMacc.Text = value; + } + } + /// /// Nuovo num pz /// @@ -448,9 +182,64 @@ namespace MP_ADM.WebUserControls } } - protected void btnCancel_Click(object sender, EventArgs e) + #endregion Protected Properties + + #region Public Properties + + public bool enableCreateNew { - updateCtrl(); + get + { + return !memLayer.ML.CRB("enableRPO"); + } + } + + /// + /// dimensione pagina + /// + public int pageSize + { + get + { + int answ = 10; + try + { + answ = Convert.ToInt32(txtPageSize.Text); + } + catch + { } + return answ; + } + set + { + txtPageSize.Text = value.ToString(); + } + } + + #endregion Public Properties + + #region Private Methods + + /// + /// nuovo valore creato... + /// + /// + /// + private void mod_newOdl1_eh_nuovoValore(object sender, EventArgs e) + { + // nascondo controllo e mostro button + mod_newOdl1.Visible = false; + lbtNewODL.Visible = enableCreateNew; + // aggiorno! + resetSelezione(); + } + + private void updateCtrl() + { + divEditQta.Visible = false; + grView.SelectedIndex = -1; + grView.DataBind(); + idxMaccEdit = ""; } /// @@ -461,79 +250,134 @@ namespace MP_ADM.WebUserControls grView.DataBind(); } - /// - /// IdxMacchina filtrata - /// - protected string idxMacc + #endregion Private Methods + + #region Protected Methods + + protected void btnCancel_Click(object sender, EventArgs e) { - get + updateCtrl(); + } + + protected void btnOk_Click(object sender, EventArgs e) + { + if (idxOdlSel > 0) { - return lblIdxMacc.Text; + DataLayerObj.taODL.updateQta(numPz, pzPallet, idxOdlSel); + // se abilitata modifica numPzPallet --> chiamo stored update! + if (numPzEditable) + { + // recupero da config il max... + int numPzMaxFix = 100; + try + { + numPzMaxFix = memLayer.ML.cdvi("numPzMaxFix"); + } + catch + { } + DataLayerObj.taTempiCicloRilevati.TC_fixFromODL(idxOdlSel, numPzMaxFix); + } } - set + updateCtrl(); + } + + /// + /// reset della selezione + /// + /// + /// + protected void btnReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + + /// + /// elenco colonne del datagrid + /// + /// + protected DataColumnCollection colonneObj() + { + MapoDb.DS_ProdTempi.ODLDataTable tabella = new MapoDb.DS_ProdTempi.ODLDataTable(); + DataColumnCollection colonne = tabella.Columns; + return colonne; + } + + /// + /// traduce gli header delle colonne + /// + /// + /// + protected void grView_DataBound(object sender, EventArgs e) + { + if (grView.Rows.Count > 0) { - lblIdxMacc.Text = value; + 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 = ""; } } /// - /// IdxMacchina in EDIT + /// gestione cambio selezione valore /// - protected string idxMaccEdit + /// + /// + protected void grView_SelectedIndexChanged(object sender, EventArgs e) { - get - { - return hfIdxMacc.Value; - } - set - { - hfIdxMacc.Value = value; - } + // salvo in session il valore selezionato... + 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; } /// - /// Nome filtrata + /// mostra creazione nuovo ODL /// - protected string NomeMacc + /// + /// + protected void lbtNewODL_Click(object sender, EventArgs e) { - get - { - return lblNomeMacc.Text; - } - set - { - lblNomeMacc.Text = value; - } + // mostro controllo creazione ODL + mod_newOdl1.Visible = true; + divEditQta.Visible = false; + lbtNewODL.Visible = false; + grView.SelectedIndex = -1; + grView.DataBind(); } - /// - /// CodArt filtrato - /// - protected string CodArt + protected void lbtResArt_Click(object sender, EventArgs e) { - get - { - return lblCodArt.Text; - } - set - { - lblCodArt.Text = value; - } + CodArt = ""; + DescArt = ""; + updateGrView(); } - /// - /// CodArt filtrato - /// - protected string DescArt + protected void lbtResMacc_Click(object sender, EventArgs e) { - get - { - return lblDescArt.Text; - } - set - { - lblDescArt.Text = value; - } + idxMacc = ""; + NomeMacc = ""; + updateGrView(); } /// @@ -566,18 +410,187 @@ namespace MP_ADM.WebUserControls updateGrView(); } - protected void lbtResArt_Click(object sender, EventArgs e) + /// + /// svuoto da cache post update + /// + /// + /// + protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) { - CodArt = ""; - DescArt = ""; - updateGrView(); + raiseNewVal(); } - protected void lbtResMacc_Click(object sender, EventArgs e) + /// inizializzazione valori di default + /// + /// + protected override void OnInit(EventArgs e) { - idxMacc = ""; - NomeMacc = ""; - updateGrView(); + base.OnInit(e); + _idxGridView = "IdxODL"; } + + 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); + } + + /// + /// 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 = ""; + } + } + + /// + /// cambio dim pagina + /// + /// + /// + protected void txtPageSize_TextChanged(object sender, EventArgs e) + { + grView.PageSize = pageSize; + } + + #endregion Protected Methods + + #region Public Methods + + 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; + } + + /// + /// 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; + } + + /// + /// verifica se ODL sia current = aperto (iniziato, NON concluso) + /// + /// + /// + /// + /// + public bool OdlIsCurrent(object _IdxMacchina, object _DataInizio, object _DataFine) + { + bool answ = false; + // check preliminare: se è SLAVE non è MAI davvero current = modificabile... + if (!isSlave($"{_IdxMacchina}")) + { + try + { + if (string.IsNullOrEmpty($"{_DataInizio}") && string.IsNullOrEmpty($"{_DataFine}")) + { + answ = true; + } + } + catch + { } + if (!answ) + { + try + { + if ((Convert.ToDateTime(_DataInizio) <= DateTime.Now) && string.IsNullOrEmpty($"{_DataFine}")) + { + answ = true; + } + } + catch + { } + } + } + return answ; + } + + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + 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; + raiseReset(); + } + + #endregion Public Methods } } \ No newline at end of file