diff --git a/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx b/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx index 5c36e748..d6d19811 100644 --- a/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx +++ b/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx @@ -83,19 +83,17 @@
- - Destinatario - - - - - - - - + + + + + + + +
diff --git a/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.cs b/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.cs index 057972af..71d5e756 100644 --- a/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.cs @@ -19,7 +19,7 @@ namespace GMW.WebUserControls ddlEsponente.Visible = false; ddlFigura.Visible = false; txtQta.Visible = false; - pnlDestinatario.Visible = false; + ddlDestinatario.Visible = false; ddlImballo.Visible = false; btnCreaNuova.Visible = false; btnCreaNuova.Text = traduci("CreaNuovaListaPrelievo"); @@ -86,7 +86,7 @@ namespace GMW.WebUserControls ddlEsponente.Visible = true; ddlFigura.Visible = true; txtQta.Visible = true; - pnlDestinatario.Visible = true; + ddlDestinatario.Visible = true; ddlImballo.Visible = true; // verifico if (numPezziDisp > 0) @@ -104,7 +104,7 @@ namespace GMW.WebUserControls ddlEsponente.Visible = false; ddlFigura.Visible = false; txtQta.Visible = false; - pnlDestinatario.Visible = false; + ddlDestinatario.Visible = false; ddlImballo.Visible = false; btnCreaNuova.Visible = false; } diff --git a/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.designer.cs b/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.designer.cs index 6c19efb8..a25a5fe2 100644 --- a/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.designer.cs +++ b/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.designer.cs @@ -185,13 +185,13 @@ namespace GMW.WebUserControls { protected global::System.Web.UI.WebControls.ObjectDataSource odsImballo; /// - /// pnlDestinatario control. + /// lblDestinatario control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Panel pnlDestinatario; + protected global::System.Web.UI.WebControls.Label lblDestinatario; /// /// ddlDestinatario control. @@ -203,13 +203,13 @@ namespace GMW.WebUserControls { protected global::System.Web.UI.WebControls.DropDownList ddlDestinatario; /// - /// odsDestinatari control. + /// odsDestinatario control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.ObjectDataSource odsDestinatari; + protected global::System.Web.UI.WebControls.ObjectDataSource odsDestinatario; /// /// lblTotPz control. diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll index 9114586d..6f4a4f55 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 dd8827f3..8aed8f56 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 092b4b18..6f4a4f55 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 37cee4dd..73db1f1c 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/DS_Utility.Designer.cs b/GMW/GMW_data/DS_Utility.Designer.cs index fa65eb70..62e821e0 100644 --- a/GMW/GMW_data/DS_Utility.Designer.cs +++ b/GMW/GMW_data/DS_Utility.Designer.cs @@ -3911,9 +3911,9 @@ namespace GMW_data { this.columnvalue.AllowDBNull = false; this.columnvalue.Unique = true; this.columnvalue.MaxLength = 6; - this.columnlabel.MaxLength = 35; + this.columnlabel.MaxLength = 50; this.columnconditio.AllowDBNull = false; - this.columnconditio.MaxLength = 3; + this.columnconditio.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -4899,7 +4899,7 @@ namespace GMW_data { public string label { get { if (this.IslabelNull()) { - return string.Empty; + return null; } else { return ((string)(this[this.tablev_selDestinatariListePrelievo.labelColumn])); diff --git a/GMW/GMW_data/DS_Utility.xsd b/GMW/GMW_data/DS_Utility.xsd index d0456c1e..db1653a8 100644 --- a/GMW/GMW_data/DS_Utility.xsd +++ b/GMW/GMW_data/DS_Utility.xsd @@ -507,21 +507,21 @@ WHERE (conditio = @conditio) - + - + - + @@ -534,22 +534,22 @@ WHERE (conditio = @conditio) - - + + - + - + @@ -562,35 +562,15 @@ WHERE (conditio = @conditio) - - + + - - - - - - - - - - - - - - - - - - - - - + @@ -604,21 +584,41 @@ WHERE (conditio = @conditio) - + + + + + + + - + + + + + + + + + + + + + + + - + @@ -631,29 +631,29 @@ WHERE (conditio = @conditio) - - + + - + - + - + @@ -666,8 +666,8 @@ WHERE (conditio = @conditio) - - + + @@ -680,14 +680,14 @@ WHERE (conditio = @conditio) - + - + @@ -700,21 +700,21 @@ WHERE (conditio = @conditio) - + - + - + @@ -727,14 +727,14 @@ WHERE (conditio = @conditio) - + - + @@ -747,21 +747,21 @@ WHERE (conditio = @conditio) - + - + - + @@ -774,21 +774,21 @@ WHERE (conditio = @conditio) - + - + - + @@ -801,24 +801,24 @@ WHERE (conditio = @conditio) - + - + - + - + - + diff --git a/GMW/GMW_data/SqlScripts/GMW_00290.sql b/GMW/GMW_data/SqlScripts/GMW_00290.sql index 7ed96c8a..3188f7b3 100644 --- a/GMW/GMW_data/SqlScripts/GMW_00290.sql +++ b/GMW/GMW_data/SqlScripts/GMW_00290.sql @@ -1,4 +1,416 @@ +set xact_abort on +go +begin transaction +go + +alter table AS400_MagCont add + CodMagAS_compensaz nvarchar(50) constraint DF_AS400_MagCont_CodMagAS_compensaz default (0) +go + +update AS400_MagCont set CodMagAS_compensaz=0 +go + +set ANSI_NULLS on +go + +-- ============================================= +-- Author: Samuele E. Locatelli +-- Create date: 2009-09-20 +-- Description: trigger x inserimento movimenti +-- nella coda di trasferimento batch +-- verso AS400 x UPDATE UDC +-- ============================================= +alter TRIGGER trg_updMovAS + ON ElencoCartellini + AFTER UPDATE +AS +BEGIN + + -- setup variabili e verbosità + SET NOCOUNT ON; + DECLARE @partOk AS BIT + DECLARE @IdxPosFrom AS INT + DECLARE @IdxPosTo AS INT + DECLARE @magFrom AS NVARCHAR(50) + DECLARE @magTo AS NVARCHAR(50) + DECLARE @qta AS DECIMAL(10,2) + DECLARE @qtaOld AS DECIMAL(10,2) + DECLARE @IdxPosizioneComp INT + + -- controllo che CI SIA il particolare (altrimenti non eseguo) + SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM deleted) + + IF(@partOk = 1) + SET @qta = (SELECT Qta FROM inserted) + SET @qtaOld = (SELECT Qta FROM deleted) + -- se c'è stata modifica di quantità inizio a rettificare quella + IF (UPDATE(Qta)) AND(@qta <> @qtaOld) + BEGIN + -- registro il VERO movimento + INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita) + ( + SELECT GETDATE(), 'UDC_MOD', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), @qta - Qta + FROM deleted + WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1) + ) + -- controllo: se il magazzino di destinazione richiede una compensazione registro il 2° movimento di compensazione + SET @IdxPosFrom = (SELECT IdxPosizione FROM deleted) + SET @IdxPosTo = (SELECT IdxPosizione FROM inserted) + -- calcolo il mag di compensazione + SET @IdxPosizioneComp = (SELECT CAST(ISNULL(CodMagAS_compensaz,0) AS INT) FROM AS400_MagCont WHERE (Attivo = 1) AND (CodMagAS = CAST(@IdxPosFrom AS NVARCHAR(50)))) + IF (@IdxPosizioneComp > 0) + BEGIN + INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita) + ( + SELECT GETDATE(), 'UDC_COMP', Particolare, UDC, CAST(@IdxPosizioneComp AS NVARCHAR(50)), Qta - @qta + FROM deleted + WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1) + ) + END + END + + -- controllo poi se sia cambiato il magazzino, altrimenti non lo inserisco + IF UPDATE(IdxPosizione) + BEGIN + -- Prendo le posizioni di magazzino precedente e nuova + SET @IdxPosFrom = (SELECT IdxPosizione FROM deleted) + SET @IdxPosTo = (SELECT IdxPosizione FROM inserted) + -- Le trasformo nelle equivalenti stringhe del codMag SE attive + SET @magFrom = (SELECT ISNULL(CodMagAS,'---') FROM AS400_MagCont WHERE Attivo = 1 AND CodMagAs = CAST(@IdxPosFrom AS NVARCHAR(50))) + SET @magTo = (SELECT ISNULL(CodMagAS,'---') FROM AS400_MagCont WHERE Attivo = 1 AND CodMagAs = CAST(@IdxPosTo AS NVARCHAR(50))) + + -- inserisco un movimento di deposito verso mag nuovo (SE attivo) + IF (@magFrom <> '---') + BEGIN + INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita) + ( + SELECT GETDATE(), 'UDC_MOV', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), -@qta + FROM deleted + WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1) + ) + END + -- inserisco un movimento di prelievo verso mag vecchio (SE attivo) + IF (@magTo <> '---') + BEGIN + INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita) + ( + SELECT GETDATE(), 'UDC_MOV', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), @qta + FROM inserted + WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1) + ) + END + END + +END +go + +commit +go + + +set xact_abort on +go + +begin transaction +go + +UPDATE dbo.AS400_MagCont SET + CodMagAS_compensaz=N'84' + WHERE CodMagAS=N'54' +UPDATE dbo.AS400_MagCont SET + CodMagAS_compensaz=N'84' + WHERE CodMagAS=N'88' +go + +commit transaction +go + + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +create VIEW v_specParticolari +AS +SELECT DISTINCT TOP (100) PERCENT CodCliente, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, CodStampo, Figura +FROM dbo.ElencoCartellini +WHERE (NOT (Particolare IS NULL)) AND (NOT (DisegnoGrezzo IS NULL)) +go + +exec sp_addextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00] +Begin DesignProperties = + Begin PaneConfigurations = + Begin PaneConfiguration = 0 + NumPanes = 4 + Configuration = "(H (1[40] 4[20] 2[20] 3) )" + End + Begin PaneConfiguration = 1 + NumPanes = 3 + Configuration = "(H (1 [50] 4 [25] 3))" + End + Begin PaneConfiguration = 2 + NumPanes = 3 + Configuration = "(H (1 [50] 2 [25] 3))" + End + Begin PaneConfiguration = 3 + NumPanes = 3 + Configuration = "(H (4 [30] 2 [40] 3))" + End + Begin PaneConfiguration = 4 + NumPanes = 2 + Configuration = "(H (1 [56] 3))" + End + Begin PaneConfiguration = 5 + NumPanes = 2 + Configuration = "(H (2 [66] 3))" + End + Begin PaneConfiguration = 6 + NumPanes = 2 + Configuration = "(H (4 [50] 3))" + End + Begin PaneConfiguration = 7 + NumPanes = 1 + Configuration = "(V (3))" + End + Begin PaneConfiguration = 8 + NumPanes = 3 + Configuration = "(H (1[56] 4[18] 2) )" + End + Begin PaneConfiguration = 9 + NumPanes = 2 + Configuration = "(H (1 [75] 4))" + End + Begin PaneConfiguration = 10 + NumPanes = 2 + Configuration = "(H (1[66] 2) )" + End + Begin PaneConfiguration = 11 + NumPanes = 2 + Configuration = "(H (4 [60] 2))" + End + Begin PaneConfiguration = 12 + NumPanes = 1 + Configuration = "(H (1) )" + End + Begin PaneConfiguration = 13 + NumPanes = 1 + Configuration = "(V (4))" + End + Begin PaneConfiguration = 14 + NumPanes = 1 + Configuration = "(V (2))" + End + ActivePaneConfig = 0 + End + Begin DiagramPane = + Begin Origin = + Top = 0 + Left = 0 + End + Begin Tables = + Begin Table = "ElencoCartellini" + Begin Extent = + Top = 6 + Left = 246 + Bottom = 322 + Right = 416 + End + DisplayFlags = 280 + TopColumn = 0 + End + End + End + Begin SQLPane = + End + Begin DataPane = + Begin ParameterDefaults = "" + End + Begin ColumnWidths = 9 + Width = 284 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + End + End + Begin CriteriaPane = + Begin ColumnWidths = 11 + Column = 1440 + Alias = 900 + Table = 1170 + Output = 720 + Append = 1400 + NewValue = 1170 + SortType = 1350 + SortOrder = 1410 + GroupBy = 1350 + Filter = 1350 + Or = 1350 + Or = 1350 + Or = 1350 + End + End +End +', 'SCHEMA', 'dbo', 'VIEW', 'v_specParticolari' +go + +exec sp_addextendedproperty 'MS_DiagramPaneCount', 1, 'SCHEMA', 'dbo', 'VIEW', 'v_specParticolari' +go + +commit +go + + + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +/*( +* STORED stp_ParticolariGetLike +* +* elenco dei particolari con ricerca LIKE +* +* Steamware, S.E.L. +* mod: 2010.07.07 +* +****************************************/ +create PROCEDURE stp_ParticolariGetLike +( + @searchVal VARCHAR(50), + @CodCS VARCHAR(2) +) +AS + + SELECT RilPro.AnagParticolari.* + FROM RilPro.AnagParticolari + WHERE (RilPro.AnagParticolari.CodCS = @CodCS) AND (RilPro.AnagParticolari.Particolare LIKE '%' + @searchVal + '%') + +RETURN +go + +commit +go + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +/*************************************** +* STORED stp_SpecParticolare +* +* ottiene il dettaglio delle specifiche di un particolare dato il suo codice +* +* Steamware, S.E.L. +* mod: 2010.10.29 +* +****************************************/ +create PROCEDURE stp_SpecParticolare +( + @Particolare NVARCHAR(15) +) +AS + +SELECT * +FROM v_specParticolari +WHERE Particolare=@Particolare + + +RETURN +go + +commit +go + + + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +/*************************************** +* STORED stp_UDC_updateQty +* +* aggiorna un cartellino x la sua quantità +* +* Steamware, S.E.L. +* mod: 2010.06.12 +* +****************************************/ +alter PROCEDURE stp_UDC_updateQty +( + @UDC VARCHAR(20), + @CodSoggetto VARCHAR(17), + @CodTipoDichiaraz CHAR(1), + @CodEvento VARCHAR(10), + @Qta DECIMAL(10,2) +) +AS + + +------------------------------------------------------------------------------------------------------ +-- Ciclo principale x edit record +------------------------------------------------------------------------------------------------------ +BEGIN TRAN + + /* + -- registro in StoricoCartellini + INSERT INTO StoricoCartellini(DataEv, CodEvento, CodTipoDichiaraz, UDC, CodCS,CodCliente, RagSociale, Particolare, DescParticolare, + DisegnoGrezzo, Esponente, CodImpianto, DescImpianto, CodStampo, Figura, DataFus, TurnoFus, CodImballo, CodSoggetto, + NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad) + SELECT GETDATE() AS DataEv, @CodEvento AS CodEvento, @CodTipoDichiaraz AS CodTipoDichiaraz, UDC, CodCS, + CodCliente, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, CodImpianto, DescImpianto, CodStampo, Figura, + DataFus, TurnoFus, CodImballo, @CodSoggetto AS CodSoggetto, NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad + FROM ElencoCartellini + WHERE (UDC = @UDC) + */ + + -- modifico il record + UPDATE ElencoCartellini + SET Qta = @Qta, ModDate = GETDATE() + WHERE UDC = @UDC + +COMMIT TRAN +------------------------------------------------------------------------------------------------------ + +------------------------------------------------------------------------------------------------------ +-- restituisco la tab dati con l'udc appena inserito +------------------------------------------------------------------------------------------------------ +SELECT * +FROM ElencoCartellini +WHERE UDC = @UDC +------------------------------------------------------------------------------------------------------ + +RETURN +go + +commit +go diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index fd901f46..8aed8f56 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 fd901f46..8aed8f56 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_Utility.Designer.cs.dll b/GMW/GMW_data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll index 97e0fb98..8c83fa20 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