diff --git a/GMW/GMW/DettaglioBlocco.aspx.cs b/GMW/GMW/DettaglioBlocco.aspx.cs index 7f43d2df..606a0699 100644 --- a/GMW/GMW/DettaglioBlocco.aspx.cs +++ b/GMW/GMW/DettaglioBlocco.aspx.cs @@ -14,7 +14,5 @@ namespace GMW } - - } } diff --git a/GMW/GMW/MagLogico.aspx.cs b/GMW/GMW/MagLogico.aspx.cs index f4dc3587..09067cae 100644 --- a/GMW/GMW/MagLogico.aspx.cs +++ b/GMW/GMW/MagLogico.aspx.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; +using SteamWare; namespace GMW { @@ -12,6 +13,11 @@ namespace GMW protected void Page_Load(object sender, EventArgs e) { mod_statoMagLogico1.eh_selValore += new EventHandler(mod_statoMagLogico1_eh_selValore); + // se non è postback resetto variabili... + if (!Page.IsPostBack) + { + memLayer.ML.emptySessionVal("CodMagLogico_sel"); + } } void mod_statoMagLogico1_eh_selValore(object sender, EventArgs e) diff --git a/GMW/GMW/StatoMag.aspx.cs b/GMW/GMW/StatoMag.aspx.cs index bf219db1..6d40b466 100644 --- a/GMW/GMW/StatoMag.aspx.cs +++ b/GMW/GMW/StatoMag.aspx.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; +using SteamWare; namespace GMW { @@ -12,6 +13,11 @@ namespace GMW protected void Page_Load(object sender, EventArgs e) { mod_statoMag1.eh_selValore += new EventHandler(mod_statoMag1_eh_selValore); + // se non è postback resetto variabili... + if (!Page.IsPostBack) + { + memLayer.ML.emptySessionVal("CodMag_sel"); + } } void mod_statoMag1_eh_selValore(object sender, EventArgs e) diff --git a/GMW/GMW/WebUserControls/mod_dettaglioBlocco.ascx b/GMW/GMW/WebUserControls/mod_dettaglioBlocco.ascx index 789f5a7c..ad5869c0 100644 --- a/GMW/GMW/WebUserControls/mod_dettaglioBlocco.ascx +++ b/GMW/GMW/WebUserControls/mod_dettaglioBlocco.ascx @@ -24,7 +24,6 @@ - mostrare solo mag >0 diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll index 4e359809..41190e0e 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 2c863de8..36193349 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 4e359809..f4e3d63b 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 09f608b7..d7f4ad14 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 a9cb309d..41190e0e 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/ResolveAssemblyReference.cache b/GMW/GMW/obj/Release/ResolveAssemblyReference.cache index e5b8f05f..b4b3782c 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/DS_Utility.xsd b/GMW/GMW_data/DS_Utility.xsd index a45e2f26..1f323ed3 100644 --- a/GMW/GMW_data/DS_Utility.xsd +++ b/GMW/GMW_data/DS_Utility.xsd @@ -158,7 +158,7 @@ WHERE (value = @value) - + BatchQueue.stp_batch_RapQual_S01 @@ -169,7 +169,7 @@ WHERE (value = @value) - + BatchQueue.stp_batch_RapQual_S02 @@ -179,7 +179,7 @@ WHERE (value = @value) - + dbo.stp_celleCreaMancantiBlocco @@ -193,7 +193,7 @@ WHERE (value = @value) - + dbo.stp_ContaCelle4Blocchi @@ -206,7 +206,7 @@ WHERE (value = @value) - + dbo.stp_ContaCelle4Tipo @@ -219,7 +219,7 @@ WHERE (value = @value) - + dbo.stp_ContaCelleBlocco @@ -234,7 +234,7 @@ WHERE (value = @value) - + dbo.stp_ContaCelleCapa @@ -247,7 +247,7 @@ WHERE (value = @value) - + dbo.stp_ContaCelleCreate @@ -260,7 +260,7 @@ WHERE (value = @value) - + dbo.stp_ContaDeltaCelleBlocco @@ -272,7 +272,7 @@ WHERE (value = @value) - + dbo.stp_UDC_delibera @@ -489,21 +489,21 @@ WHERE (conditio = @conditio) - + - + - + @@ -516,22 +516,22 @@ WHERE (conditio = @conditio) - - + + - + - + @@ -544,35 +544,15 @@ WHERE (conditio = @conditio) - - + + - - - - - - - - - - - - - - - - - - - - - + @@ -586,21 +566,41 @@ WHERE (conditio = @conditio) - + + + + + + + - + + + + + + + + + + + + + + + - + @@ -613,29 +613,29 @@ WHERE (conditio = @conditio) - - + + - + - + - + @@ -648,8 +648,8 @@ WHERE (conditio = @conditio) - - + + @@ -662,14 +662,14 @@ WHERE (conditio = @conditio) - + - + @@ -682,21 +682,21 @@ WHERE (conditio = @conditio) - + - + - + @@ -709,14 +709,14 @@ WHERE (conditio = @conditio) - + - + @@ -729,7 +729,7 @@ WHERE (conditio = @conditio) - + @@ -742,21 +742,21 @@ WHERE (conditio = @conditio) - + - + - + @@ -769,21 +769,21 @@ WHERE (conditio = @conditio) - + - + - + diff --git a/GMW/GMW_data/DS_Utility.xss b/GMW/GMW_data/DS_Utility.xss index 46e41617..1cd67a06 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/GMW_data.csproj b/GMW/GMW_data/GMW_data.csproj index d4d08134..f741bdc6 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/MagClass.cs b/GMW/GMW_data/MagClass.cs index 55d95457..a2bfa515 100644 --- a/GMW/GMW_data/MagClass.cs +++ b/GMW/GMW_data/MagClass.cs @@ -193,14 +193,16 @@ namespace GMW_data answ = true; } } - catch - { } - // solo se ha fatto spostamento posizioen corrente verifico se fare spostamento in posizione LOGICA magazzino + catch (Exception e) + { + logger.lg.scriviLog(string.Format("Errore durante spostamento cella: {0}", e), tipoLog.EXCEPTION); + } + // solo se ha fatto spostamento posizione corrente verifico se fare spostamento in posizione LOGICA magazzino if (answ) { try { - // verifico tipo cella e se ci sia da fare spsotamento in mag logico/contabile + // verifico tipo cella e se ci sia da fare spostamento in mag logico/contabile int idxTipoCella = taCelle.getByIdxCella(IdxCellaTo)[0].IdxTipoCella; bool needSetMag = taTipoCella.getByIdx(idxTipoCella)[0].SetMag; if (needSetMag) diff --git a/GMW/GMW_data/SqlScripts/GMW_00265.sql b/GMW/GMW_data/SqlScripts/GMW_00265.sql new file mode 100644 index 00000000..d5de3376 --- /dev/null +++ b/GMW/GMW_data/SqlScripts/GMW_00265.sql @@ -0,0 +1,435 @@ +-- update + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +/*************************************** +* function dateToAsFormat +* +* converte le date da DATETIME al formato AS 8 cifre AAAAMMGG +* +* Steamware, S.E.L. +* mod: 2010.09.29 +* +****************************************/ +create FUNCTION dateToAsFormat +( + @data DATETIME +) +RETURNS NVARCHAR(8) +AS + BEGIN + RETURN CONVERT(NVARCHAR(8), @data, 112) + END +go + +commit +go + + + + + +set xact_abort on +go + +begin transaction +go + +alter table PosizioneUdcStorico drop + constraint FK_PosizioneUdcStorico_ElencoCartellini +go + +exec sp_rename 'PK_PosizioneUdcStorico_1', 'tmp__PK_PosizioneUdcStorico_1', 'OBJECT' +go + +exec sp_rename 'PosizioneUdcStorico', 'tmp__PosizioneUdcStorico_0', 'OBJECT' +go + +create table PosizioneUdcStorico( + UDC nvarchar(50) not null, + IdxCella int not null, + DataInizio datetime not null, + CodCS nchar(2) not null, + DataFine datetime, + + constraint PK_PosizioneUdcStorico_1 primary key(UDC,IdxCella,DataInizio) +) +go + +alter table PosizioneUdcStorico add + constraint FK_PosizioneUdcStorico_ElencoCartellini foreign key(UDC) references ElencoCartellini(UDC) on update cascade +go + +insert into PosizioneUdcStorico(UDC,IdxCella,DataInizio,CodCS,DataFine) select UDC,IdxCella,DataInizio,CodCS,DataFine from tmp__PosizioneUdcStorico_0 +go + +drop table tmp__PosizioneUdcStorico_0 +go + +commit +go + + +create index [] on RilPro.RapQual(DataRapQual) + include(nRapQual,CodFor,CodLega,Qta,BenesQual,UDC) +go + + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +create VIEW v_RapQualSunto +AS +SELECT TOP (100) PERCENT CAST(nRapQual AS NVARCHAR(20)) AS nRapQual, DataRapQual, CodFor, CodLega, SUM(Qta) AS Qta, BenesQual, COUNT(*) AS UdcTot, + COUNT(UDC) AS UdcAssoc +FROM RilPro.RapQual +GROUP BY nRapQual, DataRapQual, CodFor, CodLega, BenesQual +ORDER BY nRapQual +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 = "RapQual (RilPro)" + Begin Extent = + Top = 6 + Left = 38 + Bottom = 314 + Right = 208 + 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 = 12 + Column = 1440 + Alias = 1305 + 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_RapQualSunto' +go + +exec sp_addextendedproperty 'MS_DiagramPaneCount', 1, 'SCHEMA', 'dbo', 'VIEW', 'v_RapQualSunto' +go + +alter VIEW v_selMagLogico +AS +SELECT DISTINCT TOP (100) PERCENT CAST(IdxPosizione AS NVARCHAR(20)) AS value, 'Mag. ' + CAST(IdxPosizione AS NVARCHAR(20)) AS label, CodCS AS conditio +FROM dbo.ElencoCartellini +WHERE (IdxPosizione > 0) +ORDER BY label +go + +commit +go + + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +/*************************************** +* STORED stp_batch_RapQual_S01 +* +* Esegue lo step 1 (caricamento dati RAW da AS400) per la tab dei rapporti di qualità +* +* Steamware, S.E.L. +* mod: 2010.09.23 +* +****************************************/ +alter PROCEDURE BatchQueue.stp_batch_RapQual_S01 +( + @minData DATETIME +) +AS + -- BOZZA DA COMPLETARE A CURA MAZZUCCONI!!! + + DECLARE @SQL AS NVARCHAR(1000) + DECLARE @dataAs400 AS VARCHAR(8) + + SET @dataAs400 = (SELECT dbo.dateToAsFormat(@minData)) + + -- svuoto tab raw attuale + /* + DELETE FROM RawData.XOGIX00F + */ + + + -- INSERISCO DA AS400 + /* + INSERT INTO RawData.XOGIX00F + ( + SET @SQL = + N'SELECT + XRPQLN + ,XRPQLD + ,XNRETI + ,XCDFOR + ,XCDTER + ,XCDPAR + ,XDTPRO + ,XTRPRO + ,XQTPRO + ,XDESMT + ,XMATSC + ,XBENQL + FROM OPENQUERY( P65220DC, ''SELECT * FROM MAZZT_DTV3.XOGIX00F WHERE XRPQLD >= ' + SET @SQL = @SQL + @dataAs400 + ''' )' + + EXEC sp_executesql @SQL + ) + */ + +RETURN +go + +commit +go + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +/*************************************** +* STORED stp_rappQualSuntoGetByDataRange +* +* Ottiene l'elenco dei record di rapp qualità di AS dato il range delle date +* +* Steamware, S.E.L. +* mod: 2010.09.29 +* +****************************************/ +create PROCEDURE stp_rappQualSuntoGetByDataRange +( + @dataFrom DATETIME, + @dataTo DATETIME +) +AS + -- restituisce le righe richieste + SELECT * + FROM v_RapQualSunto + WHERE (DataRapQual > dbo.dateToAsFormat(@dataFrom)) AND (DataRapQual < dbo.dateToAsFormat(@dataTo)) + ORDER BY nRapQual +RETURN +go + +/*************************************** +* STORED stp_rappQualSuntoGetByNumRap +* +* Ottiene il record di rapp qualità di AS dato il numero del rapporto di qualità +* +* Steamware, S.E.L. +* mod: 2010.09.29 +* +****************************************/ +create PROCEDURE stp_rappQualSuntoGetByNumRap +( + @nRapQual NVARCHAR(20) +) +AS + -- restituisce le righe richieste + SELECT * + FROM v_RapQualSunto + WHERE (nRapQual = @nRapQual) +RETURN +go + +/*************************************** +* STORED stp_spostaUdc +* +* sposta un UDC, salvandone la posizione precedente (se esiste) nella tab storica +* +* Steamware, S.E.L. +* mod: 2010.06.11 +* +****************************************/ +alter PROCEDURE stp_spostaUdc +( + @CodCS VARCHAR(2), + @UDC VARCHAR(50), + @IdxCellaTo INT +) +AS + +BEGIN TRAN + + -- DICHIARAZIONI iniziali variabili + DECLARE @IdxCellaFrom INT + DECLARE @capienza INT + DECLARE @numUdc INT + + -- controllo cella di partenza + SET @IdxCellaFrom = (SELECT IdxCella FROM PosizioneUdcCorrente WHERE UDC = @UDC) + -- controllo se la cella di dest vada indicata come piena + SET @capienza = ( + SELECT tc.Capienza + FROM TipoCella TC INNER JOIN Celle c ON TC.IdxTipoCella=c.IdxTipoCella + WHERE c.IdxCella = @IdxCellaFrom + ) + SET @numUdc = (SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE IdxCella = @IdxCellaFrom) + -- se capienza raggiunta aggiorno... + IF(@numUdc -1 < @capienza) + BEGIN + EXEC stp_celle_updPiena @IdxCellaFrom, 0 + END + + -- cancello posizione occupata + DELETE + FROM PosizioneUdcCorrente + WHERE UDC = @UDC + + -- creo una nuova posizione per l'UDC + INSERT INTO PosizioneUdcCorrente(UDC, IdxCella, CodCS, DataRif) + VALUES(@UDC, @IdxCellaTo, @CodCS, GETDATE()) + + -- controllo se la cella di dest vada indicata come piena + SET @capienza = ( + SELECT tc.Capienza + FROM TipoCella TC INNER JOIN Celle c ON TC.IdxTipoCella=c.IdxTipoCella + WHERE c.IdxCella = @IdxCellaTo + ) + SET @numUdc = (SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE IdxCella = @IdxCellaTo) + -- se capienza raggiunta aggiorno... + IF(@numUdc >= @capienza) + BEGIN + EXEC stp_celle_updPiena @IdxCellaTo, 1 + END + +COMMIT TRAN + +RETURN +go + +commit +go + + + + + + +-- registro versione... +INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(265, GETDATE()) +GO diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index 2c863de8..476b12a5 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 e7f52807..36193349 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/obj/Debug/GMW_data.dll b/GMW/GMW_data/obj/Debug/GMW_data.dll index 2c863de8..476b12a5 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 92330d14..2c00c28e 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 diff --git a/GMW/GMW_data/obj/Release/GMW_data.dll b/GMW/GMW_data/obj/Release/GMW_data.dll index e7f52807..36193349 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_installer/GMW_installer.vdproj b/GMW/GMW_installer/GMW_installer.vdproj index 1e95d220..2e03f40c 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:{C178FA46-1964-4FE3-A031-C28112FD65A2}" - "PackageCode" = "8:{46FFE2A4-0DA7-428E-A7CF-D3A44FE34038}" + "PackageCode" = "8:{D437872E-91C9-498D-908E-CC83CBC11297}" "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 b7ea90c7..d6baf957 100644 Binary files a/GMW/GMW_installer/Release/GMW_installer.msi and b/GMW/GMW_installer/Release/GMW_installer.msi differ