diff --git a/GMW/GMW/WebUserControls/mod_labAssStampaUdc.ascx b/GMW/GMW/WebUserControls/mod_labAssStampaUdc.ascx
index f3ed51b7..58955ae6 100644
--- a/GMW/GMW/WebUserControls/mod_labAssStampaUdc.ascx
+++ b/GMW/GMW/WebUserControls/mod_labAssStampaUdc.ascx
@@ -1,5 +1,6 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_labAssStampaUdc.ascx.cs" Inherits="GMW.WebUserControls.mod_labAssStampaUdc" %>
-
+<%--
\ No newline at end of file
+ onclick="btnAssStampa_Click" />--%>
+ W.I.P.
\ No newline at end of file
diff --git a/GMW/GMW/WebUserControls/mod_labAssStampaUdc.ascx.cs b/GMW/GMW/WebUserControls/mod_labAssStampaUdc.ascx.cs
index c18b3547..20e1a309 100644
--- a/GMW/GMW/WebUserControls/mod_labAssStampaUdc.ascx.cs
+++ b/GMW/GMW/WebUserControls/mod_labAssStampaUdc.ascx.cs
@@ -18,7 +18,7 @@ namespace GMW.WebUserControls
protected void btnAssStampa_Click(object sender, EventArgs e)
{
- associaStampaUdc(Convert.ToInt32(txtNumRapp.Text.Trim()));
+ //associaStampaUdc(Convert.ToInt32(txtNumRapp.Text.Trim()));
}
///
@@ -27,11 +27,11 @@ namespace GMW.WebUserControls
///
private void associaStampaUdc(int numRappUdc)
{
- bool fatto= MagClass.magazzino.creaUdcDaRappQualita(numRappUdc, true);
- if (!fatto)
- {
- MagClass.magazzino.stampaUdcDaRappQualita(numRappUdc);
- }
+ //bool fatto= MagClass.magazzino.creaUdcDaRappQualita(numRappUdc, true);
+ //if (!fatto)
+ //{
+ // MagClass.magazzino.stampaUdcDaRappQualita(numRappUdc);
+ //}
}
}
}
\ No newline at end of file
diff --git a/GMW/GMW/WebUserControls/mod_labAssStampaUdc.ascx.designer.cs b/GMW/GMW/WebUserControls/mod_labAssStampaUdc.ascx.designer.cs
index 60650252..b1af9804 100644
--- a/GMW/GMW/WebUserControls/mod_labAssStampaUdc.ascx.designer.cs
+++ b/GMW/GMW/WebUserControls/mod_labAssStampaUdc.ascx.designer.cs
@@ -12,23 +12,5 @@ namespace GMW.WebUserControls {
public partial class mod_labAssStampaUdc {
-
- ///
- /// txtNumRapp control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.TextBox txtNumRapp;
-
- ///
- /// btnAssStampa control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button btnAssStampa;
}
}
diff --git a/GMW/GMW/WebUserControls/mod_labConsUdc.ascx b/GMW/GMW/WebUserControls/mod_labConsUdc.ascx
index 6fb60cf5..21786bf3 100644
--- a/GMW/GMW/WebUserControls/mod_labConsUdc.ascx
+++ b/GMW/GMW/WebUserControls/mod_labConsUdc.ascx
@@ -1 +1,2 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_labConsUdc.ascx.cs" Inherits="GMW.WebUserControls.mod_labConsUdc" %>
+W.I.P.
\ No newline at end of file
diff --git a/GMW/GMW/WebUserControls/mod_labConsUdc.ascx.cs b/GMW/GMW/WebUserControls/mod_labConsUdc.ascx.cs
index f136c2c9..df216718 100644
--- a/GMW/GMW/WebUserControls/mod_labConsUdc.ascx.cs
+++ b/GMW/GMW/WebUserControls/mod_labConsUdc.ascx.cs
@@ -4,6 +4,8 @@ using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
+using SteamWare;
+using GMW_data;
namespace GMW.WebUserControls
{
@@ -11,7 +13,9 @@ namespace GMW.WebUserControls
{
protected void Page_Load(object sender, EventArgs e)
{
-
}
+
+ // usare come x bilance
+ //MagClass.magazzino.scaricaUdcMpWip(UDC);
}
}
\ No newline at end of file
diff --git a/GMW/GMW/WebUserControls/mod_labConsUdc.ascx.designer.cs b/GMW/GMW/WebUserControls/mod_labConsUdc.ascx.designer.cs
index cc14ee22..d4f9289c 100644
--- a/GMW/GMW/WebUserControls/mod_labConsUdc.ascx.designer.cs
+++ b/GMW/GMW/WebUserControls/mod_labConsUdc.ascx.designer.cs
@@ -1,18 +1,16 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:2.0.50727.42
+// Runtime Version:2.0.50727.4927
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
-namespace GMW.WebUserControls
-{
-
-
- public partial class mod_labConsUdc
- {
+namespace GMW.WebUserControls {
+
+
+ public partial class mod_labConsUdc {
}
}
diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll
index ecf65bce..a9cb309d 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 47bc8e0f..98611702 100644
Binary files a/GMW/GMW/bin/GMW_data.dll and b/GMW/GMW/bin/GMW_data.dll differ
diff --git a/GMW/GMW/bin/SteamWare.dll b/GMW/GMW/bin/SteamWare.dll
index 4792c30b..d2716eb5 100644
Binary files a/GMW/GMW/bin/SteamWare.dll and b/GMW/GMW/bin/SteamWare.dll differ
diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll
index 51e66167..1134d2dc 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 350fc2ae..99fe5fd2 100644
Binary files a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache differ
diff --git a/GMW/GMW/obj/Release/GMW.dll b/GMW/GMW/obj/Release/GMW.dll
index ecf65bce..a9cb309d 100644
Binary files a/GMW/GMW/obj/Release/GMW.dll and b/GMW/GMW/obj/Release/GMW.dll differ
diff --git a/GMW/GMW/obj/Release/RdlCompile.cache b/GMW/GMW/obj/Release/RdlCompile.cache
index c8d0aec4..90e41daa 100644
Binary files a/GMW/GMW/obj/Release/RdlCompile.cache and b/GMW/GMW/obj/Release/RdlCompile.cache differ
diff --git a/GMW/GMW/obj/Release/ResolveAssemblyReference.cache b/GMW/GMW/obj/Release/ResolveAssemblyReference.cache
index d86189de..e5b8f05f 100644
Binary files a/GMW/GMW/obj/Release/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Release/ResolveAssemblyReference.cache differ
diff --git a/GMW/GMW_data/GMW_data.csproj b/GMW/GMW_data/GMW_data.csproj
index 9ef96f97..d4d08134 100644
--- a/GMW/GMW_data/GMW_data.csproj
+++ b/GMW/GMW_data/GMW_data.csproj
@@ -160,6 +160,7 @@
SettingsSingleFileGenerator
Settings.Designer.cs
+
diff --git a/GMW/GMW_data/SqlScripts/GMW_00259.sql b/GMW/GMW_data/SqlScripts/GMW_00259.sql
index a910d44b..c349dd55 100644
--- a/GMW/GMW_data/SqlScripts/GMW_00259.sql
+++ b/GMW/GMW_data/SqlScripts/GMW_00259.sql
@@ -6,6 +6,688 @@ where CodTipoDelibera='DelibWipPost'
go
-- aggiunta valori nuovi in AnagTipoEvento e TabTranPosizEventi
+set xact_abort on
+go
+
+begin transaction
+go
+
+INSERT INTO dbo.AnagTipoEvento
+ VALUES (N'UDC_CONS', N'Consumo UDC')
+go
+
+commit transaction
+go
+
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+INSERT INTO dbo.AnagPosizioni
+ VALUES (-84, N'AM - WIP consumati')
+INSERT INTO dbo.AnagPosizioni
+ VALUES (-56, N'AM - MP consumati')
+go
+
+commit transaction
+go
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+INSERT INTO dbo.TabTranPosizEventi
+ VALUES (N'UDC_CONS', 56, -56)
+INSERT INTO dbo.TabTranPosizEventi
+ VALUES (N'UDC_CONS', 84, -84)
+go
+
+commit transaction
+go
+
+
+--- update tabelle varie: anag mag!
+set xact_abort on
+go
+
+begin transaction
+go
+
+alter table AnagMag add
+ Nascosto bit constraint DF_AnagMag_Nascosto default (0)
+go
+
+update AnagMag set Nascosto=0
+go
+
+set ANSI_NULLS on
+go
+
+/***************************************
+* STORED stp_ParticolariOverview
+*
+* elenco di overview sullo stato dei magazzini (dettaglio a "maglie larghe")
+*
+* Steamware, S.E.L.
+* mod: 2010.06.02
+*
+****************************************/
+alter PROCEDURE stp_magazzinoOverview
+(
+ @CodCS VARCHAR(2)
+)
+AS
+
+ SELECT AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco,
+ TipoCella.Capienza * Blocchi.NumX * Blocchi.NumY * Blocchi.NumZ AS TotCelle,
+ TipoCella.Capienza * COUNT(DISTINCT Celle.IdxCella) AS CelleAttive,
+ COUNT(PosizioneUdcCorrente.UDC) AS CelleOccupate,
+ TipoCella.Capienza * COUNT(DISTINCT Celle.IdxCella) - COUNT(PosizioneUdcCorrente.UDC) AS CelleLibere,
+ ISNULL(MIN(PosizioneUdcCorrente.DataRif), GETDATE()) AS Oldest, ISNULL(MAX(PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest
+FROM TipoCella INNER JOIN
+ AnagMag INNER JOIN
+ Blocchi ON AnagMag.CodMag = Blocchi.CodMag AND AnagMag.CodCS = Blocchi.CodCS ON TipoCella.CodMag = AnagMag.CodMag AND
+ TipoCella.CodCS = AnagMag.CodCS LEFT OUTER JOIN
+ Celle ON TipoCella.IdxTipoCella = Celle.IdxTipoCella AND Blocchi.IdxBlocco = Celle.IdxBlocco LEFT OUTER JOIN
+ PosizioneUdcCorrente ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella
+WHERE (Celle.Attiva = 1) AND (AnagMag.CodCS = @CodCS) AND (ISNULL(AnagMag.Nascosto, 0) = 0)
+GROUP BY AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, Blocchi.NumX, Blocchi.NumY, Blocchi.NumZ,
+ TipoCella.Capienza
+ORDER BY AnagMag.CodMag, Blocchi.CodBlocco
+
+RETURN
+go
+
+/***************************************
+* STORED stp_ParticolariOverview
+*
+* elenco di overview sullo stato dei magazzini LOGICI (dettaglio a "maglie larghe")
+*
+* Steamware, S.E.L.
+* mod: 2010.09.15
+*
+****************************************/
+alter PROCEDURE stp_magazzinoLogicoOverview
+(
+ @CodCS VARCHAR(2)
+)
+AS
+
+SELECT ElencoCartellini.CodCS, AnagPosizioni.IdxPosizione AS CodMagLogico, AnagPosizioni.DescPosizione AS DescMagLogico, Blocchi.IdxBlocco, AnagMag.CodMag,
+ Blocchi.CodBlocco, COUNT(ElencoCartellini.UDC) AS CelleOccupate, ISNULL(MIN(PosizioneUdcCorrente.DataRif), GETDATE()) AS Oldest,
+ ISNULL(MAX(PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest
+FROM Celle INNER JOIN
+ Blocchi INNER JOIN
+ AnagMag ON Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS ON Celle.IdxBlocco = Blocchi.IdxBlocco INNER JOIN
+ ElencoCartellini INNER JOIN
+ PosizioneUdcCorrente ON ElencoCartellini.UDC = PosizioneUdcCorrente.UDC INNER JOIN
+ AnagPosizioni ON ElencoCartellini.IdxPosizione = AnagPosizioni.IdxPosizione ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella
+WHERE (ElencoCartellini.CodCS = @CodCS) AND (ISNULL(AnagMag.Nascosto, 0) = 0)
+GROUP BY ElencoCartellini.CodCS, AnagPosizioni.IdxPosizione, AnagPosizioni.DescPosizione, Blocchi.IdxBlocco, Blocchi.CodBlocco, AnagMag.CodMag
+ORDER BY CodMagLogico, Blocchi.CodBlocco
+
+RETURN
+go
+
+commit
+go
+
+
+-- update triggers cartellini
+set xact_abort on
+go
+
+begin transaction
+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)
+
+ -- 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)
+ -- se c'è stata modifica di quantità inizio a rettificare quella
+ IF UPDATE(Qta)
+ BEGIN
+ INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
+ (
+ SELECT GETDATE(), 'UDC_MOD', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), @qta-Qta
+ FROM deleted
+ WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
+ )
+ 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, CodMagAS, Quantita)
+ (
+ SELECT GETDATE(), 'UDC_MOV', Particolare, 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, CodMagAS, Quantita)
+ (
+ SELECT GETDATE(), 'UDC_MOV', Particolare, 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
+
+-- =============================================
+-- Author: Samuele E. Locatelli
+-- Create date: 2009-09-20
+-- Description: trigger x inserimento movimenti
+-- nella coda di trasferimento batch
+-- verso AS400 x DELETE UDC
+-- =============================================
+alter TRIGGER trg_DelMovAS
+ ON ElencoCartellini
+ AFTER DELETE
+AS
+BEGIN
+
+ -- setup variabili e verbosità
+ SET NOCOUNT ON;
+ -- inserisco movimenti AS
+ INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
+ (
+ SELECT GETDATE(), 'UDC_DEL', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), -Qta
+ FROM deleted
+ WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1) AND ((CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END) = 1)
+ )
+
+END
+go
+
+-- =============================================
+-- Author: Samuele E. Locatelli
+-- Create date: 2009-09-20
+-- Description: trigger x inserimento movimenti
+-- nella coda di trasferimento batch
+-- verso AS400 x INSERT UDC
+-- =============================================
+alter TRIGGER trg_InsMovAS
+ ON ElencoCartellini
+ AFTER INSERT
+AS
+BEGIN
+
+ -- setup variabili e verbosità
+ SET NOCOUNT ON;
+ DECLARE @partOk AS BIT
+
+ -- controllo che CI SIA il particoalre (altrimenti non eseguo)
+ SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM inserted)
+
+ IF(@partOk = 1)
+ BEGIN
+ -- metto in storico la posizione attuale dell'UDC (SE esiste) CANCELLATO
+ INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
+ (
+ SELECT GETDATE(), 'UDC_NEW', Particolare, 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
+go
+
+commit
+go
+
+
+-- fix dei codSoggetto
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+alter table StoricoCartellini alter column
+ CodSoggetto nchar(17)
+go
+
+commit
+go
+
+-- aggiungo vista
+set xact_abort on
+go
+
+begin transaction
+go
+
+set ANSI_NULLS on
+go
+
+create VIEW v_posizioniDelibere
+AS
+SELECT DISTINCT tpe.IdxPosizione, atd.CodTipoDelibera
+FROM dbo.TabTranPosizEventi AS tpe INNER JOIN
+ dbo.AnagTipoEvento AS ate ON tpe.CodEvento = ate.CodEvento INNER JOIN
+ dbo.AnagTipoDelibere AS atd ON ate.CodEvento = atd.CodEvento
+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 = "tpe"
+ Begin Extent =
+ Top = 6
+ Left = 38
+ Bottom = 118
+ Right = 208
+ End
+ DisplayFlags = 280
+ TopColumn = 0
+ End
+ Begin Table = "ate"
+ Begin Extent =
+ Top = 6
+ Left = 246
+ Bottom = 101
+ Right = 416
+ End
+ DisplayFlags = 280
+ TopColumn = 0
+ End
+ Begin Table = "atd"
+ Begin Extent =
+ Top = 6
+ Left = 454
+ Bottom = 118
+ Right = 632
+ 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_posizioniDelibere'
+go
+
+exec sp_addextendedproperty 'MS_DiagramPaneCount', 1, 'SCHEMA', 'dbo', 'VIEW', 'v_posizioniDelibere'
+go
+
+commit
+go
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+set ANSI_NULLS on
+go
+
+alter VIEW v_UdcDetail
+AS
+SELECT dbo.ElencoCartellini.UDC, ISNULL(dbo.ElencoCartellini.RagSociale, N'') AS RagSociale, ISNULL(dbo.ElencoCartellini.Particolare, N'') AS Particolare,
+ ISNULL(dbo.ElencoCartellini.DescParticolare, N'') AS DescParticolare, ISNULL(dbo.ElencoCartellini.DisegnoGrezzo, N'') AS DisegnoGrezzo,
+ ISNULL(dbo.ElencoCartellini.Esponente, N'') AS Esponente, ISNULL(dbo.ElencoCartellini.DescImpianto, N'') AS DescImpianto, ISNULL(dbo.ElencoCartellini.DataFus,
+ N'') AS DataFus, ISNULL(dbo.ElencoCartellini.TurnoFus, 0) AS TurnoFus, dbo.ElencoCartellini.CodImballo, dbo.ElencoCartellini.Qta,
+ ISNULL(dbo.AnagStatiProdotto.DescStato, N'') AS DescStato, dbo.ElencoCartellini.ModDate, ISNULL(dbo.Blocchi.CodMag, N'') AS CodMag,
+ ISNULL(dbo.Blocchi.CodBlocco, N'') AS CodBlocco, ISNULL(dbo.Celle.CodCella, N'') AS CodCella, ISNULL(dbo.Celle.IdxCella, 0) AS IdxCella, ISNULL(dbo.Celle.X, 0)
+ AS X, ISNULL(dbo.Celle.Y, 0) AS Y, ISNULL(dbo.Celle.Z, 0) AS Z, dbo.ElencoCartellini.IdxPosizione
+FROM dbo.AnagStatiProdotto RIGHT OUTER JOIN
+ dbo.ElencoCartellini ON dbo.AnagStatiProdotto.CodStato = dbo.ElencoCartellini.CodStato AND
+ dbo.AnagStatiProdotto.CodStato = dbo.ElencoCartellini.CodStato LEFT OUTER JOIN
+ dbo.Celle INNER JOIN
+ dbo.PosizioneUdcCorrente ON dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella AND dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella AND
+ dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella INNER JOIN
+ dbo.Blocchi ON dbo.Celle.IdxBlocco = dbo.Blocchi.IdxBlocco INNER JOIN
+ dbo.AnagMag ON dbo.Blocchi.CodMag = dbo.AnagMag.CodMag AND dbo.Blocchi.CodCS = dbo.AnagMag.CodCS AND
+ dbo.Blocchi.CodMag = dbo.AnagMag.CodMag AND dbo.Blocchi.CodCS = dbo.AnagMag.CodCS AND dbo.Blocchi.CodMag = dbo.AnagMag.CodMag AND
+ dbo.Blocchi.CodCS = dbo.AnagMag.CodCS ON dbo.ElencoCartellini.UDC = dbo.PosizioneUdcCorrente.UDC
+go
+
+exec sp_updateextendedproperty '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 = "AnagStatiProdotto"
+ Begin Extent =
+ Top = 6
+ Left = 38
+ Bottom = 101
+ Right = 208
+ End
+ DisplayFlags = 280
+ TopColumn = 0
+ End
+ Begin Table = "ElencoCartellini"
+ Begin Extent =
+ Top = 6
+ Left = 246
+ Bottom = 309
+ Right = 416
+ End
+ DisplayFlags = 280
+ TopColumn = 11
+ End
+ Begin Table = "Celle"
+ Begin Extent =
+ Top = 27
+ Left = 818
+ Bottom = 156
+ Right = 988
+ End
+ DisplayFlags = 280
+ TopColumn = 0
+ End
+ Begin Table = "PosizioneUdcCorrente"
+ Begin Extent =
+ Top = 71
+ Left = 548
+ Bottom = 200
+ Right = 718
+ End
+ DisplayFlags = 280
+ TopColumn = 0
+ End
+ Begin Table = "Blocchi"
+ Begin Extent =
+ Top = 70
+ Left = 1080
+ Bottom = 199
+ Right = 1250
+ End
+ DisplayFlags = 280
+ TopColumn = 0
+ End
+ Begin Table = "AnagMag"
+ Begin Extent =
+ Top = 188
+ Left = 799
+ Bottom = 334
+ Right = 969
+ End
+ DisplayFlags = 280
+ TopColumn = 0
+ End
+ End
+ End
+ Begin SQLPane =
+ End
+ Begin DataPane =
+ Begin ParameterDefaults = ""
+ End
+ Begin ColumnWidths = 22
+ Width = 284
+ Width = 15', 'SCHEMA', 'dbo', 'VIEW', 'v_UdcDetail'
+go
+
+exec sp_updateextendedproperty 'MS_DiagramPane2', '00
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ 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_UdcDetail'
+go
+
+commit
+go
+
+
+
+
-- registro versione...
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(259, GETDATE())
diff --git a/GMW/GMW_data/SqlScripts/GMW_00260.sql b/GMW/GMW_data/SqlScripts/GMW_00260.sql
new file mode 100644
index 00000000..14d87df2
--- /dev/null
+++ b/GMW/GMW_data/SqlScripts/GMW_00260.sql
@@ -0,0 +1,986 @@
+-- update stored varie
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+set ANSI_NULLS on
+go
+
+/***************************************
+* STORED stp_consumaMP
+*
+* Salva il movimento di consumo dell'UDC di MP indicato
+*
+* Steamware, S.E.L.
+* mod: 2010.09.24
+*
+****************************************/
+create PROCEDURE BatchQueue.stp_consumaMP
+(
+ @XRPQLN INT, --è il num rap qualità
+ @XNRETI NVARCHAR(10), -- è il numRapQual
+ @XDTPRO INT, -- data 8 cifre aaaammgg
+ @XTRPRO NVARCHAR(5) -- turno
+)
+AS
+ -- BOZZA DA COMPLETARE A CURA MAZZUCCONI!!!
+
+ DECLARE @SQL AS NVARCHAR(1000)
+
+ -- Faccio chiamata su AS400
+
+ SET @SQL = N' OPENQUERY( P65220DC, ''UPDATE MAZZT_DTV3.XOGIX00F'
+ SET @SQL = @SQL + 'SET XDTPRO = ' + @XDTPRO + ', XTRPRO = ' + @XTRPRO
+ SET @SQL = @SQL + ', XDESMT = ''F01'', XMATSC=''S'' '
+ SET @SQL = @SQL + 'WHERE XRPQLN =' + @XRPQLN + ' AND XNRETI = ' + @XNRETI + ''' )'
+
+ EXEC sp_executesql @SQL
+
+RETURN
+go
+
+/***************************************
+* STORED stp_annullaUDC
+*
+* annulla un UDC
+*
+* Steamware, S.E.L.
+* mod: 2010.04.28
+*
+****************************************/
+alter PROCEDURE stp_annullaUDC
+(
+ @UDC VARCHAR(20),
+ @CodSoggetto VARCHAR(17)
+)
+AS
+
+DECLARE @CodEvento VARCHAR(10)
+DECLARE @CodTipoDichiaraz VARCHAR(1)
+
+SET @CodEvento = 'UDC_ANN'
+SET @CodTipoDichiaraz = 'U'
+
+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)
+
+ -- faccio update
+ UPDATE ElencoCartellini
+ SET IdxPosizione = 0
+ WHERE UDC = @UDC
+
+
+COMMIT TRAN
+
+RETURN
+go
+
+commit
+go
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+set ANSI_NULLS on
+go
+
+/***************************************
+* STORED stp_getUdcDetailFullCode
+*
+* ottiene l'elenco degli UDC con i dati significativi partendo da un codice UDC COMPLETO
+*
+* Steamware, S.E.L.
+* mod: 2010.05.24
+*
+****************************************/
+alter PROCEDURE stp_getUdcDetailFullCode
+(
+ @UDC VARCHAR(50),
+ @CodCS VARCHAR(2)
+)
+AS
+
+SELECT ElencoCartellini.UDC, ISNULL(ElencoCartellini.RagSociale, N'') AS RagSociale, ISNULL(ElencoCartellini.Particolare, N'') AS Particolare,
+ ISNULL(ElencoCartellini.DescParticolare, N'') AS DescParticolare, ISNULL(ElencoCartellini.DisegnoGrezzo, N'') AS DisegnoGrezzo,
+ ISNULL(ElencoCartellini.Esponente, N'') AS Esponente, ISNULL(ElencoCartellini.DescImpianto, N'') AS DescImpianto,
+ ISNULL(ElencoCartellini.DataFus, N'') AS DataFus, ISNULL(ElencoCartellini.TurnoFus, 0) AS TurnoFus, ElencoCartellini.CodImballo,
+ ElencoCartellini.Qta, ISNULL(AnagStatiProdotto.DescStato, N'') AS DescStato, ElencoCartellini.ModDate,
+ ISNULL(Blocchi.CodMag, N'') AS CodMag,
+ ISNULL(Blocchi.CodBlocco, N'') AS CodBlocco, ISNULL(Celle.CodCella, N'') AS CodCella, ISNULL(dbo.Celle.IdxCella, 0) AS IdxCella,
+ ISNULL(Celle.X, 0) AS X, ISNULL(Celle.Y, 0) AS Y, ISNULL(Celle.Z, 0) AS Z, ElencoCartellini.IdxPosizione
+FROM AnagStatiProdotto RIGHT OUTER JOIN
+ ElencoCartellini ON AnagStatiProdotto.CodStato = ElencoCartellini.CodStato AND AnagStatiProdotto.CodStato = ElencoCartellini.CodStato
+ LEFT OUTER JOIN Celle INNER JOIN PosizioneUdcCorrente ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella
+ AND Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND Celle.IdxCella = PosizioneUdcCorrente.IdxCella
+ INNER JOIN Blocchi ON Celle.IdxBlocco = Blocchi.IdxBlocco INNER JOIN AnagMag ON Blocchi.CodMag = AnagMag.CodMag
+ AND Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag
+ AND Blocchi.CodCS = AnagMag.CodCS ON ElencoCartellini.UDC = PosizioneUdcCorrente.UDC
+WHERE (ElencoCartellini.UDC = @UDC) AND (ElencoCartellini.CodCS = @CodCS)
+
+RETURN
+go
+
+/***************************************
+* STORED stp_getUdcDetailFullCode
+*
+* ottiene l'elenco degli UDC con i dati significativi partendo da un valore da cercare come LIKE in
+* - UDC
+* - Particolare
+*
+* Steamware, S.E.L.
+* mod: 2010.05.24
+*
+****************************************/
+alter PROCEDURE stp_getUdcDetailLikeSearch
+(
+ @searchVal VARCHAR(50),
+ @CodCS VARCHAR(2)
+)
+AS
+
+SELECT ElencoCartellini.UDC, ISNULL(ElencoCartellini.RagSociale, N'') AS RagSociale, ISNULL(ElencoCartellini.Particolare, N'') AS Particolare,
+ ISNULL(ElencoCartellini.DescParticolare, N'') AS DescParticolare, ISNULL(ElencoCartellini.DisegnoGrezzo, N'') AS DisegnoGrezzo,
+ ISNULL(ElencoCartellini.Esponente, N'') AS Esponente, ISNULL(ElencoCartellini.DescImpianto, N'') AS DescImpianto,
+ ISNULL(ElencoCartellini.DataFus, N'') AS DataFus, ISNULL(ElencoCartellini.TurnoFus, 0) AS TurnoFus, ElencoCartellini.CodImballo,
+ ElencoCartellini.Qta, ISNULL(AnagStatiProdotto.DescStato, N'') AS DescStato, ElencoCartellini.ModDate,
+ ISNULL(Blocchi.CodMag, N'') AS CodMag, ISNULL(Blocchi.CodBlocco, N'') AS CodBlocco, ISNULL(Celle.CodCella, N'') AS CodCella,
+ ISNULL(dbo.Celle.IdxCella, 0) AS IdxCella, ISNULL(Celle.X, 0) AS X, ISNULL(Celle.Y, 0) AS Y, ISNULL(Celle.Z, 0) AS Z, ElencoCartellini.IdxPosizione
+FROM AnagStatiProdotto RIGHT OUTER JOIN ElencoCartellini
+ ON AnagStatiProdotto.CodStato = ElencoCartellini.CodStato AND AnagStatiProdotto.CodStato = ElencoCartellini.CodStato
+ LEFT OUTER JOIN Celle INNER JOIN PosizioneUdcCorrente
+ ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND
+ Celle.IdxCella = PosizioneUdcCorrente.IdxCella INNER JOIN
+ Blocchi ON Celle.IdxBlocco = Blocchi.IdxBlocco INNER JOIN
+ AnagMag ON Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND
+ Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS ON
+ ElencoCartellini.UDC = PosizioneUdcCorrente.UDC
+WHERE (ElencoCartellini.CodCS = @CodCS) AND
+ ((ElencoCartellini.UDC like '%'+ @searchVal+'%') OR (ElencoCartellini.Particolare like '%'+ @searchVal+'%') OR
+ (ElencoCartellini.RagSociale like '%'+ @searchVal+'%'))
+
+RETURN
+go
+
+commit
+go
+
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+set ANSI_NULLS on
+go
+
+/***************************************
+* STORED stp_rappQualGetByNumRapQual
+*
+* Ottiene l'elenco dei record di rapp qualità di AS dato il numero del rapporto di qualità che NON HANNO UDC
+*
+* Steamware, S.E.L.
+* mod: 2010.09.23
+*
+****************************************/
+alter PROCEDURE stp_rappQualGetByNumRapQual
+(
+ @nRapQual INT
+)
+AS
+ -- restituisce le righe richieste
+ SELECT *
+ FROM RilPro.RapQual
+ WHERE (nRapQual = @nRapQual)-- AND (UDC IS NULL)
+
+RETURN
+go
+
+/***************************************
+* STORED stp_sbloccaUdc
+*
+* sblocca un dato UDC per modifica
+*
+* Steamware, S.E.L.
+* mod: 2010.04.28
+*
+****************************************/
+alter PROCEDURE stp_sbloccaUdc
+(
+ @UDC VARCHAR(20),
+ @CodSoggetto VARCHAR(17)
+)
+AS
+
+DECLARE @CodEvento VARCHAR(10)
+DECLARE @CodTipoDichiaraz VARCHAR(1)
+
+SET @CodEvento = 'UDC_SBL'
+SET @CodTipoDichiaraz = 'U'
+
+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)
+
+ -- faccio update
+ UPDATE ElencoCartellini
+ SET ModDate = GETDATE()
+ WHERE UDC = @UDC
+
+COMMIT TRAN
+
+RETURN
+go
+
+/***************************************
+* STORED stp_scaricaUdc
+*
+* elimina dalle posizioni correnti un UDC, salvandone la posizione precedente nella tab storica (per scaricamento / spedizione)
+*
+* Steamware, S.E.L.
+* mod: 2010.09.28
+*
+****************************************/
+alter PROCEDURE stp_scaricaUdc
+(
+ @UDC VARCHAR(50),
+ @IdxCellaFrom INT,
+ @IdxPosizione INT
+)
+AS
+
+BEGIN TRAN
+ /*
+ -- inizio mettendo in storico la posizione attuale dell'UDC (SE esiste)
+ INSERT INTO PosizioneUdcStorico(UDC, IdxCella, CodCS, DataInizio, DataFine)
+ (
+ SELECT UDC, IdxCella, CodCS, DataRif as DataInizio, GETDATE() as DataFine
+ FROM PosizioneUdcCorrente
+ WHERE UDC = @UDC AND IdxCella = @IdxCellaFrom
+ )
+ */
+ -- libero la posizione attuale dell'UDC (se c'è...)
+ DELETE
+ FROM PosizioneUdcCorrente
+ WHERE UDC = @UDC AND IdxCella = @IdxCellaFrom
+
+ -- aggiorno l'UDC come posizione finale...
+ UPDATE ElencoCartellini
+ SET IdxPosizione = @IdxPosizione
+ WHERE UDC = @UDC
+
+COMMIT TRAN
+
+RETURN
+go
+
+commit
+go
+
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+set ANSI_NULLS on
+go
+
+/***************************************
+* STORED stp_UDC_insNew
+*
+* crea un nuovo record nella TabStatoOdpUdc e restituisce il codice UDC appena creato
+*
+* Steamware, S.E.L.
+* mod: 2010.04.28
+*
+****************************************/
+alter PROCEDURE stp_UDC_insNew
+(
+ @CodCS VARCHAR(2),
+ @Flusso VARCHAR(2),
+ @Anno VARCHAR(2),
+ @Tara FLOAT,
+ @CodImballo AS VARCHAR(50),
+ @CodTipoDichiaraz CHAR(1),
+ @CodSoggetto VARCHAR(17)
+)
+AS
+
+-- DECLARE iniziali
+DECLARE @UDC AS VARCHAR(20)
+DECLARE @numFlu AS INT
+DECLARE @numUdc AS INT
+DECLARE @nextUdc AS INT
+
+------------------------------------------------------------------------------------------------------
+-- Flusso
+------------------------------------------------------------------------------------------------------
+-- controllo se esiste il flusso (bilancia)...
+SET @numFlu = (
+ SELECT count(*)
+ FROM AnagBilance
+ WHERE CodBilancia = @Flusso
+)
+-- ...sennò lo creo...
+IF(@numFlu = 0)
+ BEGIN
+ -- se c'è inserisco in tab
+ INSERT INTO AnagBilance(CodBilancia, DescrImpianto, CodCS)
+ VALUES (@Flusso, @Flusso, @CodCS)
+ END
+------------------------------------------------------------------------------------------------------
+
+
+------------------------------------------------------------------------------------------------------
+-- UDC
+------------------------------------------------------------------------------------------------------
+-- controllo se ci sia già un UDC per company / flusso anno
+BEGIN TRAN
+ -- cerco nella tab contatori UDC l'ultimo valido
+ SET @numUdc = (
+ SELECT count(*)
+ FROM ContatoriUdc
+ WHERE CodCS = @CodCS
+ AND Flusso = @Flusso
+ AND Anno = @Anno
+ )
+ -- controllo se record c'è...
+ IF(@numUdc > 0)
+ BEGIN
+ -- se c'è incremento di 1 in tab
+ UPDATE ContatoriUdc
+ SET LastIdx = LastIdx + 1
+ WHERE CodCS = @CodCS
+ AND Flusso = @Flusso
+ AND Anno = @Anno
+ END
+ ELSE
+ BEGIN
+ -- lo creo!
+ INSERT INTO ContatoriUdc(CodCS, Flusso, Anno, LastIdx)
+ VALUES (@CodCS, @Flusso, @Anno, 1)
+ END
+ -- aggiorno numero UDC
+ SET @numUdc = (
+ SELECT LastIdx
+ FROM ContatoriUdc
+ WHERE CodCS = @CodCS
+ AND Flusso = @Flusso
+ AND Anno = @Anno
+ )
+COMMIT TRAN
+------------------------------------------------------------------------------------------------------
+
+------------------------------------------------------------------------------------------------------
+-- Ciclo principale x inserimento nuovo record
+------------------------------------------------------------------------------------------------------
+-- ottengo il nuovo codice UDC completo
+--SET @UDC = 'U' + @CodCS + @Flusso + @Anno + dbo.f_padLeft(CAST(@numUdc AS VARCHAR(6)), 6, '0')
+SET @UDC = dbo.componiUdc(@CodCS, @Flusso, @Anno, @numUdc)
+
+-- inserisco un nuovo record
+INSERT INTO ElencoCartellini(CodCS, UDC, Tara, IdxPosizione, Qta, CodImballo, CreateDate, ModDate)
+VALUES (@CodCS, @UDC, @Tara, 0, 0, @CodImballo, GETDATE(), GETDATE())
+------------------------------------------------------------------------------------------------------
+
+------------------------------------------------------------------------------------------------------
+-- restituisco la tab dati con l'udc appena inserito
+------------------------------------------------------------------------------------------------------
+SELECT *
+FROM ElencoCartellini
+WHERE UDC = @UDC
+------------------------------------------------------------------------------------------------------
+
+RETURN
+go
+
+/***************************************
+* STORED stp_UDC_insNewFull
+*
+* crea un nuovo record nella TabStatoOdpUdc FULL (con pesi, qta...) e restituisce il codice UDC appena creato
+*
+* Steamware, S.E.L.
+* mod: 2010.04.28
+*
+****************************************/
+alter PROCEDURE stp_UDC_insNewFull
+(
+ @CodCS VARCHAR(2),
+ @Flusso VARCHAR(2),
+ @Anno VARCHAR(2),
+ @CodCliente VARCHAR(6),
+ @Particolare VARCHAR(15),
+ @CodImpianto AS VARCHAR(50),
+ @CodStampo VARCHAR(8),
+ @Esponente VARCHAR(6),
+ @Figura VARCHAR(4),
+ @DataFus DATETIME,
+ @TurnoFus INT,
+ @CodImballo VARCHAR(15),
+ @CodSoggetto VARCHAR(17),
+ @Tara FLOAT,
+ @IdxPosizione INT,
+ @CodTipoDichiaraz CHAR(1),
+ @CodEvento VARCHAR(10),
+ @Qta DECIMAL(10,2),
+ @PesoTot FLOAT,
+ @PesoCad FLOAT,
+ @CodStato VARCHAR(50),
+ @UDC_parent VARCHAR(20),
+ @DoDeleteUdcParent BIT
+)
+AS
+
+-- DECLARE iniziali
+DECLARE @UDC AS VARCHAR(20)
+DECLARE @RagSociale AS VARCHAR(35)
+DECLARE @DescParticolare AS VARCHAR(30)
+DECLARE @DescImpianto AS VARCHAR(50)
+DECLARE @DisegnoGrezzo AS VARCHAR(30)
+DECLARE @NumCont AS INT
+DECLARE @numFlu AS INT
+DECLARE @numUdc AS INT
+DECLARE @nextUdc AS INT
+DECLARE @IdxCella AS INT
+
+------------------------------------------------------------------------------------------------------
+-- Caricamento Dati da anagrafica
+------------------------------------------------------------------------------------------------------
+-- cerco la ragione sociale...
+SET @RagSociale = (
+ SELECT ISNULL(RagSociale, 'ND') AS RagSociale
+ FROM RilPro.AnagClienti
+ WHERE (CodCliente = @CodCliente)
+)
+
+-- Cerco descrizione del particolare...
+SET @DescParticolare = (
+ SELECT ISNULL(DescParticolare, 'ND') AS DescParticolare
+ FROM RilPro.AnagParticolari
+ WHERE (Particolare = @Particolare)
+)
+
+-- cerco codice disegno grezzo
+SET @DisegnoGrezzo = (
+ SELECT ISNULL(DisegnoGrezzo, 'ND') AS DescParticolare
+ FROM RilPro.AnagParticolari
+ WHERE (Particolare = @Particolare)
+)
+
+-- cerco descrizione Impianto
+SET @DescImpianto = (
+ SELECT ISNULL(DescImpianto, 'ND') AS DescImpianto
+ FROM AnagImpianti
+ WHERE (CodImpianto = @CodImpianto)
+)
+
+
+
+-- Calcolo contatore intero successivo x il contenitore...
+SET @NumCont = (
+ SELECT ISNULL(MAX(NumCont), 0) + 1 AS NumCont
+ FROM ElencoCartellini
+ WHERE (Particolare = @Particolare)
+ AND (DataFus = @DataFus)
+ AND (TurnoFus = @TurnoFus)
+ AND (CodImpianto = @CodImpianto)
+ AND (CodStampo = @CodStampo)
+ AND (Figura = @Figura)
+)
+
+
+------------------------------------------------------------------------------------------------------
+
+------------------------------------------------------------------------------------------------------
+-- Flusso
+------------------------------------------------------------------------------------------------------
+-- controllo se esiste il flusso (bilancia)...
+SET @numFlu = (
+ SELECT count(*)
+ FROM AnagBilance
+ WHERE CodBilancia = @Flusso
+)
+-- ...sennò lo creo...
+IF(@numFlu = 0)
+ BEGIN
+ -- se c'è inserisco in tab
+ INSERT INTO AnagBilance(CodBilancia, DescrImpianto, CodCS)
+ VALUES (@Flusso, @Flusso, @CodCS)
+ END
+------------------------------------------------------------------------------------------------------
+
+
+------------------------------------------------------------------------------------------------------
+-- UDC
+------------------------------------------------------------------------------------------------------
+-- controllo se ci sia già un UDC per company / flusso anno
+BEGIN TRAN
+ -- cerco nella tab contatori UDC l'ultimo valido
+ SET @numUdc = (
+ SELECT count(*)
+ FROM ContatoriUdc
+ WHERE CodCS = @CodCS
+ AND Flusso = @Flusso
+ AND Anno = @Anno
+ )
+ -- controllo se record c'è...
+ IF(@numUdc > 0)
+ BEGIN
+ -- se c'è incremento di 1 in tab
+ UPDATE ContatoriUdc
+ SET LastIdx = LastIdx + 1
+ WHERE CodCS = @CodCS
+ AND Flusso = @Flusso
+ AND Anno = @Anno
+ END
+ ELSE
+ BEGIN
+ -- lo creo!
+ INSERT INTO ContatoriUdc(CodCS, Flusso, Anno, LastIdx)
+ VALUES (@CodCS, @Flusso, @Anno, 1)
+ END
+ -- aggiorno numero UDC
+ SET @numUdc = (
+ SELECT LastIdx
+ FROM ContatoriUdc
+ WHERE CodCS = @CodCS
+ AND Flusso = @Flusso
+ AND Anno = @Anno
+ )
+COMMIT TRAN
+------------------------------------------------------------------------------------------------------
+
+------------------------------------------------------------------------------------------------------
+-- Ciclo principale x inserimento nuovo record
+------------------------------------------------------------------------------------------------------
+BEGIN TRAN
+ -- ottengo il nuovo codice UDC completo
+ --SET @UDC = 'U' + @CodCS + @Flusso + @Anno + dbo.f_padLeft(CAST(@numUdc AS VARCHAR(6)), 6, '0')
+ SET @UDC = dbo.componiUdc(@CodCS, @Flusso, @Anno, @numUdc)
+
+
+ -- inserisco un nuovo record
+ INSERT INTO ElencoCartellini(UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, CodImpianto, DescImpianto, CodStampo, Figura, DataFus, TurnoFus, CodImballo, CodSoggetto, NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad, CreateDate, ModDate)
+ VALUES (@UDC, @CodCS, @CodCliente, @RagSociale, @Particolare, @DescParticolare, @DisegnoGrezzo, @Esponente, @CodImpianto, @DescImpianto, @CodStampo, @Figura, @DataFus, @TurnoFus, @CodImballo, @CodSoggetto, @NumCont, @Tara, @Qta, @CodStato, @IdxPosizione, @PesoTot, @PesoCad, GETDATE(), GETDATE())
+
+ -- inserisco relazione parent-child tra UDC vecchio (tara) e nuovo (pesa)
+ INSERT INTO RelazUDC(UDC_parent, UDC_child)
+ VALUES (@UDC_parent, @UDC)
+COMMIT TRAN
+
+------------------------------------------------------------------------------------------------------
+
+------------------------------------------------------------------------------------------------------
+-- Ciclo secondario x eventuale cancelalzione UDC tara parent e inserimento in posizione
+------------------------------------------------------------------------------------------------------
+ -- se richiesto elimino l'UDC parent (tara)
+ IF(@DoDeleteUdcParent = 1)
+ BEGIN
+ DELETE FROM ElencoCartellini WHERE UDC = @UDC_parent
+ END
+
+ -- calcolo la prima cella della posizione indicata..
+ SET @IdxCella = (
+ SELECT TOP 1 c.IdxCella
+ FROM Celle c INNER JOIN Blocchi b ON c.IdxBlocco=b.IdxBlocco
+ WHERE b.CodMag = CAST(@IdxPosizione AS NVARCHAR(50))
+ )
+ -- inserisco il cartellino nella prima cella della posizione indicata..
+ INSERT INTO PosizioneUdcCorrente
+ VALUES (@UDC, @IdxCella, @CodCS, GETDATE())
+------------------------------------------------------------------------------------------------------
+
+/*
+------------------------------------------------------------------------------------------------------
+-- Salvataggio dati evento in tab StoricoEventi
+------------------------------------------------------------------------------------------------------
+INSERT INTO StoricoEventi(DataEv, CodEvento, CodOperatore, CodTipoDichiaraz, CodCS, UDC, Qta, PesoTot, PesoCad, Particolare, CodStato, CodStampo, Figura, FiguraIncisa)
+VALUES (GETDATE(), @CodEvento, @CodOperatore, @CodTipoDichiaraz, @CodCS, @UDC, @Qta, @PesoTot, @PesoCad, @Particolare, @CodStato, @CodStampo, @Figura, @FiguraIncisa)
+------------------------------------------------------------------------------------------------------
+*/
+
+------------------------------------------------------------------------------------------------------
+-- restituisco la tab dati con l'udc appena inserito
+------------------------------------------------------------------------------------------------------
+SELECT *
+FROM ElencoCartellini
+WHERE UDC = @UDC
+------------------------------------------------------------------------------------------------------
+
+RETURN
+go
+
+/***************************************
+* STORED stp_UDC_update
+*
+* aggiorna un cartellino dato il suo codice UDC e tutti i parametri da aggiornare
+*
+* Steamware, S.E.L.
+* mod: 2010.04.30
+*
+****************************************/
+alter PROCEDURE stp_UDC_update
+(
+ @UDC_edit VARCHAR(20),
+ @CodCS VARCHAR(2),
+ @Flusso VARCHAR(2),
+ @Anno VARCHAR(2),
+ @CodCliente VARCHAR(6),
+ @Particolare VARCHAR(15),
+ @CodImpianto AS VARCHAR(50),
+ @CodStampo VARCHAR(8),
+ @Esponente VARCHAR(6),
+ @Figura VARCHAR(4),
+ @DataFus DATETIME,
+ @TurnoFus INT,
+ @CodImballo VARCHAR(15),
+ @CodSoggetto VARCHAR(17),
+ @Tara FLOAT,
+ @IdxPosizione INT,
+ @CodTipoDichiaraz CHAR(1),
+ @CodEvento VARCHAR(10),
+ @Qta DECIMAL(10,2),
+ @PesoTot FLOAT,
+ @PesoCad FLOAT,
+ @CodStato VARCHAR(50),
+ @UDC_parent VARCHAR(20)
+)
+AS
+
+-- DECLARE iniziali
+DECLARE @RagSociale AS VARCHAR(35)
+DECLARE @DescParticolare AS VARCHAR(30)
+DECLARE @DescImpianto AS VARCHAR(50)
+DECLARE @DisegnoGrezzo AS VARCHAR(30)
+DECLARE @NumCont AS INT
+DECLARE @numFlu AS INT
+DECLARE @numUdc AS INT
+DECLARE @nextUdc AS INT
+
+------------------------------------------------------------------------------------------------------
+-- Caricamento Dati da anagrafica
+------------------------------------------------------------------------------------------------------
+-- cerco la ragione sociale...
+SET @RagSociale = (
+ SELECT ISNULL(RagSociale, 'ND') AS RagSociale
+ FROM RilPro.AnagClienti
+ WHERE (CodCliente = @CodCliente)
+)
+
+-- Cerco descrizione del particolare...
+SET @DescParticolare = (
+ SELECT ISNULL(DescParticolare, 'ND') AS DescParticolare
+ FROM RilPro.AnagParticolari
+ WHERE (Particolare = @Particolare)
+)
+
+-- cerco codice disegno grezzo
+SET @DisegnoGrezzo = (
+ SELECT ISNULL(DisegnoGrezzo, 'ND') AS DescParticolare
+ FROM RilPro.AnagParticolari
+ WHERE (Particolare = @Particolare)
+)
+
+-- cerco descrizione Impianto
+SET @DescImpianto = (
+ SELECT ISNULL(DescImpianto, 'ND') AS DescImpianto
+ FROM AnagImpianti
+ WHERE (CodImpianto = @CodImpianto)
+)
+
+
+
+-- Calcolo contatore intero successivo x il contenitore...
+SET @NumCont = (
+ SELECT NumCont
+ FROM ElencoCartellini
+ WHERE (UDC = @UDC_edit)
+)
+
+
+------------------------------------------------------------------------------------------------------
+
+------------------------------------------------------------------------------------------------------
+-- Flusso
+------------------------------------------------------------------------------------------------------
+-- controllo se esiste il flusso (bilancia)...
+SET @numFlu = (
+ SELECT count(*)
+ FROM AnagBilance
+ WHERE CodBilancia = @Flusso
+)
+-- ...sennò lo creo...
+IF(@numFlu = 0)
+ BEGIN
+ -- se c'è inserisco in tab
+ INSERT INTO AnagBilance(CodBilancia, DescrImpianto, CodCS)
+ VALUES (@Flusso, @Flusso, @CodCS)
+ END
+------------------------------------------------------------------------------------------------------
+
+------------------------------------------------------------------------------------------------------
+-- 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_edit)
+
+ -- elimino vecchio record parent/child
+ DELETE FROM RelazUDC
+ WHERE (UDC_child = @UDC_edit)
+
+ -- modifico il record
+ UPDATE ElencoCartellini
+ SET CodCS = @CodCS, CodCliente = @CodCliente, RagSociale = @RagSociale, Particolare = @Particolare, DescParticolare = @DescParticolare,
+ DisegnoGrezzo = @DisegnoGrezzo, Esponente = @Esponente, CodImpianto = @CodImpianto, DescImpianto = @DescImpianto, CodStampo = @CodStampo,
+ Figura = @Figura, DataFus = @DataFus, TurnoFus = @TurnoFus, CodImballo = @CodImballo, CodSoggetto = @CodSoggetto, NumCont = @NumCont,
+ Tara = @Tara, Qta = @Qta, CodStato = @CodStato, IdxPosizione = @IdxPosizione, PesoTot = @PesoTot, PesoCad = @PesoCad, ModDate = GETDATE()
+ WHERE UDC = @UDC_edit
+
+ -- inserisco relazione aprent-child tra UDC vecchio (tara) e nuovo (pesa)
+ INSERT INTO RelazUDC(UDC_parent, UDC_child)
+ VALUES (@UDC_parent, @UDC_edit)
+COMMIT TRAN
+------------------------------------------------------------------------------------------------------
+
+------------------------------------------------------------------------------------------------------
+-- restituisco la tab dati con l'udc appena inserito
+------------------------------------------------------------------------------------------------------
+SELECT *
+FROM ElencoCartellini
+WHERE UDC = @UDC_edit
+------------------------------------------------------------------------------------------------------
+
+RETURN
+go
+
+/***************************************
+* STORED stp_UDC_updateIdxPosizione
+*
+* aggiorna un cartellino x la sua posizione logica
+*
+* Steamware, S.E.L.
+* mod: 2010.06.12
+*
+****************************************/
+alter PROCEDURE stp_UDC_updateIdxPosizione
+(
+ @UDC VARCHAR(20),
+ @CodSoggetto VARCHAR(17),
+ @CodTipoDichiaraz CHAR(1),
+ @CodEvento VARCHAR(10),
+ @IdxPosizione INT
+)
+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 IdxPosizione = @IdxPosizione, ModDate = GETDATE()
+ WHERE UDC = @UDC
+
+COMMIT TRAN
+------------------------------------------------------------------------------------------------------
+
+------------------------------------------------------------------------------------------------------
+-- restituisco la tab dati con l'udc appena inserito
+------------------------------------------------------------------------------------------------------
+SELECT *
+FROM ElencoCartellini
+WHERE UDC = @UDC
+------------------------------------------------------------------------------------------------------
+
+RETURN
+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
+
+
+-- ulteriori fix
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+INSERT INTO dbo.AnagBilance
+ VALUES (N'MP', N'MP', N'MA')
+go
+
+commit transaction
+go
+
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+UPDATE dbo.AnagTipoDelibere SET
+ CodEvento=N'DelWipPost'
+ WHERE CodTipoDelibera=N'DelibWipPost'
+go
+
+commit transaction
+go
+
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+DELETE FROM dbo.AS400_MagCont WHERE CodMagAS=N'56'
+go
+
+commit transaction
+go
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+INSERT INTO dbo.Permessi
+ VALUES ('LAB', 'menu.aspx', 3, 0, 'GestLaboratorioMP', 'GestLaboratorioMPExpl')
+INSERT INTO dbo.Permessi
+ VALUES ('LAB_consumaUdc', 'LabConsumaUdc.aspx', 3, 2, 'ConsUDC', 'ConsUDCExpl')
+INSERT INTO dbo.Permessi
+ VALUES ('LAB_stampaUdc', 'LabStampaUdc.aspx', 3, 1, 'AcqPrntUdc', 'AcqPrntUdcExpl')
+go
+
+commit transaction
+go
+
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+INSERT INTO dbo.Permessi2Funzione
+ VALUES ('LAB', N'GMW_lab', 'S')
+INSERT INTO dbo.Permessi2Funzione
+ VALUES ('LAB_consumaUdc', N'GMW_lab', 'S')
+INSERT INTO dbo.Permessi2Funzione
+ VALUES ('LAB_stampaUdc', N'GMW_lab', 'S')
+go
+
+commit transaction
+go
+
+
+
+
+
+
+
+
+-- registro versione...
+INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(260, GETDATE())
+GO
diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll
index 33b94ad8..b21fe991 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/bin/Release/GMW_data.dll b/GMW/GMW_data/bin/Release/GMW_data.dll
index 47bc8e0f..98611702 100644
Binary files a/GMW/GMW_data/bin/Release/GMW_data.dll and b/GMW/GMW_data/bin/Release/GMW_data.dll differ
diff --git a/GMW/GMW_data/bin/Release/SteamWare.dll b/GMW/GMW_data/bin/Release/SteamWare.dll
index 4792c30b..d2716eb5 100644
Binary files a/GMW/GMW_data/bin/Release/SteamWare.dll and b/GMW/GMW_data/bin/Release/SteamWare.dll differ
diff --git a/GMW/GMW_data/obj/Debug/GMW_data.dll b/GMW/GMW_data/obj/Debug/GMW_data.dll
index 33b94ad8..b21fe991 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/Release/GMW_data.dll b/GMW/GMW_data/obj/Release/GMW_data.dll
index 47bc8e0f..98611702 100644
Binary files a/GMW/GMW_data/obj/Release/GMW_data.dll and b/GMW/GMW_data/obj/Release/GMW_data.dll differ
diff --git a/GMW/GMW_data/obj/Release/ResolveAssemblyReference.cache b/GMW/GMW_data/obj/Release/ResolveAssemblyReference.cache
index 36c25072..dc1fa4c9 100644
Binary files a/GMW/GMW_data/obj/Release/ResolveAssemblyReference.cache and b/GMW/GMW_data/obj/Release/ResolveAssemblyReference.cache differ
diff --git a/GMW/GMW_deploy/Release/obj/Debug/Refactor/GMW.dll b/GMW/GMW_deploy/Release/obj/Debug/Refactor/GMW.dll
new file mode 100644
index 00000000..fe24f05b
Binary files /dev/null and b/GMW/GMW_deploy/Release/obj/Debug/Refactor/GMW.dll differ
diff --git a/GMW/GMW_installer/GMW_installer.vdproj b/GMW/GMW_installer/GMW_installer.vdproj
index 894340ef..fa6b49b5 100644
--- a/GMW/GMW_installer/GMW_installer.vdproj
+++ b/GMW/GMW_installer/GMW_installer.vdproj
@@ -350,7 +350,7 @@
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:GMW"
"ProductCode" = "8:{2A742F34-D364-4A73-A150-185E858D621D}"
- "PackageCode" = "8:{66744511-0A41-463A-B2B4-4422976C415C}"
+ "PackageCode" = "8:{83AC625C-78E5-4DE0-8BD3-0E4856D99F4E}"
"UpgradeCode" = "8:{C9BC0732-DC92-4336-BAC9-A05A5D2A97C0}"
"RestartWWWService" = "11:TRUE"
"RemovePreviousVersions" = "11:TRUE"
@@ -829,7 +829,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_4FD0E5B75A7F47B79080EC0983BE6583"
{
- "SourcePath" = "8:..\\..\\SetDirectoryPermission\\obj\\Debug\\SetDirectoryPermission.exe"
+ "SourcePath" = "8:..\\..\\SetDirectoryPermission\\obj\\Release\\SetDirectoryPermission.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_5606017201AE45B480A8ABD8B8D68264"
@@ -857,7 +857,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_8BDD7AA9D46A46EC80880F83F13C902E"
{
- "SourcePath" = "8:..\\..\\IISCustomActionVB\\IISConsoleVB\\obj\\Debug\\IISConsoleVB.exe"
+ "SourcePath" = "8:..\\..\\IISCustomActionVB\\IISConsoleVB\\obj\\Release\\IISConsoleVB.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_5606017201AE45B480A8ABD8B8D68264"
diff --git a/GMW/GMW_installer/Release/GMW_installer.msi b/GMW/GMW_installer/Release/GMW_installer.msi
index 18d076a4..b7ea90c7 100644
Binary files a/GMW/GMW_installer/Release/GMW_installer.msi and b/GMW/GMW_installer/Release/GMW_installer.msi differ