diff --git a/GMW/WebUserControls/mod_SterrTagOUT.ascx b/GMW/WebUserControls/mod_SterrTagOUT.ascx index 75dea486..297e3cfd 100644 --- a/GMW/WebUserControls/mod_SterrTagOUT.ascx +++ b/GMW/WebUserControls/mod_SterrTagOUT.ascx @@ -125,12 +125,13 @@ - - - + + + + P | C <%----%> diff --git a/GMW/WebUserControls/mod_SterrTagOUT.ascx.cs b/GMW/WebUserControls/mod_SterrTagOUT.ascx.cs index bcda7e35..31c42975 100644 --- a/GMW/WebUserControls/mod_SterrTagOUT.ascx.cs +++ b/GMW/WebUserControls/mod_SterrTagOUT.ascx.cs @@ -21,17 +21,31 @@ namespace GMW.WebUserControls /// protected string statoUDC = "Sterrati"; /// - /// stringa degli UDC selezionati (nel formato #UDC1##UDC2# + /// stringa degli UDC selezionati per consumo COMPLETO (nel formato #UDC1##UDC2#) /// - protected string udcSelected + protected string udcSelC { get { - return memLayer.ML.StringSessionObj(string.Format("UdcSel_{0}", uid)); + return memLayer.ML.StringSessionObj(string.Format("UdcSelC_{0}", uid)); } set { - memLayer.ML.setSessionVal(string.Format("UdcSel_{0}", uid), value); + memLayer.ML.setSessionVal(string.Format("UdcSelC_{0}", uid), value); + } + } + /// + /// stringa degli UDC selezionati per consumo PARZIALE (nel formato #UDC1##UDC2#) + /// + protected string udcSelP + { + get + { + return memLayer.ML.StringSessionObj(string.Format("UdcSelP_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("UdcSelP_{0}", uid), value); } } public event EventHandler eh_nuovaRicerca; @@ -419,18 +433,16 @@ namespace GMW.WebUserControls string newPart = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Particolare; if (testoRicerca != newPart) { - // imposto filtraggio x particoalre nell'elenco degli UDC della linea... - testoRicerca = newPart; // resetto precedente ricerca e deseleziono TUTTI gli UDC elencati SE รจ cambiato il particolare - udcSelected = string.Format("#{0}#", barcodeIn); - // salvo UDC da selezionare come consumo COMPLETO - salvaCerca(); + udcSelC = string.Format("#{0}#", barcodeIn); } else { - udcSelected = string.Format("{0}#{1}#", udcSelected, barcodeIn); - doUpdate(); + udcSelC = string.Format("{0}#{1}#", udcSelC, barcodeIn); + // se era presente in elenco "P" lo elimino + udcSelP = udcSelP.Replace(string.Format("#{0}#", barcodeIn), ""); } + updFiltroPart(newPart); } break; @@ -449,6 +461,24 @@ namespace GMW.WebUserControls txtBarcode.Focus(); } /// + /// update del filtro su particolare x grview UDC caricati in linea + /// + /// + private void updFiltroPart(string newPart) + { + if (testoRicerca != newPart) + { + // imposto filtraggio x particoalre nell'elenco degli UDC della linea... + testoRicerca = newPart; + // salvo UDC da selezionare come consumo COMPLETO + salvaCerca(); + } + else + { + doUpdate(); + } + } + /// /// aggiorna tabella + focus a barcode /// private void doUpdate() @@ -714,6 +744,9 @@ namespace GMW.WebUserControls if (doSave) { currCodLinea = codLinea; + testoRicerca = ""; + grView.DataBind(); + salvaCerca(); } // salvo codice cella! try @@ -820,6 +853,8 @@ namespace GMW.WebUserControls if (testoRicerca == "") { SteamWare.memLayer.ML.emptySessionVal("valoreCercatoCella"); + udcSelC = ""; + udcSelP = ""; } else { @@ -891,16 +926,41 @@ namespace GMW.WebUserControls protected void rbl_DataBinding(object sender, EventArgs e) { RadioButtonList rbl = (RadioButtonList)sender; - if (udcSelected.IndexOf(rbl.ToolTip) >= 0) + if (udcSelC.IndexOf(rbl.ToolTip) >= 0) { rbl.SelectedValue = "C"; } + else if (udcSelP.IndexOf(rbl.ToolTip) >= 0) + { + rbl.SelectedValue = "P"; + } } protected void rbl_DataBound(object sender, EventArgs e) { } + + protected void rbl_SelectedIndexChanged(object sender, EventArgs e) + { + RadioButtonList rbl = (RadioButtonList)sender; + if (rbl.SelectedValue == "C") + { + udcSelC = string.Format("{0}#{1}#", udcSelC, rbl.ToolTip); + // se era presente in elenco "P" lo elimino + udcSelP = udcSelP.Replace(string.Format("#{0}#", rbl.ToolTip), ""); + } + else + { + udcSelP = string.Format("{0}#{1}#", udcSelP, rbl.ToolTip); + // se era presente in elenco "C" lo elimino + udcSelC = udcSelC.Replace(string.Format("#{0}#", rbl.ToolTip), ""); + } + // calcolo il particolare da selezionare... + string newPart = DataProxy.obj.taCartellini.stp_getByUdc(rbl.ToolTip)[0].Particolare; + //testoRicerca = newPart; + updFiltroPart(newPart); + } #if false /// /// seleziona/deseleziona le righe indicate... diff --git a/GMW/bin/GMW.dll b/GMW/bin/GMW.dll index 7d0205cb..8f403364 100644 Binary files a/GMW/bin/GMW.dll and b/GMW/bin/GMW.dll differ