diff --git a/ETS-WS/ETS-WS/ETS-DIP.csproj.user b/ETS-WS/ETS-WS/ETS-DIP.csproj.user index 92d0bc2..6005180 100644 --- a/ETS-WS/ETS-WS/ETS-DIP.csproj.user +++ b/ETS-WS/ETS-WS/ETS-DIP.csproj.user @@ -2,7 +2,7 @@ ProjectFiles - 218 + ETS diff --git a/ETS-WS/ETS-WS/Properties/PublishProfiles/WinLab.pubxml.user b/ETS-WS/ETS-WS/Properties/PublishProfiles/WinLab.pubxml.user index 6180a50..4966d51 100644 --- a/ETS-WS/ETS-WS/Properties/PublishProfiles/WinLab.pubxml.user +++ b/ETS-WS/ETS-WS/Properties/PublishProfiles/WinLab.pubxml.user @@ -5,7 +5,8 @@ by editing this MSBuild file. In order to learn more about this please visit htt --> - 2013-02-05T07:10:52.6281890+01:00 + + AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAFmNUguGW/kK/L084ZvFUuQAAAAACAAAAAAADZgAAwAAAABAAAAABRo5shDF7OTeRNwvUfNoJAAAAAASAAACgAAAAEAAAAALysf5mSclMEPtMgnVdSMoYAAAANOfPLOk7IUhlHd9AqYr05LFdoZlRYkBGFAAAALAX/7O7TM5wiF025tFVpGCwl4xZ \ No newline at end of file diff --git a/ETS-WS/ETS-WS/Web.config b/ETS-WS/ETS-WS/Web.config index f9ac5b4..330f83b 100644 --- a/ETS-WS/ETS-WS/Web.config +++ b/ETS-WS/ETS-WS/Web.config @@ -31,7 +31,7 @@ - + diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs index de75738..62323a3 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs +++ b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs @@ -150,10 +150,8 @@ namespace ETS_DIP.WebUserControls { grView.DataBind(); } - catch (Exception exc) - { - - } + catch + { } } /// /// restituisce una stringa di max "maxChar caratteri tenendo gli ultimi lastChar diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_filtroRicerca.ascx b/ETS-WS/ETS-WS/WebUserControls/mod_filtroRicerca.ascx index 5d04dd2..dee25b7 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_filtroRicerca.ascx +++ b/ETS-WS/ETS-WS/WebUserControls/mod_filtroRicerca.ascx @@ -11,8 +11,8 @@ <% } %>
-
-
+
+
<%--area dx: update + scelta dim pagina--%>

@@ -40,30 +40,46 @@
-
- - +
+
+
+ + +
+
+
+
+ + +
+
-
- - -
-
- - -
-
- - - - - -
-
- - - +
+
+
+
+ + +
+
+
+ + + + + +
+
+
+
+ + +
+
+ + +
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_filtroRicerca.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_filtroRicerca.ascx.cs index e5ea814..797b24e 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_filtroRicerca.ascx.cs +++ b/ETS-WS/ETS-WS/WebUserControls/mod_filtroRicerca.ascx.cs @@ -176,12 +176,12 @@ namespace ETS_DIP.WebUserControls if (chkCommessa.Checked) { tacCommesse.contextKey = string.Format("{0}#{1}", utils.obj.StringSessionObj("_inizio"), utils.obj.StringSessionObj("_fine")); - chkCommessa.Text = "Elim. Comm."; + chkCommessa.Text = "C"; tacCommesse.setFocus(); } else { - chkCommessa.Text = "Filtra Commessa"; + chkCommessa.Text = "Filtra Commessa"; } tacCommesse.Visible = chkCommessa.Checked; updateVisual(); @@ -196,12 +196,12 @@ namespace ETS_DIP.WebUserControls if (chkFase.Checked) { tacFasi.contextKey = string.Format("{0}#{1}", utils.obj.StringSessionObj("_inizio"), utils.obj.StringSessionObj("_fine")); - chkFase.Text = "Elim. Fase"; + chkFase.Text = "A"; tacFasi.setFocus(); } else { - chkFase.Text = "Filtra Fase"; + chkFase.Text = "Filtra Fase"; } tacFasi.Visible = chkFase.Checked; updateVisual(); @@ -216,12 +216,12 @@ namespace ETS_DIP.WebUserControls if (chkFonte.Checked) { tacFonti.contextKey = string.Format("{0}#{1}", utils.obj.StringSessionObj("_inizio"), utils.obj.StringSessionObj("_fine")); - chkFonte.Text = "Elim. Da/A"; + chkFonte.Text = "T"; tacFonti.setFocus(); } else { - chkFonte.Text = "Filtra Da/A"; + chkFonte.Text = "Filtra Da/A"; } tacFonti.Visible = chkFonte.Checked; updateVisual(); @@ -235,11 +235,11 @@ namespace ETS_DIP.WebUserControls { if (chkInOut.Checked) { - chkInOut.Text = "Elim. In/Out"; + chkInOut.Text = "I"; } else { - chkInOut.Text = "Filtra In/Out"; + chkInOut.Text = "Filtra In/Out"; } rblInOut.Visible = chkInOut.Checked; updateVisual(); @@ -254,12 +254,12 @@ namespace ETS_DIP.WebUserControls if (chkRedattore.Checked) { tacRedattore.contextKey = string.Format("{0}#{1}", utils.obj.StringSessionObj("_inizio"), utils.obj.StringSessionObj("_fine")); - chkRedattore.Text = "Elim. Redattore"; + chkRedattore.Text = "Redattore"; tacRedattore.setFocus(); } else { - chkRedattore.Text = "Filtra Redattore"; + chkRedattore.Text = "Filtra Redattore"; } tacRedattore.Visible = chkRedattore.Checked; updateVisual(); diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs index d86bfc8..40f785d 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs +++ b/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs @@ -190,10 +190,10 @@ namespace ETS_DIP.WebUserControls answ.reqProto = false; } answ.InOut = rblInOut.SelectedValue; - answ.commessa = utils.cleanPathName(tacCommesse.valore); - answ.fase = utils.cleanPathName(tacFasi.label); - answ.fonte = utils.cleanPathName(tacFonti.label); - answ.oggetto = utils.cleanPathName(txtOggetto.Text); + answ.commessa = utils.cleanPathName(tacCommesse.valore, true); + answ.fase = utils.cleanPathName(tacFasi.label, true); + answ.fonte = utils.cleanPathName(tacFonti.label, true); + answ.oggetto = utils.cleanPathName(txtOggetto.Text, true); try { answ.dataDoc = Convert.ToDateTime(txtDataDoc.Text); diff --git a/ETS-WS/ETS-WS/bin/ETS-DIP.dll b/ETS-WS/ETS-WS/bin/ETS-DIP.dll index 05bd6eb..191e69b 100644 Binary files a/ETS-WS/ETS-WS/bin/ETS-DIP.dll and b/ETS-WS/ETS-WS/bin/ETS-DIP.dll differ diff --git a/ETS-WS/ETS-WS/bin/ETS_Data.dll b/ETS-WS/ETS-WS/bin/ETS_Data.dll index 8bbc2d3..a9d4a5b 100644 Binary files a/ETS-WS/ETS-WS/bin/ETS_Data.dll and b/ETS-WS/ETS-WS/bin/ETS_Data.dll differ diff --git a/ETS-WS/ETS-WS/bin/css/BuildBlocks.css b/ETS-WS/ETS-WS/bin/css/BuildBlocks.css index c58c335..863aef5 100644 --- a/ETS-WS/ETS-WS/bin/css/BuildBlocks.css +++ b/ETS-WS/ETS-WS/bin/css/BuildBlocks.css @@ -277,6 +277,11 @@ font-size: 9pt; color: #555; } +.labelInputChiaro +{ + font-size: 9pt; + color: #cdcdcd; +} /* @end */ @@ -289,35 +294,33 @@ } .autocomplete { - width: 400px; + width: 100%; color: Gray; background-color: White; - font-size: 8pt; - padding: 4px 1px 4px 1px; + padding: 4px 0px; border-bottom: 1px solid #888; } .autocompleteHiglight { - width: 400px; + width: 100%; color: Black; - background-color: Yellow; - font-size: 8pt; - padding: 4px 1px 4px 1px; + background-color: #d3dff4; + padding: 4px 0px; border-bottom: 1px solid #888; } .autocompleteElemID { - width: 400px; + width: 100%; background-color: Red; font-weight: bold; } .autocompleteListCssClass { - width: 400px; - font-size: 8pt; + width: 100%; + font-size: 7pt; background-color: White; - padding: 2px 2px 2px 2px; - border: 1px solid #333; + padding: 2px; + border: 2px solid #3260bc; /* z-index: 1; overflow: Auto; diff --git a/ETS-WS/ETS-WS/css/BuildBlocks.css b/ETS-WS/ETS-WS/css/BuildBlocks.css index 032387f..863aef5 100644 --- a/ETS-WS/ETS-WS/css/BuildBlocks.css +++ b/ETS-WS/ETS-WS/css/BuildBlocks.css @@ -277,6 +277,11 @@ font-size: 9pt; color: #555; } +.labelInputChiaro +{ + font-size: 9pt; + color: #cdcdcd; +} /* @end */ diff --git a/ETS-WS/ReleaseClienti/ETS-WS.zip b/ETS-WS/ReleaseClienti/ETS-WS.zip index 363e569..752c7c1 100644 Binary files a/ETS-WS/ReleaseClienti/ETS-WS.zip and b/ETS-WS/ReleaseClienti/ETS-WS.zip differ diff --git a/ETS_Data/ETS_Data.csproj b/ETS_Data/ETS_Data.csproj index 015c89e..b48b929 100644 --- a/ETS_Data/ETS_Data.csproj +++ b/ETS_Data/ETS_Data.csproj @@ -151,6 +151,7 @@ + diff --git a/ETS_Data/SQL/ETS-DIP/ETS_WS_00137.sql b/ETS_Data/SQL/ETS-DIP/ETS_WS_00137.sql new file mode 100644 index 0000000..0f7f831 --- /dev/null +++ b/ETS_Data/SQL/ETS-DIP/ETS_WS_00137.sql @@ -0,0 +1,464 @@ + +/****** Object: View [dbo].[v_selCommesse_old] Script Date: 29/08/2013 15.59.37 ******/ +SET ANSI_NULLS ON +GO + +SET QUOTED_IDENTIFIER ON +GO + +CREATE VIEW [dbo].[v_selCommesse_old] +AS +SELECT dbo.f_padLeft(NrComme, 4, '0') + '-' + Anno COLLATE SQL_Latin1_General_CP1_CI_AS AS value, '(' + dbo.f_padLeft(NrComme, 4, '0') + + '-' + Anno + ') ' + Commitente + ' | ' + Descrizione + ' [' + dbo.f_shortFormComm(NrComme, Anno) + ']' COLLATE SQL_Latin1_General_CP1_CI_AS AS label +FROM XPANDING.SciP.dbo.Commesse + +UNION + +SELECT DISTINCT ('0000-' + Anno) COLLATE SQL_Latin1_General_CP1_CI_AS AS value, + '0000-' + CAST(Anno AS NVARCHAR(4)) + ' - senza commessa' + ' [' + dbo.f_shortFormComm(0, Anno) + ']' COLLATE SQL_Latin1_General_CP1_CI_AS AS label +FROM XPANDING.SciP.dbo.Commesse + +UNION + +SELECT '0000-' + CAST(YEAR(GETDATE()) AS NVARCHAR(4)) COLLATE SQL_Latin1_General_CP1_CI_AS AS value, + '0000-' + CAST(YEAR(GETDATE()) AS NVARCHAR(4)) + ' - senza commessa anno corrente' + ' [' + dbo.f_shortFormComm(0, YEAR(GETDATE())) + ']' COLLATE SQL_Latin1_General_CP1_CI_AS AS label + + + + +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00] +Begin DesignProperties = + Begin PaneConfigurations = + Begin PaneConfiguration = 0 + NumPanes = 4 + Configuration = "(H (1[41] 4[20] 2[14] 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 = "Commesse_1" + Begin Extent = + Top = 6 + Left = 38 + Bottom = 114 + Right = 213 + End + DisplayFlags = 280 + TopColumn = 0 + End + End + End + Begin SQLPane = + End + Begin DataPane = + Begin ParameterDefaults = "" + End + Begin ColumnWidths = 35 + Width = 284 + Width = 1500 + Width = 9480 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 3750 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 8565 + 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 +' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_selCommesse_old' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_selCommesse_old' +GO + + +set xact_abort on; +go + +begin transaction; +go + +set ANSI_NULLS on; +go + +alter VIEW v_selCommesse +AS +SELECT * +FROM ETS_PROJ.dbo.v_selCommRicerca + +UNION + +SELECT * +FROM ETS_PROJ.dbo.v_selCommZeroMancanti +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 = + End + End + Begin SQLPane = + End + Begin DataPane = + Begin ParameterDefaults = "" + End + Begin ColumnWidths = 35 + Width = 284 + Width = 1500 + Width = 9480 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 3750 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 8565 + 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_selCommesse'; +go + +commit; +go + + +set xact_abort on; +go + +begin transaction; +go + +set ANSI_NULLS on; +go + +/************************************* +* STORED PROCEDURE stp_tbDocs_searchByNrProto +* +* cerca documenti con condizione like su numero protocollo xxxx-aaaa +* +* mod : 2013.07.15 +* aut : S.E. Locatelli +**************************************/ +create PROCEDURE stp_tbDocs_searchByNrProto +( + @search NVARCHAR(20) +) + +AS + +-- se contiene '-' significa ricerca numero + anno separata +DECLARE @chIdx INT = 0 +SET @chIdx = CHARINDEX('-',@search) +IF(@chIdx > 0) + BEGIN + + --SELECT SUBSTRING(@search,1,@chIdx-1) as ex1, SUBSTRING(@search,@chIdx+1,4) as ex2 + + SELECT * + FROM tbDocumenti + WHERE Numero = SUBSTRING(@search,1,@chIdx-1)-- LIKE '%'+SUBSTRING(@search,1,@chIdx-1)+'%' -- se volessi fare search like... + AND Anno LIKE '%'+SUBSTRING(@search,@chIdx+1,4)+'%' + ORDER BY Anno DESC, Numero DESC + END +ELSE + BEGIN + -- altrimenti ricerco o numero o anno... + SELECT * + FROM tbDocumenti + WHERE Numero LIKE '%'+@search+'%' + OR Anno LIKE '%'+@search+'%' + ORDER BY Anno DESC, Numero DESC + END + +RETURN +go + +/************************************* +* STORED PROCEDURE stp_selDocs_searchByNrProto +* +* cerca documenti con condizione like su numero protocollo xxxx-aaaa --> restituisce vista v_selDovs +* +* mod : 2013.07.15 +* aut : S.E. Locatelli +**************************************/ +create PROCEDURE stp_VSD_searchByNrProto +( + @search NVARCHAR(20) +) + +AS + +-- se contiene '-' significa ricerca numero + anno separata +DECLARE @chIdx INT = 0 +SET @chIdx = CHARINDEX('-',@search) +IF(@chIdx > 0) + BEGIN + + --SELECT SUBSTRING(@search,1,@chIdx-1) as ex1, SUBSTRING(@search,@chIdx+1,4) as ex2 + + SELECT CAST(Numero AS NVARCHAR(50)) + '-' + CAST(Anno AS NVARCHAR(50)) as value, CAST(Numero AS NVARCHAR(50)) + '-' + CAST(Anno AS NVARCHAR(50)) + ' | ' + Fonte + ' - ' + Oggetto as label + FROM tbDocumenti + WHERE Numero = SUBSTRING(@search,1,@chIdx-1)-- LIKE '%'+SUBSTRING(@search,1,@chIdx-1)+'%' -- se volessi fare search like... + AND Anno LIKE '%'+SUBSTRING(@search,@chIdx+1,4)+'%' + ORDER BY Anno DESC, Numero DESC + END +ELSE + BEGIN + -- altrimenti ricerco o numero o anno... + SELECT CAST(Numero AS NVARCHAR(50)) + '-' + CAST(Anno AS NVARCHAR(50)) as value, CAST(Numero AS NVARCHAR(50)) + '-' + CAST(Anno AS NVARCHAR(50)) + ' | ' + Fonte + ' - ' + Oggetto as label + FROM tbDocumenti + WHERE Numero LIKE '%'+@search+'%' + OR Anno LIKE '%'+@search+'%' + ORDER BY Anno DESC, Numero DESC + END + +RETURN +go + +commit; +go + +-- ora aggiorno dati inseriti x fase, fonte, oggetto.... + +UPDATE tbDocumenti +SET Fase = REPLACE(Fase, '_',' ') +WHERE Fase like '%[_]%' +GO + +UPDATE tbDocumenti +SET Fonte = REPLACE(Fonte, '_',' ') +WHERE Fonte like '%[_]%' +GO + +UPDATE tbDocumenti +SET Oggetto = REPLACE(Oggetto, '_',' ') +WHERE Oggetto like '%[_]%' +GO + + + + + +-- registro versione... +INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(137, GETDATE()) +GO +SELECT TOP 10 * FROM LogUpdateDb ORDER BY Versione DESC +GO diff --git a/ETS_Data/bin/Release/ETS_Data.dll b/ETS_Data/bin/Release/ETS_Data.dll index 2dc262c..a9d4a5b 100644 Binary files a/ETS_Data/bin/Release/ETS_Data.dll and b/ETS_Data/bin/Release/ETS_Data.dll differ diff --git a/ETS_Data/utils.cs b/ETS_Data/utils.cs index b8f66b3..5543812 100644 --- a/ETS_Data/utils.cs +++ b/ETS_Data/utils.cs @@ -396,12 +396,30 @@ namespace ETS_Data /// /// ripulisce la stringa da eventuali caratteri non ammessi quali /// [ .,;\/] + /// e OPZIONALMENTE toglie " " (spazi) sostituendoli con "_" (underscore) /// - /// + /// stringa originale + /// definisce se mantenere (true) o togliere (false) gli spazi (eventualmente sostituendo con underscore "_") + /// + public static string cleanPathName(string originalName, bool keepSpaces) + { + string answ = originalName.Trim().Replace("&", "e").Replace(".", "").Replace(",", "").Replace(";", "").Replace(":", "").Replace("/", "-").Replace(@"\", "-").Replace(@"'", "_").Replace("\"", "_").Replace("#", "_").Replace("?", "_").Replace("*", "_").Replace(" ", "_").Replace("__", "_").Replace("__", "_").Replace("__", "_").Replace("__", "_"); ; + if (keepSpaces) + { + answ = originalName.Trim().Replace("&", "e").Replace(".", "").Replace(",", "").Replace(";", "").Replace(":", "").Replace("/", "-").Replace(@"\", "-").Replace(@"'", "_").Replace("\"", "_").Replace("#", "_").Replace("?", "_").Replace("*", "_").Replace(" ", " ").Replace(" ", " ").Replace(" ", " ").Replace(" ", " ").Replace("__", "_").Replace("__", "_").Replace("__", "_").Replace("__", "_"); + } + return answ; + } + /// + /// ripulisce la stringa da eventuali caratteri non ammessi quali + /// [ .,;\/] + /// e toglie " " (spazi) sostituendoli con "_" (underscore) + /// + /// stringa originale /// public static string cleanPathName(string originalName) { - return originalName.Trim().Replace("&", "e").Replace(".", "").Replace(",", "").Replace(";", "").Replace(":", "").Replace("/", "-").Replace(@"\", "-").Replace(@"'", "_").Replace("\"", "_").Replace("#", "_").Replace("?", "_").Replace("*", "_").Replace(" ", "_").Replace("__", "_").Replace("__", "_"); + return cleanPathName(originalName, false); } /// /// restituisce, in caso di null o stringa vuota, il carattere "*"