diff --git a/GMW/GMW/Web.config b/GMW/GMW/Web.config index 61e40df9..c1964946 100644 --- a/GMW/GMW/Web.config +++ b/GMW/GMW/Web.config @@ -97,6 +97,9 @@ + + + diff --git a/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx b/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx index d6d19811..ff40f824 100644 --- a/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx +++ b/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx @@ -84,14 +84,15 @@
- - + - +
diff --git a/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.designer.cs b/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.designer.cs index a25a5fe2..64959dd9 100644 --- a/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.designer.cs +++ b/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.designer.cs @@ -200,7 +200,7 @@ namespace GMW.WebUserControls { /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.DropDownList ddlDestinatario; + protected global::AjaxControlToolkit.ComboBox ddlDestinatario; /// /// odsDestinatario control. diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll index 6f4a4f55..f1ad1e7f 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 8aed8f56..4bb5a3cd 100644 Binary files a/GMW/GMW/bin/GMW_data.dll and b/GMW/GMW/bin/GMW_data.dll differ diff --git a/GMW/GMW/mazzAppSettings.config b/GMW/GMW/mazzAppSettings.config index 616c7bce..f0ee8231 100644 --- a/GMW/GMW/mazzAppSettings.config +++ b/GMW/GMW/mazzAppSettings.config @@ -42,6 +42,9 @@ + + + diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll index 6f4a4f55..f1ad1e7f 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 73db1f1c..dd7d89ab 100644 Binary files a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW_WS/bilance.asmx.cs b/GMW/GMW_WS/bilance.asmx.cs index 0b0b6eaa..1fe6b748 100644 --- a/GMW/GMW_WS/bilance.asmx.cs +++ b/GMW/GMW_WS/bilance.asmx.cs @@ -468,6 +468,9 @@ namespace GMW_WS if (!toAS400) { DataProxy.obj.taCartellini.stp_rettMovAs400(ParticolareTrim, IdxPosizione.ToString(), Quantita); + // !!!FARE!!! modificare x passare UDC, e poi rivedere il crea cart consumando x cui se parte da consumo 84 sarà un cartellino in realtà già nel -84, mettere in web.config + // + // } // leggo la riga try diff --git a/GMW/GMW_data/DS_Applicazione.Designer.cs b/GMW/GMW_data/DS_Applicazione.Designer.cs index 836ba7b5..1b62a2eb 100644 --- a/GMW/GMW_data/DS_Applicazione.Designer.cs +++ b/GMW/GMW_data/DS_Applicazione.Designer.cs @@ -13996,6 +13996,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Particolare", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodMagAS", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[8] = new global::System.Data.SqlClient.SqlCommand(); @@ -15513,7 +15514,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int stp_rettMovAs400(string Particolare, string CodMagAS, global::System.Nullable Qta) { + public virtual int stp_rettMovAs400(string Particolare, string UDC, string CodMagAS, global::System.Nullable Qta) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7]; if ((Particolare == null)) { command.Parameters[1].Value = global::System.DBNull.Value; @@ -15521,17 +15522,23 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno else { command.Parameters[1].Value = ((string)(Particolare)); } - if ((CodMagAS == null)) { + if ((UDC == null)) { command.Parameters[2].Value = global::System.DBNull.Value; } else { - command.Parameters[2].Value = ((string)(CodMagAS)); + command.Parameters[2].Value = ((string)(UDC)); } - if ((Qta.HasValue == true)) { - command.Parameters[3].Value = ((decimal)(Qta.Value)); + if ((CodMagAS == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; } else { - command.Parameters[3].Value = global::System.DBNull.Value; + command.Parameters[3].Value = ((string)(CodMagAS)); + } + if ((Qta.HasValue == true)) { + command.Parameters[4].Value = ((decimal)(Qta.Value)); + } + else { + command.Parameters[4].Value = global::System.DBNull.Value; } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) diff --git a/GMW/GMW_data/DS_Applicazione.xsd b/GMW/GMW_data/DS_Applicazione.xsd index 7015c9a6..1045a864 100644 --- a/GMW/GMW_data/DS_Applicazione.xsd +++ b/GMW/GMW_data/DS_Applicazione.xsd @@ -791,6 +791,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno + @@ -1476,8 +1477,8 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - - + + @@ -1490,14 +1491,14 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - + - + @@ -1510,14 +1511,14 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - + - + @@ -1530,14 +1531,14 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - + - + @@ -1550,35 +1551,35 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - + - + - + - + - + @@ -1591,35 +1592,35 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - + - + - + - + - + @@ -1632,21 +1633,21 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - + - + - + @@ -1659,93 +1660,93 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + @@ -1759,28 +1760,28 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - - - - + + + + - - - - - + + + + + - + @@ -1807,96 +1808,96 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - + - + - - - + + + - - - - + + + + - + - + - + - + - + - + - + - + - + @@ -1978,14 +1979,14 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - + - + @@ -1998,157 +1999,157 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - + - - - - + + + + - - - - - - + + + + + + - + - + - + - + - + @@ -2161,42 +2162,42 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - + - + - + - + - + - + @@ -2209,14 +2210,14 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - + - + @@ -2229,21 +2230,21 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - + - + - + @@ -2256,102 +2257,102 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - - - + + + - + - + - + - - + + - - + + - + - + - + - + - + - + - + - + @@ -2361,59 +2362,59 @@ SELECT CodSoggetto, USER_NAME, DOMINIO FROM Soggetti2Utente WHERE (CodSoggetto = - + - + - + - + - + - + - + - + - + diff --git a/GMW/GMW_data/DS_Applicazione.xss b/GMW/GMW_data/DS_Applicazione.xss index a6a585d8..83c0242a 100644 --- a/GMW/GMW_data/DS_Applicazione.xss +++ b/GMW/GMW_data/DS_Applicazione.xss @@ -13,7 +13,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/GMW/GMW_data/DS_Utility.Designer.cs b/GMW/GMW_data/DS_Utility.Designer.cs index 62e821e0..a58d31f9 100644 --- a/GMW/GMW_data/DS_Utility.Designer.cs +++ b/GMW/GMW_data/DS_Utility.Designer.cs @@ -3913,7 +3913,7 @@ namespace GMW_data { this.columnvalue.MaxLength = 6; this.columnlabel.MaxLength = 50; this.columnconditio.AllowDBNull = false; - this.columnconditio.MaxLength = 50; + this.columnconditio.MaxLength = 20; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -5656,11 +5656,10 @@ namespace GMW_data.DS_UtilityTableAdapters { this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "SELECT *\r\nFROM v_selBlocco\r\nWHERE (CodCS = @CodCS) AND (" + - "CodMag = @CodMag)"; - this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.NChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, "CodCS", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodMag", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "CodMag", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].CommandText = "dbo.stp_selDestListePrelByConditio"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@conditio", global::System.Data.SqlDbType.NVarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -5688,19 +5687,13 @@ namespace GMW_data.DS_UtilityTableAdapters { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_Utility.v_selBloccoDataTable getByConditio(string CodCS, string CodMag) { + public virtual DS_Utility.v_selBloccoDataTable getByConditio(string conditio) { this.Adapter.SelectCommand = this.CommandCollection[1]; - if ((CodCS == null)) { - this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; - } - else { - this.Adapter.SelectCommand.Parameters[0].Value = ((string)(CodCS)); - } - if ((CodMag == null)) { + if ((conditio == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } else { - this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodMag)); + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(conditio)); } DS_Utility.v_selBloccoDataTable dataTable = new DS_Utility.v_selBloccoDataTable(); this.Adapter.Fill(dataTable); diff --git a/GMW/GMW_data/DS_Utility.xsd b/GMW/GMW_data/DS_Utility.xsd index db1653a8..101a2b34 100644 --- a/GMW/GMW_data/DS_Utility.xsd +++ b/GMW/GMW_data/DS_Utility.xsd @@ -57,15 +57,13 @@ ORDER BY label - + - - SELECT * -FROM v_selBlocco -WHERE (CodCS = @CodCS) AND (CodMag = @CodMag) + + dbo.stp_selDestListePrelByConditio - - + + @@ -507,21 +505,21 @@ WHERE (conditio = @conditio) - + - + - + @@ -534,22 +532,22 @@ WHERE (conditio = @conditio) - - + + - + - + @@ -562,35 +560,15 @@ WHERE (conditio = @conditio) - - + + - - - - - - - - - - - - - - - - - - - - - + @@ -604,21 +582,41 @@ WHERE (conditio = @conditio) - + + + + + + + - + + + + + + + + + + + + + + + - + @@ -631,29 +629,29 @@ WHERE (conditio = @conditio) - - + + - + - + - + @@ -666,8 +664,8 @@ WHERE (conditio = @conditio) - - + + @@ -680,14 +678,14 @@ WHERE (conditio = @conditio) - + - + @@ -700,21 +698,21 @@ WHERE (conditio = @conditio) - + - + - + @@ -727,14 +725,14 @@ WHERE (conditio = @conditio) - + - + @@ -747,21 +745,21 @@ WHERE (conditio = @conditio) - + - + - + @@ -774,21 +772,21 @@ WHERE (conditio = @conditio) - + - + - + @@ -801,7 +799,7 @@ WHERE (conditio = @conditio) - + @@ -818,7 +816,7 @@ WHERE (conditio = @conditio) - + diff --git a/GMW/GMW_data/DS_Utility.xss b/GMW/GMW_data/DS_Utility.xss index f6fdae06..742493d2 100644 --- a/GMW/GMW_data/DS_Utility.xss +++ b/GMW/GMW_data/DS_Utility.xss @@ -6,19 +6,19 @@ --> - - - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/GMW/GMW_data/MagClass.cs b/GMW/GMW_data/MagClass.cs index e72793bb..df452ed5 100644 --- a/GMW/GMW_data/MagClass.cs +++ b/GMW/GMW_data/MagClass.cs @@ -287,21 +287,48 @@ namespace GMW_data /// public bool scaricaUdcMpWip(string UDC) { + // inizializzo bool answ = false; + int idxCellaFrom = 0; + int idxPosizUdcCorr = 0; + int idxPosizUdcDest = 0; + // calcolo posizione UDC corrente (se c'è...) try { // mi serve per posizione udc corrente DS_magazzino.PosizioneUdcCorrenteRow rigaUdcCorrente = taPosUdcCorr.getByUDC(UDC)[0]; // il secondo idx che mi serve - int idxCellaFrom = rigaUdcCorrente.IdxCella; - // calcolo posizione destinazione da state machine... - int idxPosizUdcCorr = taElencoCartellini.getDetailsUdcByUdc(UDC)[0].IdxPosizione; - int idxPosizUdcDest = StateMachine.SM.getIdxPostizioneTo("UDC_CONS", idxPosizUdcCorr); - // sposto UDC - answ = scaricaUDC(UDC, idxCellaFrom, idxPosizUdcDest); + idxCellaFrom = rigaUdcCorrente.IdxCella; } - catch - { } + catch(Exception e) + { + logger.lg.scriviLog(string.Format("Errore in fase di recupero cella per l'UDC {0}: {1}{2}", UDC, Environment.NewLine, e), tipoLog.EXCEPTION); + } + // ora calcolo gli altri dati dalla rica ElencoCartellini dell'UDC + try + { + // calcolo posizione destinazione da state machine... + idxPosizUdcCorr = taElencoCartellini.getDetailsUdcByUdc(UDC)[0].IdxPosizione; + idxPosizUdcDest = StateMachine.SM.getIdxPostizioneTo("UDC_CONS", idxPosizUdcCorr); + } + catch (Exception e) + { + logger.lg.scriviLog(string.Format("Errore in fase di recupero dati posizioni from/to per l'UDC {0}: {1}{2}", UDC, Environment.NewLine, e), tipoLog.EXCEPTION); + } + // ora provo ad eseguire! + try + { + if (idxPosizUdcDest != 0) // solo se c'è una posizione da cui poter fare lo scaricamento... + { + // sposto UDC + answ = scaricaUDC(UDC, idxCellaFrom, idxPosizUdcDest); + } + } + catch (Exception e) + { + logger.lg.scriviLog(string.Format("Errore in fase di scaricamneto dell'UDC {0}: {1}{2}", UDC, Environment.NewLine, e), tipoLog.EXCEPTION); + } + return answ; } diff --git a/GMW/GMW_data/StateMachine.cs b/GMW/GMW_data/StateMachine.cs index abcc78ba..03d58f69 100644 --- a/GMW/GMW_data/StateMachine.cs +++ b/GMW/GMW_data/StateMachine.cs @@ -47,10 +47,28 @@ namespace GMW_data /// public void deliberaUdc(string UDC, string CodTipoDelibera) { + bool fatto = false; try { // calcolo la prima cella possibile data utils.obj.taSTP.stp_UDC_delibera(CodTipoDelibera, UDC, MagClass.magazzino.CodSoggCurrUser, memLayer.ML.confReadString("CodCS")); + // dopo la delibera passo direttamente al consumo se richiesto! + if (memLayer.ML.confReadBool("Cosumo84PostDelibera")) + { + // prendo i dati PRIMA che scarichi l'UDC... e con qta negativa xché qui devo "rimetterlo a posto"... + DS_magazzino.ElencoCartelliniRow riga = MagClass.magazzino.taCartellini.getDetailsUdcByUdc(UDC)[0]; + string Particolare = riga.Particolare; + int IdxPosizione = riga.IdxPosizione; + decimal Quantita = -riga.Qta; + // da db determino che non faccio scaricamento automatico da altre posizioni terzisti/clienti (solo 84) xché non c'è in TabTranEventi + fatto = MagClass.magazzino.scaricaUdcMpWip(UDC); + // calcolo l'eventuale rettifica x AS + if (fatto) + { + // devo fare un movimento di compensazioen su mag 84 x non scaricare subito la quantità che ho appena messo in AS400... + DataProxy.obj.taCartellini.stp_rettMovAs400(Particolare, UDC, IdxPosizione.ToString(), Quantita); + } + } } catch (Exception e) { @@ -58,7 +76,7 @@ namespace GMW_data } } /// - /// calcola dalla tabella di transizioni la nuova posizioen associata all'evento ed alla posizione attuale + /// calcola dalla tabella di transizioni la nuova posizione associata all'evento ed alla posizione attuale /// /// /// diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index 8aed8f56..4bb5a3cd 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 8aed8f56..4bb5a3cd 100644 Binary files a/GMW/GMW_data/obj/Debug/GMW_data.dll and b/GMW/GMW_data/obj/Debug/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll b/GMW/GMW_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll index c2f11347..5875a2b1 100644 Binary files a/GMW/GMW_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll and b/GMW/GMW_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll differ diff --git a/GMW/GMW_data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll b/GMW/GMW_data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll index 8c83fa20..e38ec5c1 100644 Binary files a/GMW/GMW_data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll and b/GMW/GMW_data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll differ