diff --git a/ETS-WS/ETS-WS/DocTemplates/NotFound.txt b/ETS-WS/ETS-WS/DocTemplates/NotFound.txt new file mode 100644 index 0000000..f924019 --- /dev/null +++ b/ETS-WS/ETS-WS/DocTemplates/NotFound.txt @@ -0,0 +1 @@ +Errore! il protocollo richiesto non è stato trovato. \ No newline at end of file diff --git a/ETS-WS/ETS-WS/ETS-WS.csproj b/ETS-WS/ETS-WS/ETS-WS.csproj index 89852ca..e542616 100644 --- a/ETS-WS/ETS-WS/ETS-WS.csproj +++ b/ETS-WS/ETS-WS/ETS-WS.csproj @@ -20,6 +20,10 @@ 4.0 + + + + true @@ -212,6 +216,8 @@ + + @@ -485,6 +491,13 @@ demoUpload.aspx + + getDocByProto.aspx + ASPXCodeBehind + + + getDocByProto.aspx + GestioneDocumenti.aspx @@ -707,6 +720,9 @@ Designer + + + diff --git a/ETS-WS/ETS-WS/ETS-WS.csproj.user b/ETS-WS/ETS-WS/ETS-WS.csproj.user index c8e87b9..bb7caba 100644 --- a/ETS-WS/ETS-WS/ETS-WS.csproj.user +++ b/ETS-WS/ETS-WS/ETS-WS.csproj.user @@ -2,6 +2,7 @@ ProjectFiles + ETS diff --git a/ETS-WS/ETS-WS/Properties/PublishProfiles/218.pubxml b/ETS-WS/ETS-WS/Properties/PublishProfiles/218.pubxml new file mode 100644 index 0000000..fa47720 --- /dev/null +++ b/ETS-WS/ETS-WS/Properties/PublishProfiles/218.pubxml @@ -0,0 +1,54 @@ + + + + + MSDeploy + Release + Any CPU + + True + True + False + DonotMerge + False + https://10.74.82.218:8172/MsDeploy.axd + Default Web Site/DIP + + True + WMSVC + True + administrator + <_SavePWD>True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ETS-WS/ETS-WS/Properties/PublishProfiles/218.pubxml.user b/ETS-WS/ETS-WS/Properties/PublishProfiles/218.pubxml.user new file mode 100644 index 0000000..1f1a884 --- /dev/null +++ b/ETS-WS/ETS-WS/Properties/PublishProfiles/218.pubxml.user @@ -0,0 +1,11 @@ + + + + + + AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAABv9uHbu3F0CBNoJDBeyEhgAAAAACAAAAAAADZgAAwAAAABAAAAApZmXV6TuYnHzV5yrAU9KRAAAAAASAAACgAAAAEAAAACGSaL/UXkBAkyn5H4OBcD8QAAAAs4ys96JiEzaO/c3jVqpPFxQAAADkUvxIxDl+kCj+Q8y3XLPuHqeETQ== + + \ No newline at end of file diff --git a/ETS-WS/ETS-WS/Properties/PublishProfiles/ETS.pubxml b/ETS-WS/ETS-WS/Properties/PublishProfiles/ETS.pubxml new file mode 100644 index 0000000..eaf79f0 --- /dev/null +++ b/ETS-WS/ETS-WS/Properties/PublishProfiles/ETS.pubxml @@ -0,0 +1,49 @@ + + + + + Package + Release + Any CPU + + True + True + False + DonotMerge + True + C:\Users\samuele.STEAMWAREWIN\Documents\Visual Studio 2010\Projects\ETS\ETS-WS\ReleaseClienti\ETS-WS.zip + true + Default Web Site/DIP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ETS-WS/ETS-WS/Properties/PublishProfiles/ETS.pubxml.user b/ETS-WS/ETS-WS/Properties/PublishProfiles/ETS.pubxml.user new file mode 100644 index 0000000..7fd3b7a --- /dev/null +++ b/ETS-WS/ETS-WS/Properties/PublishProfiles/ETS.pubxml.user @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/ETS-WS/ETS-WS/Properties/PublishProfiles/WinLab.pubxml b/ETS-WS/ETS-WS/Properties/PublishProfiles/WinLab.pubxml new file mode 100644 index 0000000..c3a76a0 --- /dev/null +++ b/ETS-WS/ETS-WS/Properties/PublishProfiles/WinLab.pubxml @@ -0,0 +1,22 @@ + + + + + MSDeploy + Release + Any CPU + + False + https://winlab.steamware.net:8172/MsDeploy.axd + Default Web Site/ETS-WS + + True + WMSVC + True + Administrator + <_SavePWD>True + + \ No newline at end of file diff --git a/ETS-WS/ETS-WS/Properties/PublishProfiles/WinLab.pubxml.user b/ETS-WS/ETS-WS/Properties/PublishProfiles/WinLab.pubxml.user new file mode 100644 index 0000000..6180a50 --- /dev/null +++ b/ETS-WS/ETS-WS/Properties/PublishProfiles/WinLab.pubxml.user @@ -0,0 +1,11 @@ + + + + + 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 6eeff98..f9ac5b4 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 b412bc4..f2ce004 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs +++ b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs @@ -110,7 +110,6 @@ namespace ETS_WS.WebUserControls /// /// Formato della stringa richiesta (formato x string.format) /// valori comma delimited - /// /// public string accoda(object stringFormat, object[] args) { diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_menu.ascx b/ETS-WS/ETS-WS/WebUserControls/mod_menu.ascx index 4da6fc5..d293fbf 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_menu.ascx +++ b/ETS-WS/ETS-WS/WebUserControls/mod_menu.ascx @@ -8,10 +8,13 @@ <% } %>
-
+
-
+
+
Documentazione Informatica e Protocollo
+
+

@@ -39,6 +42,7 @@

-
+
+

diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_testata.ascx b/ETS-WS/ETS-WS/WebUserControls/mod_testata.ascx index 555ed23..e4ecb81 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_testata.ascx +++ b/ETS-WS/ETS-WS/WebUserControls/mod_testata.ascx @@ -23,7 +23,7 @@
- +
diff --git a/ETS-WS/ETS-WS/bin/ETS-WS.dll b/ETS-WS/ETS-WS/bin/ETS-WS.dll index 32354ba..f2ef547 100644 Binary files a/ETS-WS/ETS-WS/bin/ETS-WS.dll and b/ETS-WS/ETS-WS/bin/ETS-WS.dll differ diff --git a/ETS-WS/ETS-WS/bin/ETS_Data.dll b/ETS-WS/ETS-WS/bin/ETS_Data.dll index 5952f73..7e021bb 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/getDocByProto.aspx b/ETS-WS/ETS-WS/getDocByProto.aspx new file mode 100644 index 0000000..3510fad --- /dev/null +++ b/ETS-WS/ETS-WS/getDocByProto.aspx @@ -0,0 +1,13 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/AjaxSimpleFull.Master" AutoEventWireup="true" CodeBehind="getDocByProto.aspx.cs" Inherits="ETS_WS.getDocByProto" %> + + +
+
Gestione scarico documenti da DIP
+
Restituisce in download un file dato parametro protocollo in URL, formato
+
http://indirizzo_server/getDocByProto.aspx?nrProto=12345-9999
+
Attenzione al formato OBBLIGATORIO numero-anno!!!
+
e restituisce redirect al documento
+
http://indirizzo_server/ArchivioDocs/path_completo/nomeDocumento.xyz
+ +
+
diff --git a/ETS-WS/ETS-WS/getDocByProto.aspx.cs b/ETS-WS/ETS-WS/getDocByProto.aspx.cs new file mode 100644 index 0000000..a7252bf --- /dev/null +++ b/ETS-WS/ETS-WS/getDocByProto.aspx.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using ETS_Data; + +namespace ETS_WS +{ + public partial class getDocByProto : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + // controllo ci sia richiesta VALIDA, nel formato numero-anno + string nrProto = ""; + try + { + nrProto = Request.QueryString["nrProto"]; + } + catch + { } + if (nrProto != null && nrProto.Length > 0 && nrProto.IndexOf('-') >= 0) + { + // cerco il protocollo + int numero = 0; + int anno = 0; + try + { + numero = Convert.ToInt32(nrProto.Substring(0, nrProto.IndexOf('-'))); + anno = Convert.ToInt32(nrProto.Substring(nrProto.IndexOf('-') + 1, 4)); + } + catch + { + // se non trovo faccio redirect a file errore DocTemplates/NotFound.txt + //Response.Redirect("~/DocTemplates/NotFound.txt"); + lblNumProto.Text = string.Format("Errore! non è stato possibile trovare il doc {0}", nrProto); + } + // cerco il path... + string docPath = DataProxy_ETS_WS.DP.fullPathDoc(numero, anno); + // se lo trovo faccio redirect a doc corretto + if (docPath != "") + { + //lblNumProto.Text = string.Format("Trovato! {0}-{1} --> {2}", numero, anno, docPath); + //Response.Redirect(docPath); + lblNumProto.Text = string.Format("Errore! non è stato possibile trovare il doc {0}", nrProto); + } + else + { + // se non trovo faccio redirect a file errore DocTemplates/NotFound.txt + //Response.Redirect("~/DocTemplates/NotFound.txt"); + lblNumProto.Text = string.Format("Errore! non è stato possibile trovare il doc {0}", nrProto); + } + } + else + { + // se non trovo faccio redirect a file errore DocTemplates/NotFound.txt + Response.Redirect("~/DocTemplates/NotFound.txt"); + } + } + } +} \ No newline at end of file diff --git a/ETS-WS/ETS-WS/getDocByProto.aspx.designer.cs b/ETS-WS/ETS-WS/getDocByProto.aspx.designer.cs new file mode 100644 index 0000000..4b4f3a3 --- /dev/null +++ b/ETS-WS/ETS-WS/getDocByProto.aspx.designer.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ETS_WS { + + + public partial class getDocByProto { + + /// + /// lblNumProto control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblNumProto; + } +} diff --git a/ETS-WS/ReleaseClienti/ETS-WS.SetParameters.xml b/ETS-WS/ReleaseClienti/ETS-WS.SetParameters.xml new file mode 100644 index 0000000..1799952 --- /dev/null +++ b/ETS-WS/ReleaseClienti/ETS-WS.SetParameters.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ETS-WS/ReleaseClienti/ETS-WS.SourceManifest.xml b/ETS-WS/ReleaseClienti/ETS-WS.SourceManifest.xml new file mode 100644 index 0000000..c8e809d --- /dev/null +++ b/ETS-WS/ReleaseClienti/ETS-WS.SourceManifest.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ETS-WS/ReleaseClienti/ETS-WS.deploy-readme.txt b/ETS-WS/ReleaseClienti/ETS-WS.deploy-readme.txt new file mode 100644 index 0000000..5b02f10 --- /dev/null +++ b/ETS-WS/ReleaseClienti/ETS-WS.deploy-readme.txt @@ -0,0 +1,63 @@ + +=========================== +Prerequisites : +-------------------------- +To deploy this Web package, Web Deploy (msdeploy.exe) must be installed on the computer that runs the .cmd file. For information about how to install Web Deploy, see the following URL: +http://go.microsoft.com/?linkid=9278654 +This batch file requires that the package file "ETS-WS.zip" and optionally provided the parameters file "ETS-WS.SetParameters.xml" in the same folder or destination folder by environment variable. + +=========================== +Usage: +-------------------------- +ETS-WS.deploy.cmd [/T|/Y] [/M:ComputerName] [/U:UserName] [/P:Password] [/G:UseTempAgent] [Additional msdeploy.exe flags ...] + + +=========================== +Required Flags: +-------------------------- +/T: + Calls msdeploy.exe with the "-whatif" flag, which simulates deployment. This does not deploy the package. Instead, it creates a report of what will happen when you actually deploy the package. +/Y: + Calls msdeploy.exe without the "-whatif" flag, which deploys the package to the current machine or a destination server. Use /Y after you have verified the output that was generated by using the /T flag. + +Note: Do not use /T and /Y in the same command. + +=========================== +Optional Flags: +-------------------------- + By Default, this script deploy on the current machine where this script is called with current user credential without agent service. Only pass the following value for advance scenario. + +/M: + If this flag is not specified, the package is installed on the computer where the command is run. The Service URL can be in the following format: + https://:8172/MSDeploy.axd + This format requires that IIS 7 be installed on the destination server and that IIS 7 Web Management Service(WMSvc) and Web Deployment Handler be set up. + The service URL can also be in the following format: + http:///MSDeployAgentService + This format requires administrative rights on the destination server, and it requires that Web Deploy Remote Service (MsDepSvc) be installed on the destination server. IIS 7 does not have to be installed on the destination server. + +/U: +/P: +/G: + Specifies that the package is deployed by creating a temporary listener on the destination server. This requires no special installation on the destination server, but it requires you to be an administrator on that server. The default value of this flag is False. + +/A: + Specifies the type of authentication to be used. The possible values are NTLM and Basic. If the wmsvc provider setting is specified, the default authentication type is Basic; otherwise, the default authentication type is NTLM. + +/L + Specifies that the package is deployed to local IISExpress user instance. + +[Additional msdeploy.exe flags] + The msdeploy.exe command supports additional flags. You can include any of these additional flags in the "$(ProjectName).Deploy.cmd" file, and the flags are passed through to msdeploy.exe during execution. + Alternatively, you can specify additional flags by setting the "_MsDeployAdditionalFlags" environment variable. These settings are used by this batch file. + Note: Any flag value that includes an equal sign (=) must be enclosed in double quotation marks, as shown in the following example, which will skip deploying the databases that are included in the package: + "-skip:objectName=dbFullSql" + +=========================== +Environment-Specific Settings: +-------------------------- + + To customize application-specific settings for each deployment environment (for example, the IIS application name, the physical path, and any connection strings), edit the settings in the following file: + "ETS-WS.SetParameters.xml" +=========================== +For more information on this deploy script visit: http://go.microsoft.com/fwlink/?LinkID=183544 + diff --git a/ETS-WS/ReleaseClienti/ETS-WS.deploy.cmd b/ETS-WS/ReleaseClienti/ETS-WS.deploy.cmd new file mode 100644 index 0000000..be7a1db --- /dev/null +++ b/ETS-WS/ReleaseClienti/ETS-WS.deploy.cmd @@ -0,0 +1,311 @@ +@rem --------------------------------------------------------------------------------- +@rem Copyright 2008 Microsoft Corporation. All rights reserved. +@rem This is provided as sample to deploy the package using msdeploy.exe +@rem For information about IIS Web Deploy technology, +@rem please visit http://go.microsoft.com/?linkid=9278654 +@rem Note: This batch file assumes the package and setparametsrs.xml are in the same folder with this file +@rem --------------------------------------------------------------------------------- +@if %_echo%!==! echo off +setlocal +@rem --------------------------------------------------------------------------------- +@rem Please Make sure you have Web Deploy install in your machine. +@rem Alternatively, you can explicit set the MsDeployPath to the location it is on your machine +@rem set MSDeployPath="C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\" +@rem --------------------------------------------------------------------------------- + +@rem --------------------------------------------------------------------------------- +@rem if user does not set MsDeployPath environment variable, we will try to retrieve it from registry. +@rem --------------------------------------------------------------------------------- +if "%MSDeployPath%" == "" ( +for /F "usebackq tokens=1,2,*" %%h in (`reg query "HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy" /s ^| findstr -i "InstallPath"`) do ( +if /I "%%h" == "InstallPath" ( +if /I "%%i" == "REG_SZ" ( +if not "%%j" == "" ( +if "%%~dpj" == "%%j" ( +set MSDeployPath=%%j +)))))) + +@rem ------------------------------------------ + +@rem ------------------------------------------ + + +if not exist "%MSDeployPath%msdeploy.exe" ( +echo. msdeploy.exe is not found on this machine. Please install Web Deploy before execute the script. +echo. Please visit http://go.microsoft.com/?linkid=9278654 +goto :usage +) + +set RootPath=%~dp0 +if /I "%_DeploySetParametersFile%" == "" ( +set _DeploySetParametersFile=%RootPath%ETS-WS.SetParameters.xml +) + +@rem ------------------------------------------ + +@rem ------------------------------------------ + + +set _ArgTestDeploy= +set _ArgDestinationType=auto +set _ArgComputerNameWithQuote="" +set _ArgUserNameWithQuote="" +set _ArgPasswordWithQuote="" +set _ArgEncryptPasswordWithQuote="" +set _ArgIncludeAclsWithQuote="False" +set _ArgAuthTypeWithQuote="" +set _ArgtempAgentWithQuote="" +set _ArgLocalIIS= +set _ArgLocalIISVersion= +set _HaveArgMSDeployAdditonalFlags= + + +@rem --------------------------------------------------------------------------------- +@rem Simple Parse the arguments +@rem --------------------------------------------------------------------------------- +:NextArgument +set _ArgCurrent=%~1 +set _ArgFlagFirst=%_ArgCurrent:~0,1% +set _ArgFlag=%_ArgCurrent:~0,3% +set _ArgValue=%_ArgCurrent:~3% + +if /I "%_ArgFlag%" == "" goto :GetStarted +if /I "%_ArgFlag%" == "~0,3" goto :GetStarted +if /I "%_ArgFlag%" == "/T" set _ArgTestDeploy=true&goto :ArgumentOK +if /I "%_ArgFlag%" == "/Y" set _ArgTestDeploy=false&goto :ArgumentOK +if /I "%_ArgFlag%" == "/L" set _ArgLocalIIS=true&goto :ArgumentOK + +if /I "%_ArgFlag%" == "/M:" set _ArgComputerNameWithQuote="%_ArgValue%"&goto :ArgumentOK +if /I "%_ArgFlag%" == "/U:" set _ArgUserNameWithQuote="%_ArgValue%"&goto :ArgumentOK +if /I "%_ArgFlag%" == "/P:" set _ArgPasswordWithQuote="%_ArgValue%"&goto :ArgumentOK +if /I "%_ArgFlag%" == "/E:" set _ArgEncryptPasswordWithQuote="%_ArgValue%"&goto :ArgumentOK +if /I "%_ArgFlag%" == "/I:" set _ArgIncludeAclsWithQuote="%_ArgValue%"&goto :ArgumentOK +if /I "%_ArgFlag%" == "/A:" set _ArgAuthTypeWithQuote="%_ArgValue%"&goto :ArgumentOK +if /I "%_ArgFlag%" == "/G:" set _ArgtempAgentWithQuote="%_ArgValue%"&goto :ArgumentOK + +@rem Any addition flags, pass through to the msdeploy +if "%_HaveArgMSDeployAdditonalFlags%" == "" ( +goto :Assign_ArgMsDeployAdditionalFlags +) +set _ArgMsDeployAdditionalFlags=%_ArgMsDeployAdditionalFlags:&=^&% %_ArgCurrent:&=^&% +set _HaveArgMSDeployAdditonalFlags=1 +goto :ArgumentOK + + +:Assign_ArgMsDeployAdditionalFlags +set _ArgMsDeployAdditionalFlags=%_ArgCurrent:&=^&% +set _HaveArgMSDeployAdditonalFlags=1 +goto :ArgumentOK + +:ArgumentOK +shift +goto :NextArgument + +:GetStarted +@rem ------------------------------------------ + +@rem ------------------------------------------ +if /I "%_ArgTestDeploy%" == "" goto :usage +if /I "%_ArgDestinationType%" == "" goto :usage + +set _Destination=%_ArgDestinationType% +if not %_ArgComputerNameWithQuote% == "" set _Destination=%_Destination%,computerName=%_ArgComputerNameWithQuote% +if not %_ArgUserNameWithQuote% == "" set _Destination=%_Destination%,userName=%_ArgUserNameWithQuote% +if not %_ArgPasswordWithQuote% == "" set _Destination=%_Destination%,password=%_ArgPasswordWithQuote% +if not %_ArgAuthTypeWithQuote% == "" set _Destination=%_Destination%,authtype=%_ArgAuthTypeWithQuote% +if not %_ArgEncryptPasswordWithQuote% == "" set _Destination=%_Destination%,encryptPassword=%_ArgEncryptPasswordWithQuote% +if not %_ArgIncludeAclsWithQuote% == "" set _Destination=%_Destination%,includeAcls=%_ArgIncludeAclsWithQuote% +if not %_ArgtempAgentWithQuote% == "" set _Destination=%_Destination%,tempAgent=%_ArgtempAgentWithQuote% + +@rem ------------------------------------------ + +@rem ------------------------------------------ + + +@rem --------------------------------------------------------------------------------- +@rem add -whatif when -T is specified +@rem --------------------------------------------------------------------------------- +if /I "%_ArgTestDeploy%" NEQ "false" ( +set _MsDeployAdditionalFlags=-whatif %_MsDeployAdditionalFlags% +) + +@rem ------------------------------------------ + +@rem ------------------------------------------ + +@rem --------------------------------------------------------------------------------- +@rem add flags for IISExpress when -L is specified +@rem --------------------------------------------------------------------------------- + +if /I "%_ArgLocalIIS%" == "true" ( +call :SetIISExpressArguments +) +if /I "%_ArgLocalIIS%" == "true" ( +if not exist "%IISExpressPath%%IISExpressManifest%" ( +echo. IISExpress is not found on this machine. Please install through Web Platform Installer before execute the script. +echo. or remove /L flag +echo. Please visit http://go.microsoft.com/?linkid=9278654 +goto :usage +) +if not exist "%IISExpressUserProfileDirectory%" ( +echo. %IISExpressUserProfileDirectory% is not exists +echo. IISExpress is found on the machine. But the user have run IISExpress at least once. +echo. Please visit http://go.microsoft.com/?linkid=9278654 for detail +goto :usage +) + +set _MsDeployAdditionalFlags=%_MsDeployAdditionalFlags% -appHostConfigDir:%IISExpressUserProfileDirectory% -WebServerDir:"%IISExpressPath%" -webServerManifest:"%IISExpressManifest%" +) + +@rem --------------------------------------------------------------------------------- +@rem check the existence of the package file +@rem --------------------------------------------------------------------------------- +if not exist "%RootPath%ETS-WS.zip" ( +echo "%RootPath%ETS-WS.zip" does not exist. +echo This batch file relies on this deploy source file^(s^) in the same folder. +goto :usage +) + +@rem --------------------------------------------- + +@rem --------------------------------------------- + +@rem --------------------------------------------------------------------------------- +@rem Execute msdeploy.exe command line +@rem --------------------------------------------------------------------------------- +call :CheckParameterFile +echo. Start executing msdeploy.exe +echo ------------------------------------------------------- +if not exist "%_DeploySetParametersFile%" ( +set _MSDeployCommandline="%MSDeployPath%msdeploy.exe" -source:package='%RootPath%ETS-WS.zip' -dest:%_Destination% -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -skip:objectname='dirPath',absolutepath='obj\\Release\\Package\\PackageTmp\\App_Data$' -skip:objectname='dirPath',absolutepath='Default\ Web\ Site/DIP\\App_Data$' +) else ( +set _MSDeployCommandline="%MSDeployPath%msdeploy.exe" -source:package='%RootPath%ETS-WS.zip' -dest:%_Destination% -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -skip:objectname='dirPath',absolutepath='obj\\Release\\Package\\PackageTmp\\App_Data$' -skip:objectname='dirPath',absolutepath='Default\ Web\ Site/DIP\\App_Data$' -setParamFile:"%_DeploySetParametersFile%" +) + +if "%_HaveArgMSDeployAdditonalFlags%" == "" ( +goto :MSDeployWithOutArgMsDeployAdditionalFlag +) +goto :MSDeployWithArgMsDeployAdditionalFlag +goto :eof + +@rem --------------------------------------------------------------------------------- +@rem MSDeployWithArgMsDeployAdditionalFlag +@rem --------------------------------------------------------------------------------- +:MSDeployWithArgMsDeployAdditionalFlag +echo. %_MSDeployCommandline% %_MsDeployAdditionalFlags% %_ArgMsDeployAdditionalFlags:&=^&% +%_MSDeployCommandline% %_MsDeployAdditionalFlags% %_ArgMsDeployAdditionalFlags:&=^&% +goto :eof + +@rem --------------------------------------------------------------------------------- +@rem MSDeployWithOutArgMsDeployAdditionalFlag +@rem --------------------------------------------------------------------------------- +:MSDeployWithOutArgMsDeployAdditionalFlag +echo. %_MSDeployCommandline% %_MsDeployAdditionalFlags% +%_MSDeployCommandline% %_MsDeployAdditionalFlags% +goto :eof + +@rem --------------------------------------------------------------------------------- +@rem Find and set IISExpress argument. +@rem --------------------------------------------------------------------------------- +:SetIISExpressArguments + +if "%IISExpressPath%" == "" ( +for /F "usebackq tokens=1,2,*" %%h in (`reg query "HKLM\SOFTWARE\Microsoft\IISExpress" /s ^| findstr -i "InstallPath"`) do ( +if /I "%%h" == "InstallPath" ( +if /I "%%i" == "REG_SZ" ( +if not "%%j" == "" ( +if "%%~dpj" == "%%j" ( +set IISExpressPath=%%j +)))))) + +if "%IISExpressPath%" == "" ( +for /F "usebackq tokens=1,2,*" %%h in (`reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\IISExpress" /s ^| findstr -i "InstallPath"`) do ( +if /I "%%h" == "InstallPath" ( +if /I "%%i" == "REG_SZ" ( +if not "%%j" == "" ( +if "%%~dpj" == "%%j" ( +set IISExpressPath=%%j +)))))) + +if "%PersonalDocumentFolder%" == "" ( +for /F "usebackq tokens=2*" %%i in (`reg query "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Personal`) do ( +set PersonalDocumentFolder=%%j +)) + +if "%IISExpressManifest%" == "" ( +for /F "usebackq tokens=1,2,*" %%h in (`reg query "HKLM\SOFTWARE\Microsoft\IISExpress" /s ^| findstr -i "Manifest"`) do ( +if /I "%%h" == "Manifest" ( +if /I "%%i" == "REG_SZ" ( +if not "%%j" == "" ( +set IISExpressManifest=%%j +))))) + +if "%IISExpressManifest%" == "" ( +for /F "usebackq tokens=1,2,*" %%h in (`reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\IISExpress" /s ^| findstr -i "Manifest"`) do ( +if /I "%%h" == "Manifest" ( +if /I "%%i" == "REG_SZ" ( +if not "%%j" == "" ( +set IISExpressManifest=%%j +))))) + +set IISExpressUserProfileDirectory="%PersonalDocumentFolder%\IISExpress\config" + +@rem --------------------------------------------- + +@rem --------------------------------------------- + +goto :eof + +@rem --------------------------------------------------------------------------------- +@rem CheckParameterFile -- check if the package's setparamters.xml exists or not +@rem --------------------------------------------------------------------------------- +:CheckParameterFile +if exist "%_DeploySetParametersFile%" ( +echo SetParameters from: +echo "%_DeploySetParametersFile%" +echo You can change IIS Application Name, Physical path, connectionString +echo or other deploy parameters in the above file. +) else ( +echo SetParamterFiles does not exist in package location. +echo Use package embedded defaultValue to deploy. +) +echo ------------------------------------------------------- +goto :eof + +@rem --------------------------------------------------------------------------------- +@rem Usage +@rem --------------------------------------------------------------------------------- +:usage +echo ========================================================= +if not exist "%RootPath%ETS-WS.deploy-readme.txt" ( +echo Usage:%~nx0 [/T^|/Y] [/M:ComputerName] [/U:userName] [/P:password] [/G:tempAgent] [additional msdeploy flags ...] +echo Required flags: +echo /T Calls msdeploy.exe with the "-whatif" flag, which simulates deployment. +echo /Y Calls msdeploy.exe without the "-whatif" flag, which deploys the package to the current machine or destination server +echo Optional flags: +echo. By Default, this script deploy to the current machine where this script is invoked which will use current user credential without tempAgent. +echo. Only pass these arguments when in advance scenario. +echo /M: Msdeploy destination name of remote computer or proxy-URL. Default is local. +echo /U: Msdeploy destination user name. +echo /P: Msdeploy destination password. +echo /G: Msdeploy destination tempAgent. True or False. Default is false. +echo /A: specifies the type of authentication to be used. The possible values are NTLM and Basic. If the wmsvc provider setting is specified, the default authentication type is Basic +otherwise, the default authentication type is NTLM. +echo /L: Deploy to Local IISExpress User Instance. + +echo.[additional msdeploy flags]: note: " is required for passing = through command line. +echo "-skip:objectName=setAcl" "-skip:objectName=dbFullSql" +echo.Alternative environment variable _MsDeployAdditionalFlags is also honored. +echo. +echo. Please make sure MSDeploy is installed in the box http://go.microsoft.com/?linkid=9278654 +echo. +echo In addition, you can change IIS Application Name, Physical path, +echo connectionString and other deploy parameters in the following file: +echo "%_DeploySetParametersFile%" +echo. +echo For more information about this batch file, visit http://go.microsoft.com/fwlink/?LinkID=183544 +) else ( +start notepad "%RootPath%ETS-WS.deploy-readme.txt" +) +echo ========================================================= +goto :eof diff --git a/ETS-WS/ReleaseClienti/ETS-WS.zip b/ETS-WS/ReleaseClienti/ETS-WS.zip new file mode 100644 index 0000000..363e569 Binary files /dev/null and b/ETS-WS/ReleaseClienti/ETS-WS.zip differ diff --git a/ETS_Data/DS_WebScip.Designer.cs b/ETS_Data/DS_WebScip.Designer.cs index 80824e5..d7c718d 100644 --- a/ETS_Data/DS_WebScip.Designer.cs +++ b/ETS_Data/DS_WebScip.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18033 +// Runtime Version:4.0.30319.18051 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -6228,7 +6228,7 @@ SELECT idxFile, Nome, fullPath, userId, NrProtocollo, Numero, Anno, DataRic, Dat [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[9]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[10]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = @"SELECT idxFile, NomeFile, Nome, fullPath, userId, isRed, NrProtocollo, Numero, Anno, DataRic, DataDoc, Commessa, NumeroCommessa, AnnoCommessa, Fase, @@ -6243,37 +6243,27 @@ FROM tbDocumenti"; this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxFile", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; - this._commandCollection[2].CommandText = "dbo.stp_tbDocs_getBySearch"; + this._commandCollection[2].CommandText = "dbo.stp_tbDocs_getByNrProto"; this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Commessa", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fase", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fonte", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@InOut", global::System.Data.SqlDbType.NVarChar, 3, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@searchAll", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isRed", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Numero", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Anno", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "dbo.stp_tbDocs_getBySearch_Count"; + this._commandCollection[3].CommandText = "dbo.stp_tbDocs_getBySearch"; this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showRed", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Commessa", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fase", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fase", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fonte", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@InOut", global::System.Data.SqlDbType.NVarChar, 3, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Redattore", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@searchAll", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@startRowIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maximumRows", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SortExpression", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isRed", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; - this._commandCollection[4].CommandText = "dbo.stp_tbDocs_getBySearch_Count_only"; + this._commandCollection[4].CommandText = "dbo.stp_tbDocs_getBySearch_Count"; this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -6285,9 +6275,12 @@ FROM tbDocumenti"; this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@InOut", global::System.Data.SqlDbType.NVarChar, 3, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Redattore", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@searchAll", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@startRowIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maximumRows", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SortExpression", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[5].Connection = this.Connection; - this._commandCollection[5].CommandText = "dbo.stp_tbDocs_getBySearch_paged"; + this._commandCollection[5].CommandText = "dbo.stp_tbDocs_getBySearch_Count_only"; this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -6299,55 +6292,69 @@ FROM tbDocumenti"; this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@InOut", global::System.Data.SqlDbType.NVarChar, 3, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Redattore", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@searchAll", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@startRowIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maximumRows", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SortExpression", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[6].Connection = this.Connection; - this._commandCollection[6].CommandText = "dbo.stp_tbDocs_insert"; + this._commandCollection[6].CommandText = "dbo.stp_tbDocs_getBySearch_paged"; this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nome", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fullPath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@userId", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isProtocollo", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataRic", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataDoc", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumeroCommessa", global::System.Data.SqlDbType.NVarChar, 4, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AnnoCommessa", global::System.Data.SqlDbType.NVarChar, 4, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showRed", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Commessa", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fase", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fonte", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Oggetto", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@InOut", global::System.Data.SqlDbType.NVarChar, 3, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Autore", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Redattore", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isRed", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@newIdxFile", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.InputOutput, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@searchAll", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@startRowIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maximumRows", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SortExpression", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[7].Connection = this.Connection; - this._commandCollection[7].CommandText = "dbo.stp_tbDocs_updateFile"; + this._commandCollection[7].CommandText = "dbo.stp_tbDocs_insert"; this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxFile", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@userId", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nome", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fullPath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@userId", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isProtocollo", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataRic", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataDoc", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumeroCommessa", global::System.Data.SqlDbType.NVarChar, 4, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AnnoCommessa", global::System.Data.SqlDbType.NVarChar, 4, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fase", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fonte", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Oggetto", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@InOut", global::System.Data.SqlDbType.NVarChar, 3, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Autore", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Redattore", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isRed", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@newIdxFile", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.InputOutput, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[8] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[8].Connection = this.Connection; - this._commandCollection[8].CommandText = "dbo.stp_tbDocs_update"; + this._commandCollection[8].CommandText = "dbo.stp_tbDocs_updateFile"; this._commandCollection[8].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxFile", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@userId", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataRic", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataDoc", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumeroCommessa", global::System.Data.SqlDbType.NVarChar, 4, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AnnoCommessa", global::System.Data.SqlDbType.NVarChar, 4, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fase", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fonte", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Oggetto", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@InOut", global::System.Data.SqlDbType.NVarChar, 3, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isRed", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nome", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fullPath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[9].Connection = this.Connection; + this._commandCollection[9].CommandText = "dbo.stp_tbDocs_update"; + this._commandCollection[9].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxFile", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@userId", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataRic", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataDoc", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumeroCommessa", global::System.Data.SqlDbType.NVarChar, 4, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AnnoCommessa", global::System.Data.SqlDbType.NVarChar, 4, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fase", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fonte", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Oggetto", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@InOut", global::System.Data.SqlDbType.NVarChar, 3, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isRed", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -6395,8 +6402,31 @@ FROM tbDocumenti"; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_WebScip.tbDocumentiDataTable getBySearch(global::System.Nullable inizio, global::System.Nullable fine, string Commessa, string Fase, string Fonte, string InOut, string searchAll, global::System.Nullable isRed) { + public virtual DS_WebScip.tbDocumentiDataTable getByNrProto(global::System.Nullable Numero, global::System.Nullable Anno) { this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((Numero.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(Numero.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((Anno.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((int)(Anno.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + DS_WebScip.tbDocumentiDataTable dataTable = new DS_WebScip.tbDocumentiDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_WebScip.tbDocumentiDataTable getBySearch(global::System.Nullable inizio, global::System.Nullable fine, string Commessa, string Fase, string Fonte, string InOut, string searchAll, global::System.Nullable isRed) { + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((inizio.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((System.DateTime)(inizio.Value)); } @@ -6455,7 +6485,7 @@ FROM tbDocumenti"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_WebScip.tbDocumentiDataTable getBySearch_paged(global::System.Nullable inizio, global::System.Nullable fine, global::System.Nullable showRed, string Commessa, string Fase, string Fonte, string InOut, string Redattore, string searchAll, global::System.Nullable startRowIndex, global::System.Nullable maximumRows, string SortExpression) { - this.Adapter.SelectCommand = this.CommandCollection[5]; + this.Adapter.SelectCommand = this.CommandCollection[6]; if ((inizio.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((System.DateTime)(inizio.Value)); } @@ -7543,7 +7573,7 @@ FROM tbDocumenti"; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual object getBySearch_Count(global::System.Nullable inizio, global::System.Nullable fine, global::System.Nullable showRed, string Commessa, string Fase, string Fonte, string InOut, string Redattore, string searchAll, global::System.Nullable startRowIndex, global::System.Nullable maximumRows, string SortExpression) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; if ((inizio.HasValue == true)) { command.Parameters[1].Value = ((System.DateTime)(inizio.Value)); } @@ -7643,7 +7673,7 @@ FROM tbDocumenti"; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual object getBySearch_Count_only(global::System.Nullable inizio, global::System.Nullable fine, global::System.Nullable showRed, string Commessa, string Fase, string Fonte, string InOut, string Redattore, string searchAll) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; if ((inizio.HasValue == true)) { command.Parameters[1].Value = ((System.DateTime)(inizio.Value)); } @@ -7741,7 +7771,7 @@ FROM tbDocumenti"; string Redattore, global::System.Nullable isRed, ref global::System.Nullable newIdxFile) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7]; if ((nome == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -7866,7 +7896,7 @@ FROM tbDocumenti"; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateFile(global::System.Nullable Original_idxFile, string userId, string nome, string fullPath) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[8]; if ((Original_idxFile.HasValue == true)) { command.Parameters[1].Value = ((int)(Original_idxFile.Value)); } @@ -7912,7 +7942,7 @@ FROM tbDocumenti"; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateQuery(global::System.Nullable Original_idxFile, string userId, global::System.Nullable DataRic, global::System.Nullable DataDoc, string NumeroCommessa, string AnnoCommessa, string Fase, string Fonte, string Oggetto, string InOut, global::System.Nullable isRed) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[8]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[9]; if ((Original_idxFile.HasValue == true)) { command.Parameters[1].Value = ((int)(Original_idxFile.Value)); } @@ -10493,21 +10523,12 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, allChangedRows.AddRange(updatedRows); } } - if ((this._tbMetaDataSetTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.tbMetaDataSet.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + if ((this._tmpFileUtTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.tmpFileUt.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { - result = (result + this._tbMetaDataSetTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } - if ((this._tags2DocTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.Tags2Doc.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._tags2DocTableAdapter.Update(updatedRows)); + result = (result + this._tmpFileUtTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } @@ -10520,12 +10541,21 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, allChangedRows.AddRange(updatedRows); } } - if ((this._tmpFileUtTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.tmpFileUt.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + if ((this._tags2DocTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Tags2Doc.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { - result = (result + this._tmpFileUtTableAdapter.Update(updatedRows)); + result = (result + this._tags2DocTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._tbMetaDataSetTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.tbMetaDataSet.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._tbMetaDataSetTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } @@ -10555,19 +10585,11 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, allAddedRows.AddRange(addedRows); } } - if ((this._tbMetaDataSetTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.tbMetaDataSet.Select(null, null, global::System.Data.DataViewRowState.Added); + if ((this._tmpFileUtTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.tmpFileUt.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { - result = (result + this._tbMetaDataSetTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } - if ((this._tags2DocTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.Tags2Doc.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._tags2DocTableAdapter.Update(addedRows)); + result = (result + this._tmpFileUtTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } @@ -10579,11 +10601,19 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, allAddedRows.AddRange(addedRows); } } - if ((this._tmpFileUtTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.tmpFileUt.Select(null, null, global::System.Data.DataViewRowState.Added); + if ((this._tags2DocTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Tags2Doc.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { - result = (result + this._tmpFileUtTableAdapter.Update(addedRows)); + result = (result + this._tags2DocTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._tbMetaDataSetTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.tbMetaDataSet.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._tbMetaDataSetTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } @@ -10597,19 +10627,11 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private int UpdateDeletedRows(DS_WebScip dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; - if ((this._tmpFileUtTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.tmpFileUt.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if ((this._tbMetaDataSetTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.tbMetaDataSet.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { - result = (result + this._tmpFileUtTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } - if ((this._anagFasiTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.AnagFasi.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._anagFasiTableAdapter.Update(deletedRows)); + result = (result + this._tbMetaDataSetTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } @@ -10621,11 +10643,19 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, allChangedRows.AddRange(deletedRows); } } - if ((this._tbMetaDataSetTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.tbMetaDataSet.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if ((this._anagFasiTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.AnagFasi.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { - result = (result + this._tbMetaDataSetTableAdapter.Update(deletedRows)); + result = (result + this._anagFasiTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._tmpFileUtTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.tmpFileUt.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._tmpFileUtTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } diff --git a/ETS_Data/DS_WebScip.xsd b/ETS_Data/DS_WebScip.xsd index 104406b..a7c6968 100644 --- a/ETS_Data/DS_WebScip.xsd +++ b/ETS_Data/DS_WebScip.xsd @@ -359,6 +359,18 @@ SELECT idxFile, NomeFile, Nome, fullPath, userId, isRed, NrProtocollo, Numero, A + + + + dbo.stp_tbDocs_getByNrProto + + + + + + + + @@ -921,7 +933,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, - + @@ -993,7 +1005,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, - + @@ -1161,7 +1173,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, - + @@ -1189,7 +1201,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, - + @@ -1203,7 +1215,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, - + @@ -1211,7 +1223,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, - + @@ -1284,7 +1296,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, - + @@ -1328,8 +1340,8 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, - - + + \ No newline at end of file diff --git a/ETS_Data/DataProxy_ETS_WS.cs b/ETS_Data/DataProxy_ETS_WS.cs new file mode 100644 index 0000000..f34cbaf --- /dev/null +++ b/ETS_Data/DataProxy_ETS_WS.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace ETS_Data +{ + + /// + /// classe proxy dati x ETS_WS + /// + public class DataProxy_ETS_WS + { + #region area table adapters + + /* Ds_ProjEts */ + public DS_WebScipTableAdapters.tbDocumentiTableAdapter taDoc; + + /// + /// init dei table adapters + /// + protected void initTA() + { + taDoc = new DS_WebScipTableAdapters.tbDocumentiTableAdapter(); + } + /// + /// effettua setup dei connection strings da web.config delal singola applicazione + /// + protected virtual void setupConnectionStringBase() + { + // connections del db + taDoc.Connection.ConnectionString = utils.obj.confReadString("ETS_WSConnectionString"); + } + + #endregion + + protected DataProxy_ETS_WS() + { + initTA(); + setupConnectionStringBase(); + } + /// + /// Singleton accesso a DataProxy + /// + public static DataProxy_ETS_WS DP = new DataProxy_ETS_WS(); + + #region utility public esposte + + /// + /// path completo (x download) di un doc (formato da "fullPath/nome") + /// + /// idxFile + /// + public string fullPathDoc(int idxFile) + { + string path = ""; + try + { + DS_WebScip.tbDocumentiRow riga = taDoc.getByIdxFile(idxFile)[0]; + path = string.Format("{0}/{1}", riga.fullPath, riga.Nome).Replace("//", "/"); + } + catch + { } + return path; + } + /// + /// path completo (x download) di un doc (formato da "fullPath/nome") + /// + /// numero protocollo + /// anno + /// + public string fullPathDoc(int numero, int anno) + { + string path = ""; + try + { + DS_WebScip.tbDocumentiRow riga = taDoc.getByNrProto(numero, anno)[0]; + path = string.Format("{0}/{1}", riga.fullPath, riga.Nome).Replace("//", "/"); + } + catch + { } + return path; + } + + #endregion + } +} diff --git a/ETS_Data/ETS_Data.csproj b/ETS_Data/ETS_Data.csproj index 5a2f402..994f9f9 100644 --- a/ETS_Data/ETS_Data.csproj +++ b/ETS_Data/ETS_Data.csproj @@ -96,6 +96,7 @@ True True + diff --git a/ETS_Data/bin/Release/ETS_Data.dll b/ETS_Data/bin/Release/ETS_Data.dll index 757f397..7e021bb 100644 Binary files a/ETS_Data/bin/Release/ETS_Data.dll and b/ETS_Data/bin/Release/ETS_Data.dll differ