diff --git a/GMW/GMW.suo b/GMW/GMW.suo
index d5e01e2b..1b681bdf 100644
Binary files a/GMW/GMW.suo and b/GMW/GMW.suo differ
diff --git a/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx b/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx
index 7ca44560..cb9d6f81 100644
--- a/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx
+++ b/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx
@@ -48,14 +48,12 @@
-
-
@@ -77,14 +75,12 @@
-
-
@@ -98,10 +94,6 @@
-
-
-
-
@@ -115,10 +107,6 @@
-
-
-
-
@@ -132,10 +120,20 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -146,10 +144,6 @@
TargetControlID="imgDelete">
-
-
-
-
@@ -158,8 +152,7 @@
+ OnInserted="ods_Updated" OnUpdated="ods_Updated" DeleteMethod="DeleteQuery" OnDeleted="ods_Updated">
diff --git a/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx.cs b/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx.cs
index 61cbb2a2..257197df 100644
--- a/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx.cs
+++ b/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx.cs
@@ -366,7 +366,7 @@ namespace GMW.WebUserControls
private void updateOds()
{
grView.DataBind();
- }
+ }
///
/// determina se sia eliminabile il record (=non usato)
@@ -383,7 +383,7 @@ namespace GMW.WebUserControls
catch
{ }
return answ;
- }
+ }
///
/// determina se sia abilitato il pulsante x attivare una lista di prelievo
///
@@ -432,6 +432,22 @@ namespace GMW.WebUserControls
{ }
return answ;
}
+ ///
+ /// determina se sia abilitato il pulsante x approvare e scaricare una lista di prelievo
+ ///
+ ///
+ ///
+ public bool ScaricaEnabled(object codStato)
+ {
+ bool answ = false;
+ try
+ {
+ answ = ((int)codStato == (int)statoLista.completata);
+ }
+ catch
+ { }
+ return answ;
+ }
///
/// gestione cambio selezione valore
@@ -452,16 +468,18 @@ namespace GMW.WebUserControls
// setto se sia possibile prelevare le righe (SOLO se iniziata)
bool prelievoOk = false;
bool cambioUdcOk = false;
+ int codStato = 0;
try
{
- int codStato = GMW_data.MagClass.magazzino.taElencoListePrelievo.getByCodLista(grView.SelectedValue.ToString())[0].CodStatoLista;
- cambioUdcOk = (codStato == (int)statoLista.bozza);
- prelievoOk = (codStato == (int)statoLista.iniziata);
+ codStato = GMW_data.MagClass.magazzino.taElencoListePrelievo.getByCodLista(grView.SelectedValue.ToString())[0].CodStatoLista;
+ cambioUdcOk = (codStato == (int)statoLista.bozza);
+ prelievoOk = (codStato == (int)statoLista.iniziata);
}
catch
{ }
- mod_viewRigheListaPrelievo1.prelievoEnabled = prelievoOk; // abilito il prelievo SOLO se la lista è già iniziata...
- mod_viewRigheListaPrelievo1.editRigheEnabled = cambioUdcOk; // abilito il prelievo SOLO se la lista è in BOZZA...
+ mod_viewRigheListaPrelievo1.prelievoEnabled = prelievoOk; // abilito il prelievo SOLO se la lista è già iniziata...
+ mod_viewRigheListaPrelievo1.editRigheEnabled = cambioUdcOk; // abilito il prelievo SOLO se la lista è in BOZZA...
+ mod_viewRigheListaPrelievo1.intStatoLista = codStato; // salvo il cod (INT) stato della lista
// mostra con dettagli
mod_viewRigheListaPrelievo1.Visible = true;
mod_viewRigheListaPrelievo1.resetSelezione();
@@ -529,7 +547,15 @@ namespace GMW.WebUserControls
{
SteamWare.memLayer.ML.setSessionVal("nextObjCommand", "completaListaPrelievo");
}
-
+ ///
+ /// salvo in session che il prox comando è completare lista prelievo...
+ ///
+ ///
+ ///
+ protected void imgScaricaLista_Click(object sender, ImageClickEventArgs e)
+ {
+ SteamWare.memLayer.ML.setSessionVal("nextObjCommand", "scaricaListaPrelievo");
+ }
///
/// in caso di aggiornamento verifico se sia salvato un comando inizia o completa lista prelievo...
///
@@ -589,6 +615,19 @@ namespace GMW.WebUserControls
// blocco update!
e.Cancel = true;
break;
+ case "scaricaListaPrelievo":
+ GMW_data.MagClass.magazzino.scaricaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto);
+ updateOds();
+ grView.EditIndex = -1;
+ grView.DataBind();
+ // sollevo evento nuovo valore...
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
+ // blocco update!
+ e.Cancel = true;
+ break;
default:
// faccio update!
break;
diff --git a/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs b/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs
index bd62f1ab..c701e684 100644
--- a/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs
+++ b/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs
@@ -12,7 +12,6 @@ namespace GMW.WebUserControls
{
public partial class mod_viewRigheListaPrelievo : SteamWare.ApplicationUserControl
{
-
#region area da NON modificare
#region area protected
@@ -236,25 +235,24 @@ namespace GMW.WebUserControls
///
public bool scambiaEnabled(object statoPrelevata, object udc)
{
- // !!! FARE verifica se abilitare SOLO x parte iniziale di editing liste prelievo e NON a carrellista...
- bool answ = true; //prelievoEnabled;
- //if (prelievoEnabled)
- //{
- // // controllo se non risulti prelevato l'UDC in un altra lista...
- // if (!udcPrelevato(udc))
- // {
- // answ = false;
- // }
- // else
- // {
- // try
- // {
- // answ = !Convert.ToBoolean(statoPrelevata);
- // }
- // catch
- // { }
- // }
- //}
+ bool answ = (intStatoLista <= ((int) statoLista.completata));
+ if (answ)
+ {
+ // controllo se non risulti prelevato l'UDC in un altra lista...
+ if (!udcPrelevato(udc))
+ {
+ answ = false;
+ }
+ else
+ {
+ try
+ {
+ answ = !Convert.ToBoolean(statoPrelevata);
+ }
+ catch
+ { }
+ }
+ }
return answ;
}
///
@@ -268,7 +266,8 @@ namespace GMW.WebUserControls
bool answ = false;
if (udcPrelevato(udc))
{
- answ = true;
+ //answ = true;
+ answ = !Convert.ToBoolean(statoPrelevata);
}
return answ;
}
@@ -436,6 +435,10 @@ namespace GMW.WebUserControls
///
public bool prelievoEnabled { get; set; }
///
+ /// registra lo stato della lista di prelievo (x controllo visibilità valori)
+ ///
+ public int intStatoLista { get; set; }
+ ///
/// salvo parametri x selettore ajax
///
///
@@ -457,6 +460,5 @@ namespace GMW.WebUserControls
}
#endregion
-
}
}
\ No newline at end of file
diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll
index 5b966919..646a1d7e 100644
Binary files a/GMW/GMW/bin/GMW.dll and b/GMW/GMW/bin/GMW.dll differ
diff --git a/GMW/GMW/bin/GMW_data.dll b/GMW/GMW/bin/GMW_data.dll
index 73ea721c..5d41378f 100644
Binary files a/GMW/GMW/bin/GMW_data.dll and b/GMW/GMW/bin/GMW_data.dll differ
diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll
index 5b966919..646a1d7e 100644
Binary files a/GMW/GMW/obj/Debug/GMW.dll and b/GMW/GMW/obj/Debug/GMW.dll differ
diff --git a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache
index 01655801..37150634 100644
Binary files a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache differ
diff --git a/GMW/GMW_data/MagClass.cs b/GMW/GMW_data/MagClass.cs
index e64f59c0..b1ae8f4f 100644
--- a/GMW/GMW_data/MagClass.cs
+++ b/GMW/GMW_data/MagClass.cs
@@ -479,6 +479,8 @@ namespace GMW_data
* indico la lista come compeltata = 1 (true)
* */
+ // !!! FARE!!! verificare parte AS x lista di prelievo scaricata...
+
esitoOperazione answ = esitoOperazione.errore;
int trovate = 0;
DS_magazzino.ElencoListePrelievoDataTable tabella;
@@ -493,7 +495,7 @@ namespace GMW_data
if (trovate > 0)
{
// se la lista è iniziata
- if (riga.CodStatoLista == (int)statoLista.iniziata)
+ if (riga.CodStatoLista == (int)statoLista.completata)
{
// ricavo il codtipolista
string codTipoListaAttuale = riga.CodTipoLista;
diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll
index 73ea721c..5d41378f 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/obj/Debug/GMW_data.dll b/GMW/GMW_data/obj/Debug/GMW_data.dll
index 73ea721c..5d41378f 100644
Binary files a/GMW/GMW_data/obj/Debug/GMW_data.dll and b/GMW/GMW_data/obj/Debug/GMW_data.dll differ