Riaggiunto GMW_data
This commit is contained in:
@@ -195,7 +195,7 @@
|
||||
</site>
|
||||
<site name="GMW(1)" id="6">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\GMW-ALL\GMW\GMW" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\GMW\GMW\GMW" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:57804:localhost" />
|
||||
|
||||
@@ -5,17 +5,19 @@ VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GMW", "GMW\GMW.csproj", "{F8710519-CA62-4482-9045-02577B939A79}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamWare", "..\..\SteamWareLib\SteamWare.csproj", "{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GMW_data", "..\GMW_data\GMW_data\GMW_data.csproj", "{47143721-A018-4BDA-B544-EC3E10BC87A2}"
|
||||
EndProject
|
||||
Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "GMW_DB", "GMW_DB\GMW_DB.sqlproj", "{4A7C6325-D822-446C-BCE3-811FC178DCBE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersGen", "VersGen\VersGen.csproj", "{7C587950-A570-489C-9784-27256384E57E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamWare", "..\..\Steamware\SteamWareLib\SteamWare.csproj", "{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
IIS01_SP|Any CPU = IIS01_SP|Any CPU
|
||||
IIS01_TK|Any CPU = IIS01_TK|Any CPU
|
||||
IIS02_SP|Any CPU = IIS02_SP|Any CPU
|
||||
IIS02_TK|Any CPU = IIS02_TK|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
@@ -27,6 +29,10 @@ Global
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F8710519-CA62-4482-9045-02577B939A79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F8710519-CA62-4482-9045-02577B939A79}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F8710519-CA62-4482-9045-02577B939A79}.IIS01_SP|Any CPU.ActiveCfg = IIS01_SP|Any CPU
|
||||
{F8710519-CA62-4482-9045-02577B939A79}.IIS01_SP|Any CPU.Build.0 = IIS01_SP|Any CPU
|
||||
{F8710519-CA62-4482-9045-02577B939A79}.IIS01_TK|Any CPU.ActiveCfg = IIS01_TK|Any CPU
|
||||
{F8710519-CA62-4482-9045-02577B939A79}.IIS01_TK|Any CPU.Build.0 = IIS01_TK|Any CPU
|
||||
{F8710519-CA62-4482-9045-02577B939A79}.IIS02_SP|Any CPU.ActiveCfg = IIS02_SP|Any CPU
|
||||
{F8710519-CA62-4482-9045-02577B939A79}.IIS02_SP|Any CPU.Build.0 = IIS02_SP|Any CPU
|
||||
{F8710519-CA62-4482-9045-02577B939A79}.IIS02_TK|Any CPU.ActiveCfg = IIS02_TK|Any CPU
|
||||
@@ -41,24 +47,12 @@ Global
|
||||
{F8710519-CA62-4482-9045-02577B939A79}.TK_prod|Any CPU.Build.0 = TK_prod|Any CPU
|
||||
{F8710519-CA62-4482-9045-02577B939A79}.TK_test|Any CPU.ActiveCfg = TK_test|Any CPU
|
||||
{F8710519-CA62-4482-9045-02577B939A79}.TK_test|Any CPU.Build.0 = TK_test|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS02_SP|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS02_SP|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS02_TK|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS02_TK|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.SP_prod|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.SP_prod|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.SP_test|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.SP_test|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.TK_prod|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.TK_prod|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.TK_test|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.TK_test|Any CPU.Build.0 = Release|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.IIS01_SP|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.IIS01_SP|Any CPU.Build.0 = Release|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.IIS01_TK|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.IIS01_TK|Any CPU.Build.0 = Release|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.IIS02_SP|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.IIS02_SP|Any CPU.Build.0 = Release|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.IIS02_TK|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@@ -74,6 +68,10 @@ Global
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.TK_test|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.TK_test|Any CPU.Build.0 = Release|Any CPU
|
||||
{4A7C6325-D822-446C-BCE3-811FC178DCBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4A7C6325-D822-446C-BCE3-811FC178DCBE}.IIS01_SP|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A7C6325-D822-446C-BCE3-811FC178DCBE}.IIS01_SP|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{4A7C6325-D822-446C-BCE3-811FC178DCBE}.IIS01_TK|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A7C6325-D822-446C-BCE3-811FC178DCBE}.IIS01_TK|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{4A7C6325-D822-446C-BCE3-811FC178DCBE}.IIS02_SP|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A7C6325-D822-446C-BCE3-811FC178DCBE}.IIS02_SP|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{4A7C6325-D822-446C-BCE3-811FC178DCBE}.IIS02_TK|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@@ -93,6 +91,10 @@ Global
|
||||
{4A7C6325-D822-446C-BCE3-811FC178DCBE}.TK_test|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{7C587950-A570-489C-9784-27256384E57E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7C587950-A570-489C-9784-27256384E57E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7C587950-A570-489C-9784-27256384E57E}.IIS01_SP|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7C587950-A570-489C-9784-27256384E57E}.IIS01_SP|Any CPU.Build.0 = Release|Any CPU
|
||||
{7C587950-A570-489C-9784-27256384E57E}.IIS01_TK|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7C587950-A570-489C-9784-27256384E57E}.IIS01_TK|Any CPU.Build.0 = Release|Any CPU
|
||||
{7C587950-A570-489C-9784-27256384E57E}.IIS02_SP|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7C587950-A570-489C-9784-27256384E57E}.IIS02_SP|Any CPU.Build.0 = Release|Any CPU
|
||||
{7C587950-A570-489C-9784-27256384E57E}.IIS02_TK|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@@ -107,6 +109,26 @@ Global
|
||||
{7C587950-A570-489C-9784-27256384E57E}.TK_prod|Any CPU.Build.0 = Release|Any CPU
|
||||
{7C587950-A570-489C-9784-27256384E57E}.TK_test|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7C587950-A570-489C-9784-27256384E57E}.TK_test|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS01_SP|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS01_SP|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS01_TK|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS01_TK|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS02_SP|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS02_SP|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS02_TK|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS02_TK|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.SP_prod|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.SP_prod|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.SP_test|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.SP_test|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.TK_prod|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.TK_prod|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.TK_test|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.TK_test|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Binary file not shown.
+26
-19
@@ -142,6 +142,22 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'IIS01_SP|AnyCPU'">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'IIS01_TK|AnyCPU'">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -217,10 +233,6 @@
|
||||
<Reference Include="Elmah">
|
||||
<HintPath>..\packages\elmah.corelibrary.1.2.2\lib\Elmah.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GMW_data, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>ExtLib\GMW_data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HtmlAgilityPack, Version=1.4.9.5, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\HtmlAgilityPack.1.4.9.5\lib\Net45\HtmlAgilityPack.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
@@ -266,10 +278,6 @@
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="SteamWare, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>ExtLib\SteamWare.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
@@ -383,9 +391,7 @@
|
||||
<Content Include="DtxSetNC.aspx" />
|
||||
<Content Include="ErrorCodes.aspx" />
|
||||
<Content Include="ExportExcel_SAO.aspx" />
|
||||
<Content Include="ExtLib\GMW_data.dll" />
|
||||
<Content Include="ExtLib\Microsoft.ReportViewer.WinForms.dll" />
|
||||
<Content Include="ExtLib\SteamWare.dll" />
|
||||
<Content Include="favicon.ico" />
|
||||
<Content Include="fonts\fontawesome-webfont.svg" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.svg" />
|
||||
@@ -648,9 +654,6 @@
|
||||
<None Include="Web.IIS02_TK.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
<None Include="Web.IIS_TK.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\VersGen\GMW.cs">
|
||||
@@ -2211,12 +2214,6 @@
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\VersGen\VersGen.csproj">
|
||||
<Project>{7c587950-a570-489c-9784-27256384e57e}</Project>
|
||||
<Name>VersGen</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="anagCelle.aspx" />
|
||||
<Content Include="anagMagazzini.aspx" />
|
||||
@@ -2568,6 +2565,16 @@
|
||||
<None Include="Reports\CartellinoALTT.rdlc" />
|
||||
<None Include="Reports\CartellinoFinitiRxSP.rdlc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Steamware\SteamWareLib\SteamWare.csproj">
|
||||
<Project>{2872dcfe-8b46-43b2-baa0-842a816a2dd5}</Project>
|
||||
<Name>SteamWare</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\GMW_data\GMW_data\GMW_data.csproj">
|
||||
<Project>{47143721-a018-4bda-b544-ec3e10bc87a2}</Project>
|
||||
<Name>GMW_data</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
|
||||
@@ -501,7 +501,7 @@ namespace GMW.WebUserControls
|
||||
else // mentre se ho un UDC di destinazione cui legare il Dtx...
|
||||
{
|
||||
|
||||
// verifico che il DataMAtrix NON SIA già nell'UDC di destinazione...
|
||||
// verifico che il DataMatrix NON SIA già nell'UDC di destinazione...
|
||||
dtxInUdcDest = DataMatrix.mgr.taDtx2UDC.getByDtx(barcodeIn).Select(string.Format("UDC = '{0}'", NewUDC)).Length > 0;
|
||||
if (dtxInUdcDest)
|
||||
{
|
||||
|
||||
@@ -519,7 +519,7 @@ namespace GMW.WebUserControls
|
||||
DS_magazzino.ElencoListePrelievoDataTable tabElencoListe = new DS_magazzino.ElencoListePrelievoDataTable();
|
||||
try
|
||||
{
|
||||
tabElencoListe = GMW_data.MagClass.magazzino.taElencoListePrelievo.getByCodLista(codLista);
|
||||
tabElencoListe = MagClass.magazzino.taElencoListePrelievo.getByCodLista(codLista);
|
||||
answ = MagClass.magazzino.taTipoListaPrelievo.getByCodTipoLista(tabElencoListe[0].CodTipoLista)[0].toAs400;
|
||||
}
|
||||
catch
|
||||
@@ -665,7 +665,7 @@ namespace GMW.WebUserControls
|
||||
DS_magazzino.ElencoListePrelievoDataTable tabElencoListe = new DS_magazzino.ElencoListePrelievoDataTable();
|
||||
try
|
||||
{
|
||||
tabElencoListe = GMW_data.MagClass.magazzino.taElencoListePrelievo.getByCodLista(grView.SelectedValue.ToString());
|
||||
tabElencoListe = MagClass.magazzino.taElencoListePrelievo.getByCodLista(grView.SelectedValue.ToString());
|
||||
CodStato = tabElencoListe[0].CodStatoLista;
|
||||
codTipoLista = tabElencoListe[0].CodTipoLista;
|
||||
cambioUdcOk = (CodStato == (int)statoLista.bozza);
|
||||
@@ -741,7 +741,7 @@ namespace GMW.WebUserControls
|
||||
switch (_comando)
|
||||
{
|
||||
case "attivaListaPrelievo":
|
||||
result = GMW_data.MagClass.magazzino.attivaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto);
|
||||
result = MagClass.magazzino.attivaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto);
|
||||
showErrorLDP(result);
|
||||
updateOds();
|
||||
grView.EditIndex = -1;
|
||||
@@ -756,7 +756,7 @@ namespace GMW.WebUserControls
|
||||
e.Cancel = true;
|
||||
break;
|
||||
case "iniziaListaPrelievo":
|
||||
result = GMW_data.MagClass.magazzino.iniziaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto);
|
||||
result = MagClass.magazzino.iniziaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto);
|
||||
showErrorLDP(result);
|
||||
updateOds();
|
||||
grView.EditIndex = -1;
|
||||
@@ -771,7 +771,7 @@ namespace GMW.WebUserControls
|
||||
e.Cancel = true;
|
||||
break;
|
||||
case "completaListaPrelievo":
|
||||
result = GMW_data.MagClass.magazzino.completaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto, Request.UserHostName);
|
||||
result = MagClass.magazzino.completaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto, Request.UserHostName);
|
||||
showErrorLDP(result);
|
||||
updateOds();
|
||||
grView.EditIndex = -1;
|
||||
@@ -787,7 +787,7 @@ namespace GMW.WebUserControls
|
||||
break;
|
||||
case "scaricaListaPrelievo":
|
||||
int slotPL = Convert.ToInt32(ddlSlotLPAS.SelectedValue);
|
||||
result = GMW_data.MagClass.magazzino.scaricaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto, Request.UserHostName, slotPL);
|
||||
result = MagClass.magazzino.scaricaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto, Request.UserHostName, slotPL);
|
||||
showErrorLDP(result);
|
||||
updateOds();
|
||||
grView.EditIndex = -1;
|
||||
@@ -802,7 +802,7 @@ namespace GMW.WebUserControls
|
||||
e.Cancel = true;
|
||||
break;
|
||||
case "resetListaPrelievo":
|
||||
result = GMW_data.MagClass.magazzino.resetListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto, Request.UserHostName);
|
||||
result = MagClass.magazzino.resetListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto, Request.UserHostName);
|
||||
showErrorLDP(result);
|
||||
updateOds();
|
||||
grView.EditIndex = -1;
|
||||
@@ -1186,7 +1186,7 @@ namespace GMW.WebUserControls
|
||||
if (((CheckBox)riga.FindControl("chkSelect")).Checked && ((CheckBox)riga.FindControl("chkSelect")).Visible)
|
||||
{
|
||||
CodLista = ((Label)riga.FindControl("lblCodLista")).Text;
|
||||
result = GMW_data.MagClass.magazzino.scaricaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), CodLista, MagClass.magazzino.CodSoggCurrUser, Request.UserHostName, slotPL);
|
||||
result = MagClass.magazzino.scaricaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), CodLista, MagClass.magazzino.CodSoggCurrUser, Request.UserHostName, slotPL);
|
||||
}
|
||||
}
|
||||
if (modo == ctrlMode.standard)
|
||||
@@ -1222,7 +1222,7 @@ namespace GMW.WebUserControls
|
||||
/// <param name="CodLista"></param>
|
||||
private void updateDestTipoLDP(string CodLista)
|
||||
{
|
||||
GMW_data.MagClass.magazzino.taElencoListePrelievo.stp_LP_updateDestTipo(CodLista, ddlTipoLista.SelectedValue, ddlDestin.SelectedValue, ddlDestin.SelectedItem.Text, GMW_data.MagClass.magazzino.CodSoggCurrUser, DateTime.Now);
|
||||
MagClass.magazzino.taElencoListePrelievo.stp_LP_updateDestTipo(CodLista, ddlTipoLista.SelectedValue, ddlDestin.SelectedValue, ddlDestin.SelectedItem.Text, MagClass.magazzino.CodSoggCurrUser, DateTime.Now);
|
||||
}
|
||||
/// <summary>
|
||||
/// modo di funzionamento del controllo
|
||||
|
||||
@@ -503,7 +503,7 @@ namespace GMW.WebUserControls
|
||||
string particolare = "";
|
||||
DS_magazzino.ElencoCartelliniRow rigaUDC;
|
||||
// verifica preliminare della possibilità di cancellazione...
|
||||
string answ = "";
|
||||
string answ = "";
|
||||
MagClass.magazzino.taUdcChk4Del.GetData(udcReq, ref answ);
|
||||
lblOutChkDelUdc.Visible = true;
|
||||
// controllo esito
|
||||
@@ -551,7 +551,7 @@ string answ = "";
|
||||
{
|
||||
// scrivo errore che non posso cancellare...
|
||||
lblOutChkDelUdc.Text = traduci(answ);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// reset della selezione
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -86,6 +86,26 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'IIS01_SP|AnyCPU' ">
|
||||
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'IIS01_TK|AnyCPU' ">
|
||||
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties" />
|
||||
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GMW_data", "GMW_data\GMW_data.csproj", "{47143721-A018-4BDA-B544-EC3E10BC87A2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamWare", "..\..\SteamWareLib\SteamWare.csproj", "{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
218_SP|Any CPU = 218_SP|Any CPU
|
||||
218_test|Any CPU = 218_test|Any CPU
|
||||
Alumat|Any CPU = Alumat|Any CPU
|
||||
CMS|Any CPU = CMS|Any CPU
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
DEMO|Any CPU = DEMO|Any CPU
|
||||
deploy|Any CPU = deploy|Any CPU
|
||||
EQUA|Any CPU = EQUA|Any CPU
|
||||
ETS|Any CPU = ETS|Any CPU
|
||||
ETS-218|Any CPU = ETS-218|Any CPU
|
||||
IIS|Any CPU = IIS|Any CPU
|
||||
IIS01|Any CPU = IIS01|Any CPU
|
||||
IIS02|Any CPU = IIS02|Any CPU
|
||||
MoonProDemo-OVH|Any CPU = MoonProDemo-OVH|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
SomaschiniUSA|Any CPU = SomaschiniUSA|Any CPU
|
||||
Steamware|Any CPU = Steamware|Any CPU
|
||||
WinLab|Any CPU = WinLab|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.218_SP|Any CPU.ActiveCfg = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.218_SP|Any CPU.Build.0 = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.218_test|Any CPU.ActiveCfg = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.218_test|Any CPU.Build.0 = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.Alumat|Any CPU.ActiveCfg = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.Alumat|Any CPU.Build.0 = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.CMS|Any CPU.ActiveCfg = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.CMS|Any CPU.Build.0 = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.DEMO|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.DEMO|Any CPU.Build.0 = Debug|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.deploy|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.deploy|Any CPU.Build.0 = Debug|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.EQUA|Any CPU.ActiveCfg = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.EQUA|Any CPU.Build.0 = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.ETS|Any CPU.ActiveCfg = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.ETS|Any CPU.Build.0 = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.ETS-218|Any CPU.ActiveCfg = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.ETS-218|Any CPU.Build.0 = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.IIS|Any CPU.ActiveCfg = InstallerSP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.IIS|Any CPU.Build.0 = InstallerSP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.IIS01|Any CPU.ActiveCfg = InstallerSP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.IIS01|Any CPU.Build.0 = InstallerSP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.IIS02|Any CPU.ActiveCfg = InstallerSP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.IIS02|Any CPU.Build.0 = InstallerSP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.MoonProDemo-OVH|Any CPU.ActiveCfg = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.MoonProDemo-OVH|Any CPU.Build.0 = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.SomaschiniUSA|Any CPU.ActiveCfg = SP_prod|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.SomaschiniUSA|Any CPU.Build.0 = SP_prod|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.Steamware|Any CPU.ActiveCfg = SP_prod|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.Steamware|Any CPU.Build.0 = SP_prod|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.WinLab|Any CPU.ActiveCfg = 218_SP|Any CPU
|
||||
{47143721-A018-4BDA-B544-EC3E10BC87A2}.WinLab|Any CPU.Build.0 = 218_SP|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.218_SP|Any CPU.ActiveCfg = 218_SP|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.218_SP|Any CPU.Build.0 = 218_SP|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.218_test|Any CPU.ActiveCfg = 218_test|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.218_test|Any CPU.Build.0 = 218_test|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Alumat|Any CPU.ActiveCfg = Alumat|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Alumat|Any CPU.Build.0 = Alumat|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.CMS|Any CPU.ActiveCfg = CMS|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.CMS|Any CPU.Build.0 = CMS|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.DEMO|Any CPU.ActiveCfg = DEMO|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.DEMO|Any CPU.Build.0 = DEMO|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.deploy|Any CPU.ActiveCfg = deploy|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.deploy|Any CPU.Build.0 = deploy|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.EQUA|Any CPU.ActiveCfg = EQUA|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.EQUA|Any CPU.Build.0 = EQUA|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.ETS|Any CPU.ActiveCfg = ETS|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.ETS|Any CPU.Build.0 = ETS|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.ETS-218|Any CPU.ActiveCfg = ETS-218|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.ETS-218|Any CPU.Build.0 = ETS-218|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS|Any CPU.ActiveCfg = IIS|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS|Any CPU.Build.0 = IIS|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS01|Any CPU.ActiveCfg = IIS01|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS01|Any CPU.Build.0 = IIS01|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS02|Any CPU.ActiveCfg = IIS02|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.IIS02|Any CPU.Build.0 = IIS02|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.MoonProDemo-OVH|Any CPU.ActiveCfg = MoonProDemo-OVH|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.MoonProDemo-OVH|Any CPU.Build.0 = MoonProDemo-OVH|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.SomaschiniUSA|Any CPU.ActiveCfg = SomaschiniUSA|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.SomaschiniUSA|Any CPU.Build.0 = SomaschiniUSA|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Steamware|Any CPU.ActiveCfg = Steamware|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Steamware|Any CPU.Build.0 = Steamware|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.WinLab|Any CPU.ActiveCfg = WinLab|Any CPU
|
||||
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.WinLab|Any CPU.Build.0 = WinLab|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Generated
+30954
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TableUISettings />
|
||||
</DataSetUISetting>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool to store the dataset designer's layout information.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-1" ViewPortY="746" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:AnagStati" ZOrder="31" X="867" Y="533" Height="115" Width="201" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:AnagTipoDichiaraz" ZOrder="19" X="828" Y="719" Height="115" Width="254" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:AnagStatiProdotto" ZOrder="8" X="243" Y="639" Height="134" Width="254" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:RelazUDC" ZOrder="13" X="27" Y="249" Height="210" Width="226" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:AnagImpianti" ZOrder="29" X="853" Y="19" Height="191" Width="224" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:AnagCompanySito" ZOrder="28" X="1129" Y="83" Height="172" Width="253" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:AnagBilance" ZOrder="12" X="858" Y="224" Height="210" Width="227" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:ElencoCartellini" ZOrder="5" X="524" Y="-13" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:AnagImballi" ZOrder="26" X="72" Y="488" Height="153" Width="225" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_ArtInProd" ZOrder="21" X="1181" Y="757" Height="324" Width="254" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:AnagOperatori" ZOrder="18" X="488" Y="821" Height="267" Width="231" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:AnagClienti" ZOrder="25" X="817" Y="1304" Height="153" Width="278" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:AnagParticolari" ZOrder="24" X="1190" Y="331" Height="210" Width="234" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
|
||||
<Shape ID="DesignTable:AnagFamiglie" ZOrder="22" X="1193" Y="567" Height="134" Width="224" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:Soggetti2Utente" ZOrder="1" X="200" Y="879" Height="172" Width="189" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_specParticolari" ZOrder="15" X="30" Y="-23" Height="267" Width="253" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
|
||||
<Shape ID="DesignTable:ElencoPostazioni" ZOrder="16" X="1167" Y="1106" Height="172" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:stp_prtCartLiquidiF10ByUDC" ZOrder="4" X="536" Y="409" Height="305" Width="226" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:stp_prtCartLiquidiF18ByUDC" ZOrder="3" X="298" Y="18" Height="305" Width="191" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:v_RapQualNote" ZOrder="14" X="85" Y="1082" Height="343" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:ElencoNC" ZOrder="9" X="809" Y="894" Height="343" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
|
||||
<Shape ID="DesignTable:UDC_NC" ZOrder="10" X="446" Y="1130" Height="343" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
|
||||
<Shape ID="DesignTable:UNC_tree" ZOrder="11" X="1164" Y="1294" Height="172" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:TrascCodSogg" ZOrder="7" X="9" Y="729" Height="210" Width="181" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:UDC_DelLogNc" ZOrder="6" X="73" Y="1441" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
</Shapes>
|
||||
<Connectors>
|
||||
<Connector ID="DesignRelation:FK_AnagImpianti_AnagCompanySito" ZOrder="30" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1129</X>
|
||||
<Y>118</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1077</X>
|
||||
<Y>118</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_ElencoCartellini_AnagCompanySito" ZOrder="17" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1170</X>
|
||||
<Y>255</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1170</X>
|
||||
<Y>368</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>824</X>
|
||||
<Y>368</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_ElencoCartellini_AnagStatiProdotto" ZOrder="27" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>422</X>
|
||||
<Y>639</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>422</X>
|
||||
<Y>368</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>524</X>
|
||||
<Y>368</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_AnagOperatori_AnagCompanySito" ZOrder="2" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1154</X>
|
||||
<Y>255</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1154</X>
|
||||
<Y>882</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>719</X>
|
||||
<Y>882</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_AnagParticolari_AnagCompanySito" ZOrder="23" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1248</X>
|
||||
<Y>255</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1248</X>
|
||||
<Y>331</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_Soggetti2Utente_AnagOperatori" ZOrder="20" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>488</X>
|
||||
<Y>933</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>389</X>
|
||||
<Y>933</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
</Connectors>
|
||||
</DiagramLayout>
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace GMW_data
|
||||
{
|
||||
|
||||
|
||||
public partial class DS_DataMatrix
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
namespace GMW_data.DS_DataMatrixTableAdapters {
|
||||
|
||||
|
||||
public partial class Dtx2UDCTableAdapter {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TableUISettings />
|
||||
</DataSetUISetting>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool to store the dataset designer's layout information.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="295" ViewPortY="55" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:TranscodificaParticolari" ZOrder="24" X="946" Y="49" Height="134" Width="281" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:ElencoDataMatrix" ZOrder="22" X="604" Y="14" Height="400" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:v_trasfDataMatrix" ZOrder="23" X="951" Y="201" Height="324" Width="248" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:stp_decodeDtx" ZOrder="18" X="392" Y="663" Height="115" Width="257" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:stp_verificaDtx" ZOrder="21" X="403" Y="795" Height="115" Width="231" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:stp_conteggioDtx" ZOrder="20" X="90" Y="664" Height="134" Width="235" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:v_DtxAcquisiti" ZOrder="19" X="664" Y="669" Height="191" Width="227" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:stp_getFirstLastDtx" ZOrder="17" X="96" Y="805" Height="115" Width="256" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:Dtx2UDC" ZOrder="13" X="87" Y="297" Height="343" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
|
||||
<Shape ID="DesignTable:stp_DtxGetAvailFreeAnom" ZOrder="11" X="692" Y="873" Height="130" Width="221" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:Attr2Dtx" ZOrder="15" X="71" Y="36" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
|
||||
<Shape ID="DesignTable:v_Attr2Dtx" ZOrder="16" X="390" Y="69" Height="210" Width="191" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
|
||||
<Shape ID="DesignTable:stp_DtxCheckBlocked" ZOrder="14" X="463" Y="469" Height="96" Width="158" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="45" />
|
||||
<Shape ID="DesignTable:AnagFormatiDtmx" ZOrder="6" X="1227" Y="188" Height="343" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
|
||||
<Shape ID="DesignTable:Dmtx_ByAttr" ZOrder="12" X="961" Y="549" Height="305" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:v_ElencoDmtx" ZOrder="10" X="979" Y="882" Height="130" Width="158" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:AnagSpecDtx" ZOrder="7" X="1255" Y="884" Height="134" Width="223" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:TabSpecDtx" ZOrder="1" X="1241" Y="579" Height="267" Width="240" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:TrascFormatoDmtx" ZOrder="5" X="1541" Y="603" Height="153" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:TrascPartNum" ZOrder="4" X="1596" Y="419" Height="153" Width="227" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:TrascDatamatrix" ZOrder="3" X="1563" Y="837" Height="191" Width="262" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
</Shapes>
|
||||
<Connectors>
|
||||
<Connector ID="DesignRelation:FK_TabSpecDtx_AnagFormatiDtmx" ZOrder="9" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1316</X>
|
||||
<Y>531</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1316</X>
|
||||
<Y>579</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_TabSpecDtx_AnagSpecDtx" ZOrder="8" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1335</X>
|
||||
<Y>884</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1335</X>
|
||||
<Y>846</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_TrascDatamatrix_AnagFormatiDtmx" ZOrder="2" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1510</X>
|
||||
<Y>531</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1510</X>
|
||||
<Y>854</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1563</X>
|
||||
<Y>854</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
</Connectors>
|
||||
</DiagramLayout>
|
||||
Generated
+19425
File diff suppressed because it is too large
Load Diff
Generated
+11403
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TableUISettings />
|
||||
</DataSetUISetting>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool to store the dataset designer's layout information.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:BORI202J" ZOrder="2" X="848" Y="147" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:Odette" ZOrder="1" X="237" Y="227" Height="476" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:stp_OdetteStatoCreate" ZOrder="3" X="734" Y="647" Height="115" Width="276" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
</Shapes>
|
||||
<Connectors />
|
||||
</DiagramLayout>
|
||||
Generated
+5095
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TableUISettings />
|
||||
</DataSetUISetting>
|
||||
@@ -0,0 +1,469 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema id="DS_SM" targetNamespace="http://tempuri.org/DS_SM.xsd" xmlns:mstns="http://tempuri.org/DS_SM.xsd" xmlns="http://tempuri.org/DS_SM.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
|
||||
<xs:annotation>
|
||||
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<Connections>
|
||||
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="GMWConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="GMWConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.GMW_data.Properties.Settings.GlobalReference.Default.GMWConnectionString" Provider="System.Data.SqlClient" />
|
||||
</Connections>
|
||||
<Tables>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DelibereTableAdapter" GeneratorDataComponentClassName="DelibereTableAdapter" Name="Delibere" UserDataComponentName="DelibereTableAdapter">
|
||||
<MainSource>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.Delibere" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||
<DeleteCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>DELETE FROM [dbo].[Delibere] WHERE (([CodTipoDelibera] = @Original_CodTipoDelibera) AND ([UDC] = @Original_UDC) AND ([DataDelibera] = @Original_DataDelibera) AND ([CodSoggetto] = @Original_CodSoggetto))</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CodTipoDelibera" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodTipoDelibera" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_UDC" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="UDC" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_DataDelibera" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="DataDelibera" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@Original_CodSoggetto" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="CodSoggetto" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</DeleteCommand>
|
||||
<InsertCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>INSERT INTO [dbo].[Delibere] ([CodTipoDelibera], [UDC], [DataDelibera], [CodSoggetto]) VALUES (@CodTipoDelibera, @UDC, @DataDelibera, @CodSoggetto);
|
||||
SELECT CodTipoDelibera, UDC, DataDelibera, CodSoggetto FROM Delibere WHERE (CodTipoDelibera = @CodTipoDelibera) AND (UDC = @UDC)</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CodTipoDelibera" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodTipoDelibera" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@UDC" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="UDC" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DataDelibera" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="DataDelibera" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@CodSoggetto" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="CodSoggetto" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</InsertCommand>
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>SELECT CodTipoDelibera, UDC, DataDelibera, CodSoggetto FROM dbo.Delibere</CommandText>
|
||||
<Parameters />
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
<UpdateCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>UPDATE [dbo].[Delibere] SET [CodTipoDelibera] = @CodTipoDelibera, [UDC] = @UDC, [DataDelibera] = @DataDelibera, [CodSoggetto] = @CodSoggetto WHERE (([CodTipoDelibera] = @Original_CodTipoDelibera) AND ([UDC] = @Original_UDC) AND ([DataDelibera] = @Original_DataDelibera) AND ([CodSoggetto] = @Original_CodSoggetto));
|
||||
SELECT CodTipoDelibera, UDC, DataDelibera, CodSoggetto FROM Delibere WHERE (CodTipoDelibera = @CodTipoDelibera) AND (UDC = @UDC)</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CodTipoDelibera" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodTipoDelibera" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@UDC" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="UDC" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DataDelibera" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="DataDelibera" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@CodSoggetto" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="CodSoggetto" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CodTipoDelibera" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodTipoDelibera" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_UDC" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="UDC" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_DataDelibera" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="DataDelibera" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@Original_CodSoggetto" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="CodSoggetto" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</UpdateCommand>
|
||||
</DbSource>
|
||||
</MainSource>
|
||||
<Mappings>
|
||||
<Mapping SourceColumn="CodTipoDelibera" DataSetColumn="CodTipoDelibera" />
|
||||
<Mapping SourceColumn="UDC" DataSetColumn="UDC" />
|
||||
<Mapping SourceColumn="DataDelibera" DataSetColumn="DataDelibera" />
|
||||
<Mapping SourceColumn="CodSoggetto" DataSetColumn="CodSoggetto" />
|
||||
</Mappings>
|
||||
<Sources />
|
||||
</TableAdapter>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="AnagTipoEventoTableAdapter" GeneratorDataComponentClassName="AnagTipoEventoTableAdapter" Name="AnagTipoEvento" UserDataComponentName="AnagTipoEventoTableAdapter">
|
||||
<MainSource>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.AnagTipoEvento" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||
<DeleteCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>DELETE FROM [dbo].[AnagTipoEvento] WHERE (([CodEvento] = @Original_CodEvento) AND ((@IsNull_DescEvento = 1 AND [DescEvento] IS NULL) OR ([DescEvento] = @Original_DescEvento)))</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CodEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodEvento" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_DescEvento" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="DescEvento" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_DescEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="DescEvento" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</DeleteCommand>
|
||||
<InsertCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>INSERT INTO [dbo].[AnagTipoEvento] ([CodEvento], [DescEvento]) VALUES (@CodEvento, @DescEvento);
|
||||
SELECT CodEvento, DescEvento FROM AnagTipoEvento WHERE (CodEvento = @CodEvento)</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CodEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodEvento" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@DescEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="DescEvento" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</InsertCommand>
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>SELECT CodEvento, DescEvento FROM dbo.AnagTipoEvento</CommandText>
|
||||
<Parameters />
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
<UpdateCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>UPDATE [dbo].[AnagTipoEvento] SET [CodEvento] = @CodEvento, [DescEvento] = @DescEvento WHERE (([CodEvento] = @Original_CodEvento) AND ((@IsNull_DescEvento = 1 AND [DescEvento] IS NULL) OR ([DescEvento] = @Original_DescEvento)));
|
||||
SELECT CodEvento, DescEvento FROM AnagTipoEvento WHERE (CodEvento = @CodEvento)</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CodEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodEvento" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@DescEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="DescEvento" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CodEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodEvento" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_DescEvento" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="DescEvento" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_DescEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="DescEvento" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</UpdateCommand>
|
||||
</DbSource>
|
||||
</MainSource>
|
||||
<Mappings>
|
||||
<Mapping SourceColumn="CodEvento" DataSetColumn="CodEvento" />
|
||||
<Mapping SourceColumn="DescEvento" DataSetColumn="DescEvento" />
|
||||
</Mappings>
|
||||
<Sources />
|
||||
</TableAdapter>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TabTranPosizEventiTableAdapter" GeneratorDataComponentClassName="TabTranPosizEventiTableAdapter" Name="TabTranPosizEventi" UserDataComponentName="TabTranPosizEventiTableAdapter">
|
||||
<MainSource>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="TK_GMWTest.dbo.TabTranPosizEventi" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||
<DeleteCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>DELETE FROM [TabTranPosizEventi] WHERE (([CodEvento] = @Original_CodEvento) AND ([IdxPosizione] = @Original_IdxPosizione) AND ((@IsNull_IdxPosizioneTo = 1 AND [IdxPosizioneTo] IS NULL) OR ([IdxPosizioneTo] = @Original_IdxPosizioneTo)) AND ((@IsNull_IdxBloccoTo = 1 AND [IdxBloccoTo] IS NULL) OR ([IdxBloccoTo] = @Original_IdxBloccoTo)))</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CodEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodEvento" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_IdxPosizione" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPosizione" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_IdxPosizioneTo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPosizioneTo" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_IdxPosizioneTo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPosizioneTo" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_IdxBloccoTo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxBloccoTo" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_IdxBloccoTo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxBloccoTo" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</DeleteCommand>
|
||||
<InsertCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>INSERT INTO [TabTranPosizEventi] ([CodEvento], [IdxPosizione], [IdxPosizioneTo], [IdxBloccoTo]) VALUES (@CodEvento, @IdxPosizione, @IdxPosizioneTo, @IdxBloccoTo);
|
||||
SELECT CodEvento, IdxPosizione, IdxPosizioneTo, IdxBloccoTo FROM TabTranPosizEventi WHERE (CodEvento = @CodEvento) AND (IdxPosizione = @IdxPosizione)</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CodEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodEvento" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IdxPosizione" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPosizione" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IdxPosizioneTo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPosizioneTo" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IdxBloccoTo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxBloccoTo" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</InsertCommand>
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="true">
|
||||
<CommandText>SELECT CodEvento, IdxPosizione, IdxPosizioneTo, IdxBloccoTo FROM TabTranPosizEventi</CommandText>
|
||||
<Parameters />
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
<UpdateCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>UPDATE [TabTranPosizEventi] SET [CodEvento] = @CodEvento, [IdxPosizione] = @IdxPosizione, [IdxPosizioneTo] = @IdxPosizioneTo, [IdxBloccoTo] = @IdxBloccoTo WHERE (([CodEvento] = @Original_CodEvento) AND ([IdxPosizione] = @Original_IdxPosizione) AND ((@IsNull_IdxPosizioneTo = 1 AND [IdxPosizioneTo] IS NULL) OR ([IdxPosizioneTo] = @Original_IdxPosizioneTo)) AND ((@IsNull_IdxBloccoTo = 1 AND [IdxBloccoTo] IS NULL) OR ([IdxBloccoTo] = @Original_IdxBloccoTo)));
|
||||
SELECT CodEvento, IdxPosizione, IdxPosizioneTo, IdxBloccoTo FROM TabTranPosizEventi WHERE (CodEvento = @CodEvento) AND (IdxPosizione = @IdxPosizione)</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CodEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodEvento" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IdxPosizione" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPosizione" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IdxPosizioneTo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPosizioneTo" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IdxBloccoTo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxBloccoTo" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CodEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodEvento" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_IdxPosizione" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPosizione" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_IdxPosizioneTo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPosizioneTo" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_IdxPosizioneTo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPosizioneTo" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_IdxBloccoTo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxBloccoTo" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_IdxBloccoTo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxBloccoTo" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</UpdateCommand>
|
||||
</DbSource>
|
||||
</MainSource>
|
||||
<Mappings>
|
||||
<Mapping SourceColumn="CodEvento" DataSetColumn="CodEvento" />
|
||||
<Mapping SourceColumn="IdxPosizione" DataSetColumn="IdxPosizione" />
|
||||
<Mapping SourceColumn="IdxPosizioneTo" DataSetColumn="IdxPosizioneTo" />
|
||||
<Mapping SourceColumn="IdxBloccoTo" DataSetColumn="IdxBloccoTo" />
|
||||
</Mappings>
|
||||
<Sources>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="SP_GMW.dbo.stp_TTPE_getByCodEvento" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByEvento" GetMethodModifier="Public" GetMethodName="getByEvento" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByEvento" UserSourceName="getByEvento">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>dbo.stp_TTPE_getByCodEvento</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@CodEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="10" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.stp_TTPE_getByCodEventoPosizione" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByEventoPosizione" GetMethodModifier="Public" GetMethodName="getByEventoPosizione" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByEventoPosizione" UserSourceName="getByEventoPosizione">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>dbo.stp_TTPE_getByCodEventoPosizione</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@CodEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="10" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@IdxPosizione" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
</Sources>
|
||||
</TableAdapter>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="AnagPosizioniTableAdapter" GeneratorDataComponentClassName="AnagPosizioniTableAdapter" Name="AnagPosizioni" UserDataComponentName="AnagPosizioniTableAdapter">
|
||||
<MainSource>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.AnagPosizioni" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||
<DeleteCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>DELETE FROM [dbo].[AnagPosizioni] WHERE (([IdxPosizione] = @Original_IdxPosizione) AND ((@IsNull_DescPosizione = 1 AND [DescPosizione] IS NULL) OR ([DescPosizione] = @Original_DescPosizione)))</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_IdxPosizione" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPosizione" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_DescPosizione" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="DescPosizione" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_DescPosizione" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="DescPosizione" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</DeleteCommand>
|
||||
<InsertCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>INSERT INTO [dbo].[AnagPosizioni] ([IdxPosizione], [DescPosizione]) VALUES (@IdxPosizione, @DescPosizione);
|
||||
SELECT IdxPosizione, DescPosizione FROM AnagPosizioni WHERE (IdxPosizione = @IdxPosizione)</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IdxPosizione" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPosizione" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@DescPosizione" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="DescPosizione" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</InsertCommand>
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>SELECT IdxPosizione, DescPosizione FROM dbo.AnagPosizioni</CommandText>
|
||||
<Parameters />
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
<UpdateCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>UPDATE [dbo].[AnagPosizioni] SET [IdxPosizione] = @IdxPosizione, [DescPosizione] = @DescPosizione WHERE (([IdxPosizione] = @Original_IdxPosizione) AND ((@IsNull_DescPosizione = 1 AND [DescPosizione] IS NULL) OR ([DescPosizione] = @Original_DescPosizione)));
|
||||
SELECT IdxPosizione, DescPosizione FROM AnagPosizioni WHERE (IdxPosizione = @IdxPosizione)</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IdxPosizione" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPosizione" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@DescPosizione" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="DescPosizione" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_IdxPosizione" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPosizione" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_DescPosizione" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="DescPosizione" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_DescPosizione" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="DescPosizione" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</UpdateCommand>
|
||||
</DbSource>
|
||||
</MainSource>
|
||||
<Mappings>
|
||||
<Mapping SourceColumn="IdxPosizione" DataSetColumn="IdxPosizione" />
|
||||
<Mapping SourceColumn="DescPosizione" DataSetColumn="DescPosizione" />
|
||||
</Mappings>
|
||||
<Sources />
|
||||
</TableAdapter>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="AnagTipoDelibereTableAdapter" GeneratorDataComponentClassName="AnagTipoDelibereTableAdapter" Name="AnagTipoDelibere" UserDataComponentName="AnagTipoDelibereTableAdapter">
|
||||
<MainSource>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.AnagTipoDelibere" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||
<DeleteCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>DELETE FROM [dbo].[AnagTipoDelibere] WHERE (([CodTipoDelibera] = @Original_CodTipoDelibera) AND ((@IsNull_DescDelibera = 1 AND [DescDelibera] IS NULL) OR ([DescDelibera] = @Original_DescDelibera)) AND ((@IsNull_CodEvento = 1 AND [CodEvento] IS NULL) OR ([CodEvento] = @Original_CodEvento)))</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CodTipoDelibera" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodTipoDelibera" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_DescDelibera" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="DescDelibera" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_DescDelibera" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="DescDelibera" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_CodEvento" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="CodEvento" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CodEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodEvento" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</DeleteCommand>
|
||||
<InsertCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>INSERT INTO [dbo].[AnagTipoDelibere] ([CodTipoDelibera], [DescDelibera], [CodEvento]) VALUES (@CodTipoDelibera, @DescDelibera, @CodEvento);
|
||||
SELECT CodTipoDelibera, DescDelibera, CodEvento FROM AnagTipoDelibere WHERE (CodTipoDelibera = @CodTipoDelibera)</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CodTipoDelibera" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodTipoDelibera" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@DescDelibera" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="DescDelibera" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CodEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodEvento" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</InsertCommand>
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>SELECT CodTipoDelibera, DescDelibera, CodEvento FROM dbo.AnagTipoDelibere</CommandText>
|
||||
<Parameters />
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
<UpdateCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>UPDATE [dbo].[AnagTipoDelibere] SET [CodTipoDelibera] = @CodTipoDelibera, [DescDelibera] = @DescDelibera, [CodEvento] = @CodEvento WHERE (([CodTipoDelibera] = @Original_CodTipoDelibera) AND ((@IsNull_DescDelibera = 1 AND [DescDelibera] IS NULL) OR ([DescDelibera] = @Original_DescDelibera)) AND ((@IsNull_CodEvento = 1 AND [CodEvento] IS NULL) OR ([CodEvento] = @Original_CodEvento)));
|
||||
SELECT CodTipoDelibera, DescDelibera, CodEvento FROM AnagTipoDelibere WHERE (CodTipoDelibera = @CodTipoDelibera)</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CodTipoDelibera" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodTipoDelibera" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@DescDelibera" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="DescDelibera" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CodEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodEvento" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CodTipoDelibera" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodTipoDelibera" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_DescDelibera" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="DescDelibera" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_DescDelibera" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="DescDelibera" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_CodEvento" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="CodEvento" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CodEvento" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodEvento" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</UpdateCommand>
|
||||
</DbSource>
|
||||
</MainSource>
|
||||
<Mappings>
|
||||
<Mapping SourceColumn="CodTipoDelibera" DataSetColumn="CodTipoDelibera" />
|
||||
<Mapping SourceColumn="DescDelibera" DataSetColumn="DescDelibera" />
|
||||
<Mapping SourceColumn="CodEvento" DataSetColumn="CodEvento" />
|
||||
</Mappings>
|
||||
<Sources>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="SP_GMWTest.dbo.stp_ATD_getByKey" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByKey" GetMethodModifier="Public" GetMethodName="getByKey" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByKey" UserSourceName="getByKey">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>dbo.stp_ATD_getByKey</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@CodTipoDelibera" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
</Sources>
|
||||
</TableAdapter>
|
||||
</Tables>
|
||||
<Sources />
|
||||
</DataSource>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:element name="DS_SM" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="DS_SM" msprop:Generator_DataSetName="DS_SM" msprop:EnableTableAdapterManager="true">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="Delibere" msprop:Generator_UserTableName="Delibere" msprop:Generator_RowDeletedName="DelibereRowDeleted" msprop:Generator_RowChangedName="DelibereRowChanged" msprop:Generator_RowClassName="DelibereRow" msprop:Generator_RowChangingName="DelibereRowChanging" msprop:Generator_RowEvArgName="DelibereRowChangeEvent" msprop:Generator_RowEvHandlerName="DelibereRowChangeEventHandler" msprop:Generator_TableClassName="DelibereDataTable" msprop:Generator_TableVarName="tableDelibere" msprop:Generator_RowDeletingName="DelibereRowDeleting" msprop:Generator_TablePropName="Delibere">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="CodTipoDelibera" msprop:Generator_UserColumnName="CodTipoDelibera" msprop:Generator_ColumnVarNameInTable="columnCodTipoDelibera" msprop:Generator_ColumnPropNameInRow="CodTipoDelibera" msprop:Generator_ColumnPropNameInTable="CodTipoDeliberaColumn">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="50" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="UDC" msprop:Generator_UserColumnName="UDC" msprop:Generator_ColumnVarNameInTable="columnUDC" msprop:Generator_ColumnPropNameInRow="UDC" msprop:Generator_ColumnPropNameInTable="UDCColumn">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="50" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="DataDelibera" msprop:Generator_UserColumnName="DataDelibera" msprop:Generator_ColumnVarNameInTable="columnDataDelibera" msprop:Generator_ColumnPropNameInRow="DataDelibera" msprop:Generator_ColumnPropNameInTable="DataDeliberaColumn" type="xs:dateTime" />
|
||||
<xs:element name="CodSoggetto" msprop:Generator_UserColumnName="CodSoggetto" msprop:Generator_ColumnVarNameInTable="columnCodSoggetto" msprop:Generator_ColumnPropNameInRow="CodSoggetto" msprop:Generator_ColumnPropNameInTable="CodSoggettoColumn">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="16" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="AnagTipoEvento" msprop:Generator_UserTableName="AnagTipoEvento" msprop:Generator_RowDeletedName="AnagTipoEventoRowDeleted" msprop:Generator_RowChangedName="AnagTipoEventoRowChanged" msprop:Generator_RowClassName="AnagTipoEventoRow" msprop:Generator_RowChangingName="AnagTipoEventoRowChanging" msprop:Generator_RowEvArgName="AnagTipoEventoRowChangeEvent" msprop:Generator_RowEvHandlerName="AnagTipoEventoRowChangeEventHandler" msprop:Generator_TableClassName="AnagTipoEventoDataTable" msprop:Generator_TableVarName="tableAnagTipoEvento" msprop:Generator_RowDeletingName="AnagTipoEventoRowDeleting" msprop:Generator_TablePropName="AnagTipoEvento">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="CodEvento" msprop:Generator_UserColumnName="CodEvento" msprop:Generator_ColumnVarNameInTable="columnCodEvento" msprop:Generator_ColumnPropNameInRow="CodEvento" msprop:Generator_ColumnPropNameInTable="CodEventoColumn">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="10" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="DescEvento" msprop:Generator_UserColumnName="DescEvento" msprop:Generator_ColumnVarNameInTable="columnDescEvento" msprop:Generator_ColumnPropNameInRow="DescEvento" msprop:Generator_ColumnPropNameInTable="DescEventoColumn" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="50" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="TabTranPosizEventi" msprop:Generator_UserTableName="TabTranPosizEventi" msprop:Generator_RowDeletedName="TabTranPosizEventiRowDeleted" msprop:Generator_RowChangedName="TabTranPosizEventiRowChanged" msprop:Generator_RowClassName="TabTranPosizEventiRow" msprop:Generator_RowChangingName="TabTranPosizEventiRowChanging" msprop:Generator_RowEvArgName="TabTranPosizEventiRowChangeEvent" msprop:Generator_RowEvHandlerName="TabTranPosizEventiRowChangeEventHandler" msprop:Generator_TableClassName="TabTranPosizEventiDataTable" msprop:Generator_TableVarName="tableTabTranPosizEventi" msprop:Generator_RowDeletingName="TabTranPosizEventiRowDeleting" msprop:Generator_TablePropName="TabTranPosizEventi">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="CodEvento" msprop:Generator_UserColumnName="CodEvento" msprop:Generator_ColumnVarNameInTable="columnCodEvento" msprop:Generator_ColumnPropNameInRow="CodEvento" msprop:Generator_ColumnPropNameInTable="CodEventoColumn">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="10" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="IdxPosizione" msprop:Generator_UserColumnName="IdxPosizione" msprop:Generator_ColumnVarNameInTable="columnIdxPosizione" msprop:Generator_ColumnPropNameInRow="IdxPosizione" msprop:Generator_ColumnPropNameInTable="IdxPosizioneColumn" type="xs:int" />
|
||||
<xs:element name="IdxPosizioneTo" msprop:Generator_UserColumnName="IdxPosizioneTo" msprop:Generator_ColumnVarNameInTable="columnIdxPosizioneTo" msprop:Generator_ColumnPropNameInRow="IdxPosizioneTo" msprop:Generator_ColumnPropNameInTable="IdxPosizioneToColumn" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="IdxBloccoTo" msprop:Generator_UserColumnName="IdxBloccoTo" msprop:Generator_ColumnPropNameInRow="IdxBloccoTo" msprop:Generator_ColumnVarNameInTable="columnIdxBloccoTo" msprop:Generator_ColumnPropNameInTable="IdxBloccoToColumn" type="xs:int" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="AnagPosizioni" msprop:Generator_UserTableName="AnagPosizioni" msprop:Generator_RowDeletedName="AnagPosizioniRowDeleted" msprop:Generator_RowChangedName="AnagPosizioniRowChanged" msprop:Generator_RowClassName="AnagPosizioniRow" msprop:Generator_RowChangingName="AnagPosizioniRowChanging" msprop:Generator_RowEvArgName="AnagPosizioniRowChangeEvent" msprop:Generator_RowEvHandlerName="AnagPosizioniRowChangeEventHandler" msprop:Generator_TableClassName="AnagPosizioniDataTable" msprop:Generator_TableVarName="tableAnagPosizioni" msprop:Generator_RowDeletingName="AnagPosizioniRowDeleting" msprop:Generator_TablePropName="AnagPosizioni">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="IdxPosizione" msprop:Generator_UserColumnName="IdxPosizione" msprop:Generator_ColumnVarNameInTable="columnIdxPosizione" msprop:Generator_ColumnPropNameInRow="IdxPosizione" msprop:Generator_ColumnPropNameInTable="IdxPosizioneColumn" type="xs:int" />
|
||||
<xs:element name="DescPosizione" msprop:Generator_UserColumnName="DescPosizione" msprop:Generator_ColumnVarNameInTable="columnDescPosizione" msprop:Generator_ColumnPropNameInRow="DescPosizione" msprop:Generator_ColumnPropNameInTable="DescPosizioneColumn" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="50" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="AnagTipoDelibere" msprop:Generator_UserTableName="AnagTipoDelibere" msprop:Generator_RowDeletedName="AnagTipoDelibereRowDeleted" msprop:Generator_RowChangedName="AnagTipoDelibereRowChanged" msprop:Generator_RowClassName="AnagTipoDelibereRow" msprop:Generator_RowChangingName="AnagTipoDelibereRowChanging" msprop:Generator_RowEvArgName="AnagTipoDelibereRowChangeEvent" msprop:Generator_RowEvHandlerName="AnagTipoDelibereRowChangeEventHandler" msprop:Generator_TableClassName="AnagTipoDelibereDataTable" msprop:Generator_TableVarName="tableAnagTipoDelibere" msprop:Generator_RowDeletingName="AnagTipoDelibereRowDeleting" msprop:Generator_TablePropName="AnagTipoDelibere">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="CodTipoDelibera" msprop:Generator_UserColumnName="CodTipoDelibera" msprop:Generator_ColumnVarNameInTable="columnCodTipoDelibera" msprop:Generator_ColumnPropNameInRow="CodTipoDelibera" msprop:Generator_ColumnPropNameInTable="CodTipoDeliberaColumn">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="50" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="DescDelibera" msprop:Generator_UserColumnName="DescDelibera" msprop:Generator_ColumnVarNameInTable="columnDescDelibera" msprop:Generator_ColumnPropNameInRow="DescDelibera" msprop:Generator_ColumnPropNameInTable="DescDeliberaColumn" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="50" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="CodEvento" msprop:Generator_UserColumnName="CodEvento" msprop:Generator_ColumnVarNameInTable="columnCodEvento" msprop:Generator_ColumnPropNameInRow="CodEvento" msprop:Generator_ColumnPropNameInTable="CodEventoColumn" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="10" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:Delibere" />
|
||||
<xs:field xpath="mstns:CodTipoDelibera" />
|
||||
<xs:field xpath="mstns:UDC" />
|
||||
</xs:unique>
|
||||
<xs:unique name="AnagTipoEvento_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:AnagTipoEvento" />
|
||||
<xs:field xpath="mstns:CodEvento" />
|
||||
</xs:unique>
|
||||
<xs:unique name="TabTranPosizEventi_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:TabTranPosizEventi" />
|
||||
<xs:field xpath="mstns:CodEvento" />
|
||||
<xs:field xpath="mstns:IdxPosizione" />
|
||||
</xs:unique>
|
||||
<xs:unique name="AnagPosizioni_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:AnagPosizioni" />
|
||||
<xs:field xpath="mstns:IdxPosizione" />
|
||||
</xs:unique>
|
||||
<xs:unique name="AnagTipoDelibere_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:AnagTipoDelibere" />
|
||||
<xs:field xpath="mstns:CodTipoDelibera" />
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<msdata:Relationship name="FK_TabTranPosizEventi_AnagTipoEvento" msdata:parent="AnagTipoEvento" msdata:child="TabTranPosizEventi" msdata:parentkey="CodEvento" msdata:childkey="CodEvento" msprop:Generator_UserRelationName="FK_TabTranPosizEventi_AnagTipoEvento" msprop:Generator_RelationVarName="relationFK_TabTranPosizEventi_AnagTipoEvento" msprop:Generator_UserChildTable="TabTranPosizEventi" msprop:Generator_UserParentTable="AnagTipoEvento" msprop:Generator_ParentPropName="AnagTipoEventoRow" msprop:Generator_ChildPropName="GetTabTranPosizEventiRows" />
|
||||
<msdata:Relationship name="FK_TabTranPosizEventi_AnagPosizioni" msdata:parent="AnagPosizioni" msdata:child="TabTranPosizEventi" msdata:parentkey="IdxPosizione" msdata:childkey="IdxPosizione" msprop:Generator_UserRelationName="FK_TabTranPosizEventi_AnagPosizioni" msprop:Generator_RelationVarName="relationFK_TabTranPosizEventi_AnagPosizioni" msprop:Generator_UserChildTable="TabTranPosizEventi" msprop:Generator_UserParentTable="AnagPosizioni" msprop:Generator_ParentPropName="AnagPosizioniRow" msprop:Generator_ChildPropName="GetTabTranPosizEventiRows" />
|
||||
<msdata:Relationship name="FK_Delibere_AnagTipoDelibere" msdata:parent="AnagTipoDelibere" msdata:child="Delibere" msdata:parentkey="CodTipoDelibera" msdata:childkey="CodTipoDelibera" msprop:Generator_UserRelationName="FK_Delibere_AnagTipoDelibere" msprop:Generator_RelationVarName="relationFK_Delibere_AnagTipoDelibere" msprop:Generator_UserChildTable="Delibere" msprop:Generator_UserParentTable="AnagTipoDelibere" msprop:Generator_ParentPropName="AnagTipoDelibereRow" msprop:Generator_ChildPropName="GetDelibereRows" />
|
||||
<msdata:Relationship name="FK_AnagTipoDelibere_AnagTipoEvento" msdata:parent="AnagTipoEvento" msdata:child="AnagTipoDelibere" msdata:parentkey="CodEvento" msdata:childkey="CodEvento" msprop:Generator_UserRelationName="FK_AnagTipoDelibere_AnagTipoEvento" msprop:Generator_RelationVarName="relationFK_AnagTipoDelibere_AnagTipoEvento" msprop:Generator_UserChildTable="AnagTipoDelibere" msprop:Generator_UserParentTable="AnagTipoEvento" msprop:Generator_ParentPropName="AnagTipoEventoRow" msprop:Generator_ChildPropName="GetAnagTipoDelibereRows" />
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool to store the dataset designer's layout information.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="33" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:Delibere" ZOrder="5" X="163" Y="118" Height="153" Width="193" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:AnagTipoEvento" ZOrder="4" X="884" Y="139" Height="115" Width="241" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:TabTranPosizEventi" ZOrder="3" X="874" Y="374" Height="191" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:AnagPosizioni" ZOrder="2" X="513" Y="381" Height="115" Width="227" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:AnagTipoDelibere" ZOrder="1" X="526" Y="123" Height="153" Width="250" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
</Shapes>
|
||||
<Connectors>
|
||||
<Connector ID="DesignRelation:FK_TabTranPosizEventi_AnagTipoEvento" ZOrder="9" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1013</X>
|
||||
<Y>254</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1013</X>
|
||||
<Y>374</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_TabTranPosizEventi_AnagPosizioni" ZOrder="8" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>740</X>
|
||||
<Y>438</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>874</X>
|
||||
<Y>438</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_Delibere_AnagTipoDelibere" ZOrder="7" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>526</X>
|
||||
<Y>190</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>356</X>
|
||||
<Y>190</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_AnagTipoDelibere_AnagTipoEvento" ZOrder="6" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>884</X>
|
||||
<Y>182</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>776</X>
|
||||
<Y>182</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
</Connectors>
|
||||
</DiagramLayout>
|
||||
Generated
+19292
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TableUISettings />
|
||||
</DataSetUISetting>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool to store the dataset designer's layout information.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="4" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:v_selMag" ZOrder="9" X="18" Y="136" Height="153" Width="166" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_selBlocco" ZOrder="8" X="598" Y="103" Height="172" Width="225" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:v_selTipoCella" ZOrder="27" X="635" Y="330" Height="191" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:stp_getImpiantiByCodCS" ZOrder="26" X="313" Y="598" Height="172" Width="287" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:STP" ZOrder="17" X="14" Y="297" Height="267" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="81" />
|
||||
<Shape ID="DesignTable:v_selPeriodiTrad" ZOrder="25" X="681" Y="545" Height="153" Width="240" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_selStatiListe" ZOrder="24" X="949" Y="219" Height="115" Width="225" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:v_selTipoLista" ZOrder="18" X="1005" Y="684" Height="153" Width="224" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_selUdcByPart" ZOrder="20" X="1003" Y="426" Height="191" Width="228" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:v_selTipoDelibera" ZOrder="23" X="948" Y="56" Height="115" Width="246" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:stp_ricercaFullTerminalino" ZOrder="22" X="377" Y="346" Height="134" Width="210" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_selMagLogico" ZOrder="11" X="56" Y="683" Height="153" Width="236" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_selDestinatariListePrelievo" ZOrder="21" X="369" Y="131" Height="172" Width="209" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_selParticolari" ZOrder="19" X="676" Y="732" Height="172" Width="268" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_selPostazioni" ZOrder="16" X="402" Y="852" Height="172" Width="216" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_selSoggetti" ZOrder="12" X="754" Y="923" Height="153" Width="195" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_selAzioniUt" ZOrder="15" X="1049" Y="929" Height="115" Width="239" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:v_selUDC_SAO" ZOrder="6" X="220" Y="1074" Height="153" Width="215" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_selPartic_SAO" ZOrder="14" X="450" Y="1080" Height="153" Width="299" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_selOperatori" ZOrder="13" X="829" Y="1090" Height="134" Width="228" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_selTipoPart" ZOrder="10" X="1094" Y="1093" Height="115" Width="222" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:Config" ZOrder="7" X="25" Y="1075" Height="153" Width="183" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:RT_PageVal" ZOrder="5" X="25" Y="1241" Height="191" Width="253" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_selImballi" ZOrder="4" X="79" Y="876" Height="153" Width="212" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:RemoteRebootLog" ZOrder="3" X="38" Y="579" Height="172" Width="253" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:v_selFamLinea" ZOrder="2" X="1271" Y="452" Height="153" Width="227" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:v_selLinee" ZOrder="1" X="1303" Y="158" Height="229" Width="256" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
|
||||
</Shapes>
|
||||
<Connectors />
|
||||
</DiagramLayout>
|
||||
Generated
+1452
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TableUISettings />
|
||||
</DataSetUISetting>
|
||||
@@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema id="DS_batch" targetNamespace="http://tempuri.org/DS_batch.xsd" xmlns:mstns="http://tempuri.org/DS_batch.xsd" xmlns="http://tempuri.org/DS_batch.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
|
||||
<xs:annotation>
|
||||
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<Connections>
|
||||
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="GMWConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="GMWConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.GMW_data.Properties.Settings.GlobalReference.Default.GMWConnectionString" Provider="System.Data.SqlClient" />
|
||||
</Connections>
|
||||
<Tables>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="AS400_ComandiTableAdapter" GeneratorDataComponentClassName="AS400_ComandiTableAdapter" Name="AS400_Comandi" UserDataComponentName="AS400_ComandiTableAdapter">
|
||||
<MainSource>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.RawData.AS400_Comandi" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||
<InsertCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>INSERT INTO [RawData].[AS400_Comandi] ([DataEsecuzione], [Stored], [ComandoTSQL], [Test]) VALUES (@DataEsecuzione, @Stored, @ComandoTSQL, @Test)</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DataEsecuzione" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="DataEsecuzione" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Stored" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Stored" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@ComandoTSQL" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ComandoTSQL" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Test" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Test" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</InsertCommand>
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>SELECT DataEsecuzione, Stored, ComandoTSQL, Test FROM RawData.AS400_Comandi</CommandText>
|
||||
<Parameters />
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
</MainSource>
|
||||
<Mappings>
|
||||
<Mapping SourceColumn="DataEsecuzione" DataSetColumn="DataEsecuzione" />
|
||||
<Mapping SourceColumn="Stored" DataSetColumn="Stored" />
|
||||
<Mapping SourceColumn="ComandoTSQL" DataSetColumn="ComandoTSQL" />
|
||||
<Mapping SourceColumn="Test" DataSetColumn="Test" />
|
||||
</Mappings>
|
||||
<Sources>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.stp_ComAs_lastComandoByStored" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByStored" GetMethodModifier="Public" GetMethodName="getByStored" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByStored" UserSourceName="getByStored">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>dbo.stp_ComAs_lastComandoByStored</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Stored" Precision="0" ProviderType="NVarChar" Scale="0" Size="100" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.BatchQueue.stp_processaCodaMovimMag" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="stp_processaCodaMovimMag" Modifier="Public" Name="stp_processaCodaMovimMag" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="stp_processaCodaMovimMag">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>BatchQueue.stp_processaCodaMovimMag</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.BatchQueue.stp_processaCodaMovimPackList" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="stp_processaCodaMovimPackList" Modifier="Public" Name="stp_processaCodaMovimPackList" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="stp_processaCodaMovimPackList">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>BatchQueue.stp_processaCodaMovimPackList</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
</Sources>
|
||||
</TableAdapter>
|
||||
</Tables>
|
||||
<Sources />
|
||||
</DataSource>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:element name="DS_batch" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DS_batch" msprop:Generator_UserDSName="DS_batch">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="AS400_Comandi" msprop:Generator_TableClassName="AS400_ComandiDataTable" msprop:Generator_TableVarName="tableAS400_Comandi" msprop:Generator_TablePropName="AS400_Comandi" msprop:Generator_RowDeletingName="AS400_ComandiRowDeleting" msprop:Generator_RowChangingName="AS400_ComandiRowChanging" msprop:Generator_RowEvHandlerName="AS400_ComandiRowChangeEventHandler" msprop:Generator_RowDeletedName="AS400_ComandiRowDeleted" msprop:Generator_UserTableName="AS400_Comandi" msprop:Generator_RowChangedName="AS400_ComandiRowChanged" msprop:Generator_RowEvArgName="AS400_ComandiRowChangeEvent" msprop:Generator_RowClassName="AS400_ComandiRow">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="DataEsecuzione" msprop:Generator_ColumnVarNameInTable="columnDataEsecuzione" msprop:Generator_ColumnPropNameInRow="DataEsecuzione" msprop:Generator_ColumnPropNameInTable="DataEsecuzioneColumn" msprop:Generator_UserColumnName="DataEsecuzione" type="xs:dateTime" />
|
||||
<xs:element name="Stored" msprop:Generator_ColumnVarNameInTable="columnStored" msprop:Generator_ColumnPropNameInRow="Stored" msprop:Generator_ColumnPropNameInTable="StoredColumn" msprop:Generator_UserColumnName="Stored">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="100" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="ComandoTSQL" msprop:Generator_ColumnVarNameInTable="columnComandoTSQL" msprop:Generator_ColumnPropNameInRow="ComandoTSQL" msprop:Generator_ColumnPropNameInTable="ComandoTSQLColumn" msprop:Generator_UserColumnName="ComandoTSQL" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="4000" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Test" msprop:Generator_ColumnVarNameInTable="columnTest" msprop:Generator_ColumnPropNameInRow="Test" msprop:Generator_ColumnPropNameInTable="TestColumn" msprop:Generator_UserColumnName="Test" type="xs:int" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool to store the dataset designer's layout information.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:AS400_Comandi" ZOrder="1" X="311" Y="333" Height="191" Width="238" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
</Shapes>
|
||||
<Connectors />
|
||||
</DiagramLayout>
|
||||
Generated
+24933
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TableUISettings />
|
||||
</DataSetUISetting>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool to store the dataset designer's layout information.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="424" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:stp_prtCartByUDC" ZOrder="13" X="81" Y="41" Height="305" Width="249" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:stp_prtCartMatPrimaByUDC" ZOrder="12" X="388" Y="46" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:stp_prtCartLiquidi_F18ByUDC" ZOrder="11" X="1054" Y="52" Height="305" Width="236" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:stp_prtCartLiquidi_F10ByUDC" ZOrder="10" X="729" Y="54" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:PrintJobQueue" ZOrder="9" X="1047" Y="435" Height="324" Width="279" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
|
||||
<Shape ID="DesignTable:stp_prtCartAL" ZOrder="8" X="741" Y="798" Height="305" Width="224" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:stp_prtCartFinitiByUDC_SP" ZOrder="7" X="1011" Y="813" Height="305" Width="298" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:stp_prtCartFinitiByUDC" ZOrder="6" X="732" Y="398" Height="360" Width="278" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="292" />
|
||||
<Shape ID="DesignTable:stp_prtCartAnimeByUDC" ZOrder="5" X="104" Y="412" Height="305" Width="287" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:stp_prtCartFusiByUDC" ZOrder="4" X="434" Y="412" Height="305" Width="272" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:stp_prtCartSterratiByUDC" ZOrder="3" X="103" Y="782" Height="305" Width="292" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:stp_prtCartTrattatiByUDC" ZOrder="2" X="416" Y="782" Height="305" Width="293" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:stp_prtCartFinitiRxByUDC_SP" ZOrder="1" X="99" Y="1104" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
</Shapes>
|
||||
<Connectors />
|
||||
</DiagramLayout>
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace GMW_data
|
||||
{
|
||||
}
|
||||
namespace GMW_data
|
||||
{
|
||||
}
|
||||
namespace GMW_data
|
||||
{
|
||||
}
|
||||
namespace GMW_data
|
||||
{
|
||||
|
||||
|
||||
public partial class DS_magazzino
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
namespace GMW_data.DS_magazzinoTableAdapters {
|
||||
|
||||
|
||||
public partial class V_ParticolariOverviewTableAdapter {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TableUISettings />
|
||||
</DataSetUISetting>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,245 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool to store the dataset designer's layout information.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="44" ViewPortY="1792" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:ElencoCartellini" ZOrder="4" X="87" Y="230" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:AnagMag" ZOrder="29" X="1047" Y="389" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:PosizioneUdcCorrente" ZOrder="27" X="430" Y="545" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:PosizioneUdcStorico" ZOrder="12" X="472" Y="359" Height="172" Width="263" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:Blocchi" ZOrder="47" X="1072" Y="655" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
|
||||
<Shape ID="DesignTable:Celle" ZOrder="31" X="712" Y="420" Height="362" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
|
||||
<Shape ID="DesignTable:TipoCella" ZOrder="36" X="1007" Y="-15" Height="362" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
|
||||
<Shape ID="DesignTable:v_UdcDetail" ZOrder="21" X="693" Y="-21" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:AnagImballi" ZOrder="25" X="318" Y="-36" Height="172" Width="215" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:V_ParticolariOverview" ZOrder="38" X="95" Y="1131" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:V_MagazziniOverview" ZOrder="14" X="732" Y="1116" Height="362" Width="286" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:V_DettMagPart" ZOrder="34" X="1027" Y="998" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:TipoListaPrelievo" ZOrder="15" X="736" Y="876" Height="229" Width="244" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:RigheListePrelievo" ZOrder="39" X="86" Y="797" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:ElencoListePrelievo" ZOrder="26" X="430" Y="879" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:v_righeListePrelievoPosizione" ZOrder="40" X="400" Y="1301" Height="343" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
|
||||
<Shape ID="DesignTable:v_particolariEsponenteFigura" ZOrder="43" X="1042" Y="1386" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:AnagPosizioni" ZOrder="24" X="463" Y="152" Height="153" Width="227" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:V_statoCelleCapienzaAssegnati" ZOrder="41" X="111" Y="1437" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:V_MagazziniLogiciOverview" ZOrder="35" X="730" Y="1495" Height="267" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:RapQual" ZOrder="30" X="1071" Y="1633" Height="381" Width="292" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:v_posizioniDelibere" ZOrder="33" X="107" Y="1701" Height="134" Width="257" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:v_RapQualSunto" ZOrder="32" X="439" Y="1694" Height="286" Width="241" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:AnagParticolari" ZOrder="9" X="740" Y="2021" Height="362" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:AnagLeghe" ZOrder="28" X="131" Y="1854" Height="134" Width="210" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:StoricoAzioniOperatore" ZOrder="6" X="38" Y="2010" Height="324" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:stp_MagFifoByParticolare" ZOrder="7" X="281" Y="2015" Height="229" Width="293" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
|
||||
<Shape ID="DesignTable:stp_UDC_FifoByParticolareBlocco" ZOrder="1" X="48" Y="2407" Height="153" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:ElencoPostazioni" ZOrder="8" X="748" Y="1789" Height="210" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:AnagLinee" ZOrder="2" X="1075" Y="2068" Height="497" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="275" />
|
||||
<Shape ID="DesignTable:stp_ParticolareInOutOk" ZOrder="3" X="329" Y="2297" Height="97" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="46" />
|
||||
<Shape ID="DesignTable:Attr2UDC" ZOrder="10" X="-21" Y="-39" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
|
||||
<Shape ID="DesignTable:ElencoAssiemi" ZOrder="16" X="-137" Y="550" Height="324" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:AL2UDC" ZOrder="13" X="-138" Y="289" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:ElencoTrattamenti" ZOrder="17" X="-138" Y="928" Height="362" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
|
||||
<Shape ID="DesignTable:v_A2U2D" ZOrder="19" X="-143" Y="1320" Height="210" Width="197" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:UDC_check4delete" ZOrder="5" X="-134" Y="1656" Height="97" Width="251" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="46" />
|
||||
</Shapes>
|
||||
<Connectors>
|
||||
<Connector ID="DesignRelation:FK_PosizioneUdcCorrente_ElencoCartellini" ZOrder="52" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>387</X>
|
||||
<Y>611</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>430</X>
|
||||
<Y>611</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_PosizioneUdcStorico_ElencoCartellini" ZOrder="51" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>387</X>
|
||||
<Y>465</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>472</X>
|
||||
<Y>465</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_Blocchi_AnagMag" ZOrder="50" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1254</X>
|
||||
<Y>618</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1254</X>
|
||||
<Y>655</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_PosizioneUdcCorrente_Celle" ZOrder="42" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>712</X>
|
||||
<Y>528</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>695</X>
|
||||
<Y>528</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>695</X>
|
||||
<Y>545</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_Celle_Blocchi1" ZOrder="49" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1072</X>
|
||||
<Y>754</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1012</X>
|
||||
<Y>754</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_TipoCella_AnagMag" ZOrder="48" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1139</X>
|
||||
<Y>389</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1139</X>
|
||||
<Y>347</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_RigheListePrelievo_ElencoCartellini" ZOrder="46" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>219</X>
|
||||
<Y>611</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>219</X>
|
||||
<Y>797</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_RigheListePrelievo_ElencoListePrelievo11" ZOrder="45" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>430</X>
|
||||
<Y>926</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>386</X>
|
||||
<Y>926</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_ElencoListePrelievo_TipoListaPrelievo11" ZOrder="44" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>736</X>
|
||||
<Y>992</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>730</X>
|
||||
<Y>992</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_ElencoCartellini_AnagPosizioni" ZOrder="11" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>480</X>
|
||||
<Y>305</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>480</X>
|
||||
<Y>344</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>387</X>
|
||||
<Y>344</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_Celle_TipoCella" ZOrder="37" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1029</X>
|
||||
<Y>347</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1029</X>
|
||||
<Y>437</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1012</X>
|
||||
<Y>437</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_Attr2UDC_ElencoCartellini" ZOrder="23" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>192</X>
|
||||
<Y>230</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>192</X>
|
||||
<Y>209</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_AL2UDC_ElencoAssiemi" ZOrder="20" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>-39</X>
|
||||
<Y>550</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>-39</X>
|
||||
<Y>518</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_AL2UDC_ElencoCartellini" ZOrder="22" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>87</X>
|
||||
<Y>254</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>-27</X>
|
||||
<Y>254</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>-27</X>
|
||||
<Y>289</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_ElencoTrattamenti_ElencoAssiemi" ZOrder="18" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>-47</X>
|
||||
<Y>874</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>-47</X>
|
||||
<Y>928</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
</Connectors>
|
||||
</DiagramLayout>
|
||||
Generated
+45847
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,163 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SteamWare;
|
||||
|
||||
namespace GMW_data
|
||||
{
|
||||
/// <summary>
|
||||
/// fa da proxy singleton x gli oggetti legati ai DATAMATRIX
|
||||
/// </summary>
|
||||
public class DataMatrix
|
||||
{
|
||||
#region area table adapters
|
||||
|
||||
public DS_DataMatrixTableAdapters.ElencoDataMatrixTableAdapter taElencoDM;
|
||||
public DS_DataMatrixTableAdapters.v_trasfDataMatrixTableAdapter taDtMtxOrig;
|
||||
public DS_DataMatrixTableAdapters.stp_verificaDtxTableAdapter taVerifica;
|
||||
public DS_DataMatrixTableAdapters.stp_decodeDtxTableAdapter taDecode;
|
||||
public DS_DataMatrixTableAdapters.stp_conteggioDtxTableAdapter taConteggio;
|
||||
public DS_DataMatrixTableAdapters.v_DtxAcquisitiTableAdapter taDtxAcq;
|
||||
public DS_DataMatrixTableAdapters.Dtx2UDCTableAdapter taDtx2UDC;
|
||||
public DS_DataMatrixTableAdapters.stp_getFirstLastDtxTableAdapter taFirstLastUdc;
|
||||
public DS_DataMatrixTableAdapters.stp_DtxGetAvailFreeAnomTableAdapter taDtxAvailFree;
|
||||
public DS_DataMatrixTableAdapters.stp_DtxCheckBlockedTableAdapter taDtxBlocked;
|
||||
public DS_DataMatrixTableAdapters.Attr2DtxTableAdapter taAtt2Dtx;
|
||||
public DS_DataMatrixTableAdapters.AnagFormatiDtmxTableAdapter taAnagFormDtx;
|
||||
public DS_DataMatrixTableAdapters.v_DtxAcquisitiTableAdapter taDtxAcquisiti;
|
||||
public DS_DataMatrixTableAdapters.v_ElencoDmtxTableAdapter taVED;
|
||||
public DS_DataMatrixTableAdapters.TabSpecDtxTableAdapter taSpecDtmx;
|
||||
public DS_DataMatrixTableAdapters.TrascPartNumTableAdapter taTPN;
|
||||
public DS_DataMatrixTableAdapters.TrascDatamatrixTableAdapter taTDtmx;
|
||||
|
||||
/// <summary>
|
||||
/// init dei table adapters
|
||||
/// </summary>
|
||||
protected void initTA()
|
||||
{
|
||||
taElencoDM = new GMW_data.DS_DataMatrixTableAdapters.ElencoDataMatrixTableAdapter();
|
||||
taDtMtxOrig = new GMW_data.DS_DataMatrixTableAdapters.v_trasfDataMatrixTableAdapter();
|
||||
taDtMtxOrig = new GMW_data.DS_DataMatrixTableAdapters.v_trasfDataMatrixTableAdapter();
|
||||
taVerifica = new DS_DataMatrixTableAdapters.stp_verificaDtxTableAdapter();
|
||||
taDecode = new DS_DataMatrixTableAdapters.stp_decodeDtxTableAdapter();
|
||||
taConteggio = new DS_DataMatrixTableAdapters.stp_conteggioDtxTableAdapter();
|
||||
taDtxAcq = new DS_DataMatrixTableAdapters.v_DtxAcquisitiTableAdapter();
|
||||
taDtx2UDC = new DS_DataMatrixTableAdapters.Dtx2UDCTableAdapter();
|
||||
taFirstLastUdc = new DS_DataMatrixTableAdapters.stp_getFirstLastDtxTableAdapter();
|
||||
taDtxAvailFree = new DS_DataMatrixTableAdapters.stp_DtxGetAvailFreeAnomTableAdapter();
|
||||
taDtxBlocked = new DS_DataMatrixTableAdapters.stp_DtxCheckBlockedTableAdapter();
|
||||
taAtt2Dtx = new DS_DataMatrixTableAdapters.Attr2DtxTableAdapter();
|
||||
taAnagFormDtx = new DS_DataMatrixTableAdapters.AnagFormatiDtmxTableAdapter();
|
||||
taDtxAcquisiti = new DS_DataMatrixTableAdapters.v_DtxAcquisitiTableAdapter();
|
||||
taVED = new DS_DataMatrixTableAdapters.v_ElencoDmtxTableAdapter();
|
||||
taSpecDtmx = new DS_DataMatrixTableAdapters.TabSpecDtxTableAdapter();
|
||||
taTPN = new DS_DataMatrixTableAdapters.TrascPartNumTableAdapter();
|
||||
taTDtmx = new DS_DataMatrixTableAdapters.TrascDatamatrixTableAdapter();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua setup dei connection strings da web.config delal singola applicazione
|
||||
/// </summary>
|
||||
protected virtual void setupConnectionStringBase()
|
||||
{
|
||||
// connections strings del db verso GMW
|
||||
string connString = memLayer.ML.confReadString("GMWConnectionString");
|
||||
taElencoDM.Connection.ConnectionString = connString;
|
||||
taDtMtxOrig.Connection.ConnectionString = connString;
|
||||
taVerifica.Connection.ConnectionString = connString;
|
||||
taDecode.Connection.ConnectionString = connString;
|
||||
taConteggio.Connection.ConnectionString = connString;
|
||||
taDtxAcq.Connection.ConnectionString = connString;
|
||||
taDtx2UDC.Connection.ConnectionString = connString;
|
||||
taFirstLastUdc.Connection.ConnectionString = connString;
|
||||
taDtxAvailFree.Connection.ConnectionString = connString;
|
||||
taDtxBlocked.Connection.ConnectionString = connString;
|
||||
taAtt2Dtx.Connection.ConnectionString = connString;
|
||||
taAnagFormDtx.Connection.ConnectionString = connString;
|
||||
taDtxAcquisiti.Connection.ConnectionString = connString;
|
||||
taVED.Connection.ConnectionString = connString;
|
||||
taSpecDtmx.Connection.ConnectionString = connString;
|
||||
taTPN.Connection.ConnectionString = connString;
|
||||
taTDtmx.Connection.ConnectionString = connString;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected DataMatrix()
|
||||
{
|
||||
initTA();
|
||||
setupConnectionStringBase();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// singleton datamatrix
|
||||
/// </summary>
|
||||
public static DataMatrix mgr = new DataMatrix();
|
||||
/// <summary>
|
||||
/// effettua import nuovi dati datamatrix/gitterbox
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool importNuoviDati()
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
taElencoDM.stp_DtMtrx_import(memLayer.ML.confReadString("CodCS"), memLayer.ML.confReadInt("IdxPosizioneOdette"), MagClass.magazzino.CodSoggCurrUser);
|
||||
answ = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce codice gitterbox dato datamatrix
|
||||
/// </summary>
|
||||
/// <param name="codDataMatrix"></param>
|
||||
/// <returns></returns>
|
||||
public string gitterboxFromDataMatrix(decimal codDataMatrix)
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = taElencoDM.getByCode(codDataMatrix)[0].CodGitterbox;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce codice gitterbox ORIGINALE (pre import) dato datamatrix
|
||||
/// </summary>
|
||||
/// <param name="codDataMatrix"></param>
|
||||
/// <returns></returns>
|
||||
public string gitterboxOrigFromDataMatrix(decimal codDataMatrix)
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = DataMatrix.mgr.taDtMtxOrig.getByDtMtx(codDataMatrix.ToString())[0].CodGitterbox;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica SE il codice datamatrix POSSA rappresentare un codice valido, ovvero
|
||||
/// - lunghezza compatibile coi formati supportati
|
||||
/// - decodifica datamatrix (da formato plausibile, 1 o +) con esito positivo
|
||||
/// </summary>
|
||||
/// <param name="DataMatrix"></param>
|
||||
/// <returns></returns>
|
||||
public bool maybeDatamatrix(string DataMatrix)
|
||||
{
|
||||
bool answ = false;
|
||||
// provo a verificare direttamente con score function...
|
||||
DS_DataMatrix.AnagFormatiDtmxDataTable tab = taAnagFormDtx.getFormatiCompatibili(DataMatrix);
|
||||
if (tab.Rows.Count > 0)
|
||||
{
|
||||
answ = true;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SteamWare;
|
||||
|
||||
namespace GMW_data
|
||||
{
|
||||
/// <summary>
|
||||
/// fa da proxy singleton x gli oggetti applicativi
|
||||
/// </summary>
|
||||
public class DataProxy
|
||||
{
|
||||
#region area table adapters
|
||||
|
||||
public DS_ApplicazioneTableAdapters.AnagBilanceTableAdapter taAnagBil;
|
||||
public DS_ApplicazioneTableAdapters.AnagClientiTableAdapter taAnagClienti;
|
||||
public DS_ApplicazioneTableAdapters.AnagCompanySitoTableAdapter taAnagCS;
|
||||
public DS_ApplicazioneTableAdapters.AnagImballiTableAdapter taAnagImballi;
|
||||
public DS_ApplicazioneTableAdapters.AnagImpiantiTableAdapter taAnagImp;
|
||||
public DS_ApplicazioneTableAdapters.AnagFamiglieTableAdapter taAnagFamiglie;
|
||||
public DS_ApplicazioneTableAdapters.AnagOperatoriTableAdapter taAnagOperatore;
|
||||
public DS_ApplicazioneTableAdapters.AnagParticolariTableAdapter taAnagParticolari;
|
||||
public DS_ApplicazioneTableAdapters.v_ArtInProdTableAdapter taArtInProd;
|
||||
public DS_ApplicazioneTableAdapters.ElencoCartelliniTableAdapter taCartellini;
|
||||
public DS_ApplicazioneTableAdapters.ElencoPostazioniTableAdapter taElPost;
|
||||
public DS_ApplicazioneTableAdapters.ElencoNCTableAdapter taENC;
|
||||
public DS_ApplicazioneTableAdapters.RelazUDCTableAdapter taRelazUDC;
|
||||
public DS_ApplicazioneTableAdapters.v_RapQualNoteTableAdapter taRQN;
|
||||
public DS_ApplicazioneTableAdapters.Soggetti2UtenteTableAdapter taSogg2Oper;
|
||||
public DS_ApplicazioneTableAdapters.v_specParticolariTableAdapter taSpecPart;
|
||||
public DS_ApplicazioneTableAdapters.AnagStatiProdottoTableAdapter taStatiProd;
|
||||
public DS_ApplicazioneTableAdapters.AnagTipoDichiarazTableAdapter taTipoDich;
|
||||
public DS_ApplicazioneTableAdapters.TrascCodSoggTableAdapter taTrascSogg;
|
||||
public DS_ApplicazioneTableAdapters.UDC_NCTableAdapter taUDC2NC;
|
||||
public DS_ApplicazioneTableAdapters.UNC_treeTableAdapter taUNCTree;
|
||||
|
||||
public DS_cartelliniTableAdapters.stp_prtCartByUDCTableAdapter taPrtCart;
|
||||
public DS_cartelliniTableAdapters.stp_prtCartALTableAdapter taPrtCartAL;
|
||||
public DS_cartelliniTableAdapters.stp_prtCartAnimeByUDCTableAdapter taPrtCartAnime;
|
||||
public DS_cartelliniTableAdapters.stp_prtCartFinitiByUDCTableAdapter taPrtCartFiniti;
|
||||
public DS_cartelliniTableAdapters.stp_prtCartFinitiByUDC_SPTableAdapter taPrtCartFinitiSP;
|
||||
public DS_cartelliniTableAdapters.stp_prtCartFinitiRxByUDC_SPTableAdapter taPrtCartFinitiRxSP;
|
||||
public DS_cartelliniTableAdapters.stp_prtCartFusiByUDCTableAdapter taPrtCartFusi;
|
||||
public DS_cartelliniTableAdapters.stp_prtCartLiquidi_F10ByUDCTableAdapter taPrtCartLiqF10;
|
||||
public DS_cartelliniTableAdapters.stp_prtCartLiquidi_F18ByUDCTableAdapter taPrtCartLiqF18;
|
||||
public DS_cartelliniTableAdapters.stp_prtCartMatPrimaByUDCTableAdapter taPrtCartMP;
|
||||
public DS_cartelliniTableAdapters.stp_prtCartSterratiByUDCTableAdapter taPrtCartSterrati;
|
||||
public DS_cartelliniTableAdapters.stp_prtCartTrattatiByUDCTableAdapter taPrtCartTratt;
|
||||
public DS_cartelliniTableAdapters.PrintJobQueueTableAdapter taPJQ;
|
||||
|
||||
/// <summary>
|
||||
/// init dei table adapters
|
||||
/// </summary>
|
||||
protected void initTA()
|
||||
{
|
||||
taAnagBil = new GMW_data.DS_ApplicazioneTableAdapters.AnagBilanceTableAdapter();
|
||||
taAnagClienti = new GMW_data.DS_ApplicazioneTableAdapters.AnagClientiTableAdapter();
|
||||
taAnagCS = new GMW_data.DS_ApplicazioneTableAdapters.AnagCompanySitoTableAdapter();
|
||||
taAnagImballi = new GMW_data.DS_ApplicazioneTableAdapters.AnagImballiTableAdapter();
|
||||
taAnagImp = new GMW_data.DS_ApplicazioneTableAdapters.AnagImpiantiTableAdapter();
|
||||
taAnagFamiglie = new GMW_data.DS_ApplicazioneTableAdapters.AnagFamiglieTableAdapter();
|
||||
taAnagOperatore = new GMW_data.DS_ApplicazioneTableAdapters.AnagOperatoriTableAdapter();
|
||||
taAnagParticolari = new GMW_data.DS_ApplicazioneTableAdapters.AnagParticolariTableAdapter();
|
||||
taArtInProd = new GMW_data.DS_ApplicazioneTableAdapters.v_ArtInProdTableAdapter();
|
||||
taCartellini = new GMW_data.DS_ApplicazioneTableAdapters.ElencoCartelliniTableAdapter();
|
||||
taElPost = new GMW_data.DS_ApplicazioneTableAdapters.ElencoPostazioniTableAdapter();
|
||||
taENC = new GMW_data.DS_ApplicazioneTableAdapters.ElencoNCTableAdapter();
|
||||
taRelazUDC = new GMW_data.DS_ApplicazioneTableAdapters.RelazUDCTableAdapter();
|
||||
taRQN = new GMW_data.DS_ApplicazioneTableAdapters.v_RapQualNoteTableAdapter();
|
||||
taSogg2Oper = new GMW_data.DS_ApplicazioneTableAdapters.Soggetti2UtenteTableAdapter();
|
||||
taSpecPart = new GMW_data.DS_ApplicazioneTableAdapters.v_specParticolariTableAdapter();
|
||||
taStatiProd = new GMW_data.DS_ApplicazioneTableAdapters.AnagStatiProdottoTableAdapter();
|
||||
taTipoDich = new GMW_data.DS_ApplicazioneTableAdapters.AnagTipoDichiarazTableAdapter();
|
||||
taTrascSogg = new GMW_data.DS_ApplicazioneTableAdapters.TrascCodSoggTableAdapter();
|
||||
taUDC2NC = new GMW_data.DS_ApplicazioneTableAdapters.UDC_NCTableAdapter();
|
||||
taUNCTree = new GMW_data.DS_ApplicazioneTableAdapters.UNC_treeTableAdapter();
|
||||
|
||||
taPrtCart = new GMW_data.DS_cartelliniTableAdapters.stp_prtCartByUDCTableAdapter();
|
||||
taPrtCartAL = new DS_cartelliniTableAdapters.stp_prtCartALTableAdapter();
|
||||
taPrtCartAnime = new GMW_data.DS_cartelliniTableAdapters.stp_prtCartAnimeByUDCTableAdapter();
|
||||
taPrtCartFiniti = new DS_cartelliniTableAdapters.stp_prtCartFinitiByUDCTableAdapter();
|
||||
taPrtCartFinitiRxSP = new DS_cartelliniTableAdapters.stp_prtCartFinitiRxByUDC_SPTableAdapter();
|
||||
taPrtCartFinitiSP = new DS_cartelliniTableAdapters.stp_prtCartFinitiByUDC_SPTableAdapter();
|
||||
taPrtCartFusi = new DS_cartelliniTableAdapters.stp_prtCartFusiByUDCTableAdapter();
|
||||
taPrtCartLiqF10 = new GMW_data.DS_cartelliniTableAdapters.stp_prtCartLiquidi_F10ByUDCTableAdapter();
|
||||
taPrtCartLiqF18 = new GMW_data.DS_cartelliniTableAdapters.stp_prtCartLiquidi_F18ByUDCTableAdapter();
|
||||
taPrtCartMP = new GMW_data.DS_cartelliniTableAdapters.stp_prtCartMatPrimaByUDCTableAdapter();
|
||||
taPrtCartSterrati = new DS_cartelliniTableAdapters.stp_prtCartSterratiByUDCTableAdapter();
|
||||
taPrtCartTratt = new DS_cartelliniTableAdapters.stp_prtCartTrattatiByUDCTableAdapter();
|
||||
taPJQ = new DS_cartelliniTableAdapters.PrintJobQueueTableAdapter();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua setup dei connection strings da web.config delal singola applicazione
|
||||
/// </summary>
|
||||
protected virtual void setupConnectionStringBase()
|
||||
{
|
||||
string connString = memLayer.ML.confReadString("GMWConnectionString");
|
||||
// connections strings del db
|
||||
taAnagBil.Connection.ConnectionString = connString;
|
||||
taAnagClienti.Connection.ConnectionString = connString;
|
||||
taAnagCS.Connection.ConnectionString = connString;
|
||||
taAnagFamiglie.Connection.ConnectionString = connString;
|
||||
taAnagImballi.Connection.ConnectionString = connString;
|
||||
taAnagImp.Connection.ConnectionString = connString;
|
||||
taAnagOperatore.Connection.ConnectionString = connString;
|
||||
taAnagParticolari.Connection.ConnectionString = connString;
|
||||
taArtInProd.Connection.ConnectionString = connString;
|
||||
taCartellini.Connection.ConnectionString = connString;
|
||||
taElPost.Connection.ConnectionString = connString;
|
||||
taENC.Connection.ConnectionString = connString;
|
||||
taRelazUDC.Connection.ConnectionString = connString;
|
||||
taRQN.Connection.ConnectionString = connString;
|
||||
taSogg2Oper.Connection.ConnectionString = connString;
|
||||
taSpecPart.Connection.ConnectionString = connString;
|
||||
taStatiProd.Connection.ConnectionString = connString;
|
||||
taTipoDich.Connection.ConnectionString = connString;
|
||||
taTrascSogg.Connection.ConnectionString = connString;
|
||||
taUDC2NC.Connection.ConnectionString = connString;
|
||||
taUNCTree.Connection.ConnectionString = connString;
|
||||
|
||||
taPrtCart.Connection.ConnectionString = connString;
|
||||
taPrtCartAL.Connection.ConnectionString = connString;
|
||||
taPrtCartAnime.Connection.ConnectionString = connString;
|
||||
taPrtCartFiniti.Connection.ConnectionString = connString;
|
||||
taPrtCartFinitiRxSP.Connection.ConnectionString = connString;
|
||||
taPrtCartFinitiSP.Connection.ConnectionString = connString;
|
||||
taPrtCartFusi.Connection.ConnectionString = connString;
|
||||
taPrtCartLiqF10.Connection.ConnectionString = connString;
|
||||
taPrtCartLiqF18.Connection.ConnectionString = connString;
|
||||
taPrtCartMP.Connection.ConnectionString = connString;
|
||||
taPrtCartSterrati.Connection.ConnectionString = connString;
|
||||
taPrtCartTratt.Connection.ConnectionString = connString;
|
||||
taPJQ.Connection.ConnectionString = connString;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected DataProxy()
|
||||
{
|
||||
initTA();
|
||||
setupConnectionStringBase();
|
||||
}
|
||||
|
||||
|
||||
public static DataProxy obj = new DataProxy();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,578 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{47143721-A018-4BDA-B544-EC3E10BC87A2}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>GMW_data</RootNamespace>
|
||||
<AssemblyName>GMW_data</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'InstallerTK|AnyCPU' ">
|
||||
<OutputPath>bin\InstallerTK\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'InstallerSP|AnyCPU' ">
|
||||
<OutputPath>bin\InstallerSP\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'SP_test|AnyCPU'">
|
||||
<OutputPath>bin\SP_test\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\InstallerSP\GMW_data.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'SP_prod|AnyCPU'">
|
||||
<OutputPath>bin\SP_prod\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\InstallerSP\GMW_data.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'TK_prod|AnyCPU'">
|
||||
<OutputPath>bin\TK_prod\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\InstallerSP\GMW_data.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'TK_test|AnyCPU'">
|
||||
<OutputPath>bin\TK_test\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\InstallerSP\GMW_data.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '218_SP|AnyCPU'">
|
||||
<OutputPath>bin\218_SP\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'IIS02_SP|AnyCPU'">
|
||||
<OutputPath>bin\IIS02_SP\</OutputPath>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'IIS02_TK|AnyCPU'">
|
||||
<OutputPath>bin\IIS02_TK\</OutputPath>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'IIS01_SP|AnyCPU'">
|
||||
<OutputPath>bin\IIS01_SP\</OutputPath>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'IIS01_TK|AnyCPU'">
|
||||
<OutputPath>bin\IIS01_TK\</OutputPath>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.ReportViewer.WinForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
|
||||
<Reference Include="SteamWare, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>ExtLib\SteamWare.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DataMatrix.cs" />
|
||||
<Compile Include="DataProxy.cs" />
|
||||
<Compile Include="DS_Applicazione.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DS_Applicazione.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DS_batch.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DS_batch.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DS_cartellini.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DS_cartellini.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DS_DataMatrix.cs">
|
||||
<DependentUpon>DS_DataMatrix.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DS_DataMatrix1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DS_DataMatrix.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DS_magazzino.cs">
|
||||
<DependentUpon>DS_magazzino.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DS_magazzino1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DS_magazzino.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DS_Odette.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DS_Odette.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DS_SM.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DS_SM.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DS_Utility.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DS_Utility.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="bCodePrinter.cs" />
|
||||
<Compile Include="MagClass.cs" />
|
||||
<Compile Include="Odette.cs" />
|
||||
<Compile Include="OpAuth.cs" />
|
||||
<Compile Include="Postazione.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="reportPrinter.cs" />
|
||||
<Compile Include="selData.cs" />
|
||||
<Compile Include="selDataVoc.cs" />
|
||||
<Compile Include="StateMachine.cs" />
|
||||
<Compile Include="TermClass.cs" />
|
||||
<Compile Include="Type\ArtInProd.cs" />
|
||||
<Compile Include="Type\Bilancia.cs" />
|
||||
<Compile Include="Type\BlockMap.cs" />
|
||||
<Compile Include="Type\Cartellino.cs" />
|
||||
<Compile Include="Type\Cliente.cs" />
|
||||
<Compile Include="Type\CompanySito.cs" />
|
||||
<Compile Include="Type\elenchi.cs" />
|
||||
<Compile Include="Type\Imballo.cs" />
|
||||
<Compile Include="Type\Impianto.cs" />
|
||||
<Compile Include="Type\Operatore.cs" />
|
||||
<Compile Include="Type\SpecParticolare.cs" />
|
||||
<Compile Include="Type\StatiProdotto.cs" />
|
||||
<Compile Include="Type\TipoDichiarazione.cs" />
|
||||
<Compile Include="UserControl.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControlBCodeMan.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="utils.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="DS_Applicazione.xsc">
|
||||
<DependentUpon>DS_Applicazione.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_Applicazione.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>DS_Applicazione.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="DS_Applicazione.xss">
|
||||
<DependentUpon>DS_Applicazione.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_batch.xsc">
|
||||
<DependentUpon>DS_batch.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_batch.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>DS_batch.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="DS_batch.xss">
|
||||
<DependentUpon>DS_batch.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_cartellini.xsc">
|
||||
<DependentUpon>DS_cartellini.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_cartellini.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>DS_cartellini.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="DS_cartellini.xss">
|
||||
<DependentUpon>DS_cartellini.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_DataMatrix.xsc">
|
||||
<DependentUpon>DS_DataMatrix.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_DataMatrix.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>DS_DataMatrix1.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="DS_DataMatrix.xss">
|
||||
<DependentUpon>DS_DataMatrix.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_magazzino.xsc">
|
||||
<DependentUpon>DS_magazzino.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_magazzino.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>DS_magazzino1.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="DS_magazzino.xss">
|
||||
<DependentUpon>DS_magazzino.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_Odette.xsc">
|
||||
<DependentUpon>DS_Odette.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_Odette.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>DS_Odette.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="DS_Odette.xss">
|
||||
<DependentUpon>DS_Odette.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_SM.xsc">
|
||||
<DependentUpon>DS_SM.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_SM.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>DS_SM.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="DS_SM.xss">
|
||||
<DependentUpon>DS_SM.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_Utility.xsc">
|
||||
<DependentUpon>DS_Utility.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DS_Utility.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>DS_Utility.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="DS_Utility.xss">
|
||||
<DependentUpon>DS_Utility.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="GMW_vs_SP_GMWTest.scmp" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="SqlScripts\V1.1\GMW_00400.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00399.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00392.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00391.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00390.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00385.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00370.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00365.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00361.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00350.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00345.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00340.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00336.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00335.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00327.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00326.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00325.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00320.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00315.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00310.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00305.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00299.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00291.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00290.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00289.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00288.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00287.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00286.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00285.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00280.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00276.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00275.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00270.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00265.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00260.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00259.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00258.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00257.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00255.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00250.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00240.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00245.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00235.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00220.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00215.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00051.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00052.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00070.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00080.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00081.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00082.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00083.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00084.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00085.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00090.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00095.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00100.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00105.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00110.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00160.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00200.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00225.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00230.sql" />
|
||||
<None Include="SqlScripts\V1.1\GMW_00360.sql" />
|
||||
<None Include="SqlScripts\V1.2\Anagrafica\GMW_anag_tekal_435.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00440.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00436-SP-Data.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00436-TK-Data.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00437-SP.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00436-SP.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00436-TK.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00435.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00432.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00430.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00427.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00426.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00425.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00414.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00437-TK-01.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00437-TK-02-DATA.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00437-TK-03-da fare dopo DATA.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_410_TEKAL\01-Da TK_GMWTEst 395 a 409 TABELLE.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_410_TEKAL\02-Da TK_GMWTEst 395 a 409 STORED.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_410_TEKAL\03-Da TK_GMWTEst 395 a 409 VISTE.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_410_TEKAL\GMW_00410.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00415.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00409.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00408.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00407.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00403.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00402.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_00401.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_410_TEKAL\SincVocabolario_TK_409.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_440_POST Installazione_SP.sql" />
|
||||
<None Include="SqlScripts\V1.2\GMW_440_POST Installazione_TK.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00460.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00452_dati.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00452_stored.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00451_eventoGian.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00451_storedGian.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00450_dati.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00449_struttura.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00452_Stored_BIS.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00452_dati_2.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00452_dati_3.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_460.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_453.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_435.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_431_TK.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_431_SP.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_432.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_426.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_425.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_409.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_401.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_000.sql" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ExtLib\SteamWare.dll" />
|
||||
<Content Include="SqlScripts\V1.2\GMW_410_TEKAL\Sincroniz da TK_GMWTest a TK_GMW NON USARE.txt" />
|
||||
<Content Include="SqlScripts\V2.2_TK\GMW_00571.sql" />
|
||||
<Content Include="SqlScripts\V2.2_TK\GMW_00570.sql" />
|
||||
<Content Include="SqlScripts\V2.2_TK\GMW_00569.sql" />
|
||||
<Content Include="SqlScripts\V3.3_SP\Vers_3.3_SP.sql" />
|
||||
<Content Include="SqlScripts\V3.3_SP\Vers_3.3_SP.01.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_562.sql" />
|
||||
<None Include="SqlScripts\V2.2_TK\GMW_00550.sql" />
|
||||
<None Include="SqlScripts\V2.2_TK\GMW_00562.sql" />
|
||||
<Content Include="SqlScripts\V2.2_TK\GMW_00540_pre_Install.sql" />
|
||||
<None Include="SqlScripts\V2.2_TK\GMW_00540.sql" />
|
||||
<None Include="SqlScripts\V2.2_TK\GMW_00533.sql" />
|
||||
<None Include="SqlScripts\V2.2_TK\GMW_00531.sql" />
|
||||
<None Include="SqlScripts\V2.2_TK\GMW_00530.sql" />
|
||||
<None Include="SqlScripts\V2.1_TK\GMW_00519.sql" />
|
||||
<None Include="SqlScripts\V2.1_SP\GMW_00519.sql" />
|
||||
<None Include="SqlScripts\V2.1_SP\GMW_00515.sql" />
|
||||
<None Include="SqlScripts\V2.1_SP\GMW_00505.sql" />
|
||||
<None Include="SqlScripts\V2.1_SP\GMW_00510.sql" />
|
||||
<None Include="SqlScripts\V2.1_SP\GMW_00500.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_518.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_517.sql" />
|
||||
<None Include="SqlScripts\V2.1_TK\GMW_00516.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_516.sql" />
|
||||
<None Include="SqlScripts\V2.1_TK\GMW_00514.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_514.sql" />
|
||||
<None Include="SqlScripts\V2.1_TK\GMW_00512.sql" />
|
||||
<None Include="SqlScripts\V2.1_TK\GMW_00511.sql" />
|
||||
<None Include="SqlScripts\V2.1_TK\GMW_00510.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_510.sql" />
|
||||
<None Include="SqlScripts\V2.1_TK\GMW_00509.sql" />
|
||||
<None Include="SqlScripts\V2.1_TK\GMW_00505.sql" />
|
||||
<None Include="SqlScripts\V2.1_TK\GMW_00501.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_501.sql" />
|
||||
<None Include="SqlScripts\V2.1_TK\GMW_00499.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_499.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_495.sql" />
|
||||
<None Include="SqlScripts\V2.1_TK\GMW_00495.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_490.sql" />
|
||||
<None Include="SqlScripts\V2.1_TK\GMW_00490.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00463_SP_test.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00463.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00462.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00461.sql" />
|
||||
<None Include="SqlScripts\V2.0\GMW_00452_Sistemazione Viste TOP.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_463.sql" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="bin\" />
|
||||
<Folder Include="SqlScripts\V2.2_SP\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishUrlHistory />
|
||||
<InstallUrlHistory />
|
||||
<SupportUrlHistory />
|
||||
<UpdateUrlHistory />
|
||||
<BootstrapperUrlHistory />
|
||||
<ErrorReportUrlHistory />
|
||||
<FallbackCulture>en-US</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,849 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<SchemaComparison>
|
||||
<Version>10</Version>
|
||||
<SourceModelProvider>
|
||||
<ConnectionBasedModelProvider>
|
||||
<ConnectionString>Data Source=SQL-STEAM\SQL2012;Initial Catalog=GMW;Integrated Security=True;Pooling=False</ConnectionString>
|
||||
</ConnectionBasedModelProvider>
|
||||
</SourceModelProvider>
|
||||
<TargetModelProvider>
|
||||
<ConnectionBasedModelProvider>
|
||||
<ConnectionString>Data Source=SQL-STEAM\SQL2012;Initial Catalog=SP_GMWTest;Integrated Security=True;Pooling=False</ConnectionString>
|
||||
</ConnectionBasedModelProvider>
|
||||
</TargetModelProvider>
|
||||
<SchemaCompareSettingsService>
|
||||
<SchemaCompareSettingsService>
|
||||
<PropertyElementName>
|
||||
<Name>Version</Name>
|
||||
<Value>1</Value>
|
||||
</PropertyElementName>
|
||||
</SchemaCompareSettingsService>
|
||||
<ConfigurationOptionsElement>
|
||||
<PropertyElementName>
|
||||
<Name>PlanGenerationType</Name>
|
||||
<Value>SqlDeploymentOptions</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>AllowExistingModelErrors</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>AllowIncompatiblePlatform</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>BackupDatabaseBeforeChanges</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>BlockOnPossibleDataLoss</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>BlockWhenDriftDetected</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>CompareUsingTargetCollation</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>CommentOutSetVarDeclarations</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>CreateNewDatabase</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DeployDatabaseInSingleUserMode</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DisableAndReenableDdlTriggers</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DoNotAlterChangeDataCaptureObjects</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DoNotAlterReplicatedObjects</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropConstraintsNotInSource</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropDmlTriggersNotInSource</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropExtendedPropertiesNotInSource</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropIndexesNotInSource</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropPermissionsNotInSource</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropObjectsNotInSource</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropRoleMembersNotInSource</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropStatisticsNotInSource</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>GenerateSmartDefaults</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreDdlTriggerOrder</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreDdlTriggerState</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreObjectPlacementOnPartitionScheme</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreAuthorizer</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreDefaultSchema</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreRouteLifetime</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreCryptographicProviderFilePath</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreComments</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreWhitespace</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreKeywordCasing</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreSemicolonBetweenStatements</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnorePartitionSchemes</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreWithNocheckOnCheckConstraints</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreWithNocheckOnForeignKeys</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreIdentitySeed</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreIncrement</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreFillFactor</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreIndexPadding</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreColumnCollation</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreLockHintsOnIndexes</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreTableOptions</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreIndexOptions</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreDmlTriggerOrder</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreDmlTriggerState</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreAnsiNulls</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreQuotedIdentifiers</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreUserSettingsObjects</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreFilegroupPlacement</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreFullTextCatalogFilePath</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreFileAndLogFilePath</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreLoginSids</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreNotForReplication</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreFileSize</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IncludeCompositeObjects</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IncludeTransactionalScripts</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>NoAlterStatementsToChangeCLRTypes</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>PopulateFilesOnFileGroups</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>RegisterDataTierApplication</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>ScriptDatabaseCollation</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>ScriptDatabaseCompatibility</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>ScriptDatabaseOptions</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>ScriptDeployStateChecks</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>ScriptFileSize</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>ScriptNewConstraintValidation</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>ScriptRefreshModule</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>TargetDatabaseName</Name>
|
||||
<Value>SP_GMWTest</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>TargetConnectionString</Name>
|
||||
<Value>Data Source=SQL-STEAM\SQL2012;Initial Catalog=SP_GMWTest;Integrated Security=True;Pooling=False;MultipleActiveResultSets=False;Application Name="Microsoft SQL Server Data Tools, Schema Compare"</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>TreatVerificationErrorsAsWarnings</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>UnmodifiableObjectWarnings</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>VerifyCollationCompatibility</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>VerifyDeployment</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>RunDeploymentPlanExecutors</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>AllowDropBlockingAssemblies</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlServerDdlTrigger</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlRoute</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlEventNotification</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlEndpoint</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlErrorMessage</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlFile</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlLogin</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlLinkedServer</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlCredential</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlDatabaseEncryptionKey</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlMasterKey</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlDatabaseAuditSpecification</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlServerAudit</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlServerAuditSpecification</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlCryptographicProvider</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlUserDefinedServerRole</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlEventSession</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlDatabaseOptions</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlLinkedServerLogin</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlServerRoleMembership</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlAssemblyFile</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
</ConfigurationOptionsElement>
|
||||
</SchemaCompareSettingsService>
|
||||
<SchemaCompareViewSettings>
|
||||
<GroupBy>2</GroupBy>
|
||||
<ZoomLevel>80</ZoomLevel>
|
||||
<Filter>Equals_Objects,Not_Supported_Deploy</Filter>
|
||||
</SchemaCompareViewSettings>
|
||||
<ExcludedSourceElements>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlTable, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>PosizioneUdcCorrente</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlDmlTrigger, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>trg_storico</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlView, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>V_statoCelleCapienzaAssegnati</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSynonym, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dmtx</Name>
|
||||
<Name>syn_ElencoDatamatrix</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>BatchQueue</Name>
|
||||
<Name>stp_registraPackList_New</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_AL2UDC_moveUdcDtx</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_BORI_getByBollaFull</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_BORI_getByBollaPart</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ParticolariDistinctByAlSourceDest</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ParticolariGetLike</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_prtCartAnimeByUDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_prtCartFinitiByUDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_prtCartFinitiByUDC_SP</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_prtCartFusiByUDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_prtCartSterratiByUDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_prtCartTrattatiByUDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_RLP_getUdcSenzaDeliberaPM</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_RLP_setDlUdcSenzaDeliberaPM</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_RTPV_getByPageChiave</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_spostaUdc</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UAL_eliminaEmpty</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UAL_insertNewTL</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_associaParent</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_delete</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_deleteWithDtx</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_getByNumTT</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_getByParticolareAL</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_getByParticolarePosizione</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_insNewFull</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_insNewFull_fixUDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dmtx</Name>
|
||||
<Name>stp_DtxGetByUDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dmtx</Name>
|
||||
<Name>stp_DtxRiassocia</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dmtx</Name>
|
||||
<Name>stp_Utility_DtxRiassocia</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlScalarFunction, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>f_getLibreriaAS400</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlScalarFunction, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dmtx</Name>
|
||||
<Name>f_getPN</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlTable, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>Attr2UDC_storico</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlForeignKeyConstraint, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>FK_Attr2UDCStorico_AnagAttributi</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>BatchQueue</Name>
|
||||
<Name>stp_batch_spostaUDC_Anime_nonStampati</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_A2U_getLastNC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ENC_deleteQuery</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ENC_getByKey</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ENC_getLastOnes</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ENC_insertQuery</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ENC_updateQuery</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ENC_updCompleta</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ENC_updFilt</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ENC_updNome</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ENC2U_getByIdxNc</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ENC2U_getNcPending</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ENC2U_toggle</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_getBilanceNC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_PartNcDistByCsFlusso</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_PJQ_getFirtsByUdc</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_RLP_getUdcSenzaDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_SAO_check4delete</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_TrascCodSogg_GetByKey</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_TrascCodSogg_updateQuery</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_copyAttrib</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_getSenzaDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_getSenzaDeliberaPM</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_NC_getByFlussoDate</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_RxFin_fullUpdate</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_setDL_DC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UNC_assignAttr</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_Udc_statoDelibLogNc</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UNC_getByAttrNC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UNC_getChildByIdxNc</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UNC_removeSelNC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UNC_toggleDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dmtx</Name>
|
||||
<Name>stp_D2U_delete</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dmtx</Name>
|
||||
<Name>stp_Dmtx_GetByAttr</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dmtx</Name>
|
||||
<Name>stp_DtxRiassocia_NEW</Name>
|
||||
</SelectedItem>
|
||||
</ExcludedSourceElements>
|
||||
<ExcludedTargetElements>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>BatchQueue</Name>
|
||||
<Name>stp_registraPackList_New_OLD</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlTable, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>PosizioneUdcCorrente</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlDmlTrigger, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>trg_storico</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlView, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>V_statoCelleCapienzaAssegnati</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSynonym, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dmtx</Name>
|
||||
<Name>syn_ElencoDatamatrix</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>BatchQueue</Name>
|
||||
<Name>stp_registraPackList_New</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_AL2UDC_moveUdcDtx</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_BORI_getByBollaFull</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_BORI_getByBollaPart</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ParticolariDistinctByAlSourceDest</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_ParticolariGetLike</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_prtCartAnimeByUDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_prtCartFinitiByUDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_prtCartFinitiByUDC_SP</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_prtCartFusiByUDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_prtCartSterratiByUDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_prtCartTrattatiByUDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_RLP_getUdcSenzaDeliberaPM</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_RLP_setDlUdcSenzaDeliberaPM</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_RTPV_getByPageChiave</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_spostaUdc</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UAL_eliminaEmpty</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UAL_insertNewTL</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_associaParent</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_delete</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_deleteWithDtx</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_getByNumTT</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_getByParticolareAL</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_getByParticolarePosizione</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_insNewFull</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>stp_UDC_insNewFull_fixUDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dmtx</Name>
|
||||
<Name>stp_DtxGetByUDC</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dmtx</Name>
|
||||
<Name>stp_DtxRiassocia</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dmtx</Name>
|
||||
<Name>stp_Utility_DtxRiassocia</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlScalarFunction, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dbo</Name>
|
||||
<Name>f_getLibreriaAS400</Name>
|
||||
</SelectedItem>
|
||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlScalarFunction, Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Name>dmtx</Name>
|
||||
<Name>f_getPN</Name>
|
||||
</SelectedItem>
|
||||
</ExcludedTargetElements>
|
||||
</SchemaComparison>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,716 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SteamWare;
|
||||
|
||||
|
||||
namespace GMW_data
|
||||
{
|
||||
/// <summary>
|
||||
/// fa da proxy singleton x gli oggetti legati ai cartellini ODETTE
|
||||
/// </summary>
|
||||
public class Odette
|
||||
{
|
||||
#region area table adapters
|
||||
|
||||
public DS_OdetteTableAdapters.OdetteTableAdapter taOdette;
|
||||
public DS_OdetteTableAdapters.BORI202JTableAdapter taBORI;
|
||||
public DS_OdetteTableAdapters.stp_OdetteStatoCreateTableAdapter taOdCreate;
|
||||
|
||||
/// <summary>
|
||||
/// init dei table adapters
|
||||
/// </summary>
|
||||
protected void initTA()
|
||||
{
|
||||
taOdette = new GMW_data.DS_OdetteTableAdapters.OdetteTableAdapter();
|
||||
taBORI = new GMW_data.DS_OdetteTableAdapters.BORI202JTableAdapter();
|
||||
taOdCreate = new GMW_data.DS_OdetteTableAdapters.stp_OdetteStatoCreateTableAdapter();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua setup dei connection strings da web.config delal singola applicazione
|
||||
/// </summary>
|
||||
protected virtual void setupConnectionStringBase()
|
||||
{
|
||||
string connString = memLayer.ML.confReadString("GMWConnectionString");
|
||||
// connections strings del db
|
||||
taOdette.Connection.ConnectionString = connString;
|
||||
taBORI.Connection.ConnectionString = connString;
|
||||
taOdCreate.Connection.ConnectionString = connString;
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected Odette()
|
||||
{
|
||||
initTA();
|
||||
setupConnectionStringBase();
|
||||
}
|
||||
|
||||
#region area protected
|
||||
|
||||
/// <summary>
|
||||
/// carica le label di lingua su un etichetta odette (che deve già esistere)
|
||||
/// </summary>
|
||||
/// <param name="UDC"></param>
|
||||
/// <param name="lingua"></param>
|
||||
/// <returns></returns>
|
||||
protected bool caricaEtichetteLinguaPerOdette(string UDC, string lingua)
|
||||
{
|
||||
bool answ = false;
|
||||
// controllo se etichetta odette esiste...
|
||||
if (taOdette.getByUdc(UDC).Rows.Count > 0)
|
||||
{
|
||||
// carico le mie labels tradotte...
|
||||
string Campo1_1 = traduci("Campo1_1", lingua);
|
||||
string Campo2_1 = traduci("Campo2_1", lingua);
|
||||
string Campo3_1 = traduci("Campo3_1", lingua);
|
||||
string Campo4_1 = traduci("Campo4_1", lingua);
|
||||
string Campo5_1 = traduci("Campo5_1", lingua);
|
||||
string Campo6_1 = traduci("Campo6_1", lingua);
|
||||
string Campo7_1 = traduci("Campo7_1", lingua);
|
||||
string Campo8_1 = traduci("Campo8_1", lingua);
|
||||
string Campo9_1 = traduci("Campo9_1", lingua);
|
||||
string Campo10_1 = traduci("Campo10_1", lingua);
|
||||
string Campo11_1_1 = traduci("Campo11_1_1", lingua);
|
||||
string Campo11_2_1 = traduci("Campo11_2_1", lingua);
|
||||
string Campo12_1 = traduci("Campo12_1", lingua);
|
||||
string Campo13_1 = traduci("Campo13_1", lingua);
|
||||
string Campo14_1 = traduci("Campo14_1", lingua);
|
||||
string Campo15_1 = traduci("Campo15_1", lingua);
|
||||
string Campo16_1 = traduci("Campo16_1", lingua);
|
||||
// effettuo update!
|
||||
taOdette.updateLingua(UDC, Campo1_1, Campo2_1, Campo3_1, Campo4_1, Campo5_1, Campo6_1, Campo7_1, Campo8_1, Campo9_1, Campo10_1, Campo11_1_1, Campo11_2_1, Campo12_1, Campo13_1, Campo14_1, Campo15_1, Campo16_1);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Attenzione! etichetta odette non trovata per l'UDC {0}", UDC), tipoLog.ERROR);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica una etichetta odette e salva in db il valore di check x consistenza dei dati
|
||||
/// </summary>
|
||||
/// <param name="UDC"></param>
|
||||
/// <returns></returns>
|
||||
protected bool updateStatoOdette(string UDC)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
// effettuo verifiche sulla riga odette...
|
||||
// !!!FARE!!!
|
||||
answ = true;
|
||||
taOdette.setStato(UDC, answ);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// carica i dati per l'etichetta Odette provenienti dalla bolla indicata
|
||||
/// </summary>
|
||||
/// <param name="UDC"></param>
|
||||
/// <param name="RaggMag"></param>
|
||||
/// <param name="GrpBolla"></param>
|
||||
/// <param name="numBolla">codice bolla</param>
|
||||
/// <param name="dataBolla">data bolla formato YYYYMMDD</param>
|
||||
/// <param name="particolare"></param>
|
||||
/// <returns></returns>
|
||||
protected bool caricaDatiBollaEtichettaOdette(string UDC, string RaggMag, string GrpBolla, decimal numBolla, decimal dataBolla, string particolare)
|
||||
{
|
||||
// versione vecchia: ora faccio tutto con stored!
|
||||
#if false
|
||||
bool answ = false;
|
||||
string ragSocCli = "";
|
||||
string indirCli = "";
|
||||
string capCittCli = "";
|
||||
string destP1 = "";
|
||||
string destP2 = "";
|
||||
string destP3 = "";
|
||||
string destinatario = "";
|
||||
decimal peso = 0;
|
||||
string pesoNetto = "";
|
||||
string pesoLordo = "";
|
||||
string numColli = "";
|
||||
string disPart = "";
|
||||
string descPart = "";
|
||||
string codPart = "";
|
||||
string codImb = "";
|
||||
string codMaz = "";
|
||||
string codNael = "";
|
||||
string codNaelP1 = "";
|
||||
string codNaelP2 = "";
|
||||
string codNaelP3 = "";
|
||||
string codAQP = "";
|
||||
// in primis recupero la riga di dati da AS400...
|
||||
int trovati = 0;
|
||||
DS_Odette.BORI202JDataTable tabAs400 = new DS_Odette.BORI202JDataTable();
|
||||
DS_magazzino.ElencoCartelliniRow rigaUdc = null;
|
||||
decimal qtaUdc = 1;
|
||||
try
|
||||
{
|
||||
tabAs400 = taBORI.getByKeyFull(RaggMag, GrpBolla, numBolla, dataBolla, particolare);
|
||||
trovati = tabAs400.Rows.Count;
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Non trovati dati per {0}-{1}-{2}-{3}-{4}", RaggMag, GrpBolla, numBolla, dataBolla, particolare), tipoLog.EXCEPTION);
|
||||
}
|
||||
// carico dati udc
|
||||
try
|
||||
{
|
||||
rigaUdc = MagClass.magazzino.taCartellini.getByUdc(UDC)[0];
|
||||
qtaUdc = rigaUdc.Qta;
|
||||
}
|
||||
catch
|
||||
{
|
||||
qtaUdc = 1;
|
||||
logger.lg.scriviLog(string.Format("Non trovati dati per UDC {0} (qta)", UDC), tipoLog.EXCEPTION);
|
||||
}
|
||||
if (trovati >= 1)
|
||||
{
|
||||
DS_Odette.BORI202JRow rigaAs = tabAs400[0];
|
||||
// in base al valore di CDINB definisco i campi...
|
||||
if (rigaAs.CDINB.Trim() != "")
|
||||
{
|
||||
// campo1
|
||||
try
|
||||
{
|
||||
ragSocCli = rigaAs.RA1ND.Trim();
|
||||
indirCli = rigaAs.RA2ND.Trim();
|
||||
capCittCli = string.Format("{0} {1}", rigaAs.CAPND.Trim(), rigaAs.CITND.Trim());
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo1 (101)", tipoLog.ERROR);
|
||||
}
|
||||
// campo2
|
||||
try
|
||||
{
|
||||
destP2 = rigaAs.INEND.Substring(0, 15).Trim();
|
||||
destP1 = rigaAs.INEND.Substring(15, 15).Trim();
|
||||
if (rigaAs.CRAGCL.Trim() == "13" || rigaAs.TELND.Substring(18, 2) == "13")
|
||||
{
|
||||
destP3 = "/S";
|
||||
}
|
||||
destinatario = string.Format("{0}/{1}{2}", destP1, destP2, destP3);
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo2 (102)", tipoLog.ERROR);
|
||||
}
|
||||
// campo12
|
||||
try
|
||||
{
|
||||
if (rigaAs.CRAGCL.Trim() == "13" || rigaAs.TELND.Substring(18, 2) == "13")
|
||||
{
|
||||
codMaz = rigaAs.PERND.Trim();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo12 (112)", tipoLog.ERROR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// campo1
|
||||
try
|
||||
{
|
||||
ragSocCli = rigaAs.RASCL.Trim();
|
||||
indirCli = rigaAs.INDCL.Trim();
|
||||
capCittCli = string.Format("{0} {1} {2}", rigaAs.CAPCL.Trim(), rigaAs.LOCCL.Trim(), rigaAs.PROCL.Trim());
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo1 (201)", tipoLog.ERROR);
|
||||
}
|
||||
// campo2
|
||||
try
|
||||
{
|
||||
destP1 = rigaAs.CCDMOL.Trim();
|
||||
destP2 = rigaAs.CCDPTR.Trim();
|
||||
if (rigaAs.CRAGCL.Trim() == "13")
|
||||
{
|
||||
destP3 = "/S";
|
||||
}
|
||||
destinatario = string.Format("{0}/{1}{2}", destP1, destP2, destP3);
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo2 (202)", tipoLog.ERROR);
|
||||
}
|
||||
// campo12
|
||||
try
|
||||
{
|
||||
if (rigaAs.CRAGCL.Trim() == "13" || rigaAs.TELND.Substring(18, 2) == "13")
|
||||
{
|
||||
codMaz = rigaAs.CCDET1.Trim();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo12 (212)", tipoLog.ERROR);
|
||||
}
|
||||
}
|
||||
// campo5
|
||||
try
|
||||
{
|
||||
// se EPLAVO = 0 --> si mette EPLNETT
|
||||
if (rigaAs.EPLAVO <= 0)
|
||||
{
|
||||
peso = rigaAs.EPNETT;
|
||||
}
|
||||
else
|
||||
{
|
||||
// modifica 2013.05.03
|
||||
//peso = Math.Round(rigaAs.EPLAVO * memLayer.ML.confReadInt("qtaOdette"), 2);
|
||||
peso = rigaAs.EPLAVO;
|
||||
}
|
||||
pesoNetto = Math.Round(peso * qtaUdc, 2).ToString();
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo5 (005)", tipoLog.ERROR);
|
||||
}
|
||||
// campo6
|
||||
try
|
||||
{
|
||||
pesoLordo = Math.Round(rigaAs.PELDB / rigaAs.NRC1B, 2).ToString();
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo6 (006)", tipoLog.ERROR);
|
||||
}
|
||||
// campo7
|
||||
try
|
||||
{
|
||||
numColli = rigaAs.NRC1B.ToString();
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo7 (007)", tipoLog.ERROR);
|
||||
}
|
||||
// campo8
|
||||
try
|
||||
{
|
||||
disPart = rigaAs.ECMM01.Trim();
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo8 (008)", tipoLog.ERROR);
|
||||
}
|
||||
// campo10
|
||||
try
|
||||
{
|
||||
descPart = rigaAs.DEPAR.Trim();
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo10 (010)", tipoLog.ERROR);
|
||||
}
|
||||
// campo 11_1
|
||||
try
|
||||
{
|
||||
codPart = rigaAs.CDARS.Trim();
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo11_1 (011_1)", tipoLog.ERROR);
|
||||
}
|
||||
// campo 11_2
|
||||
try
|
||||
{
|
||||
// modifica 2013.05.02
|
||||
codImb = rigaAs.FCDI01.Trim();
|
||||
//codImb = rigaAs.RCARTC.Trim();
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo11_2 (011_2)", tipoLog.ERROR);
|
||||
}
|
||||
// campo14
|
||||
try
|
||||
{
|
||||
// controlla se debba configurare come BMW da accodamento dati o leggendo in nuova tabella...
|
||||
if (rigaAs.CRAGCL.Trim() == "13" || rigaAs.TELND.Substring(18, 2) == "13")
|
||||
{
|
||||
codNaelP1 = rigaAs.ECDNAE.Trim();
|
||||
codNaelP2 = rigaAs.ECDNA1.Trim();
|
||||
codNaelP3 = rigaAs.EESPMD.Trim();
|
||||
codNael = string.Format("ZI:{0} {1} AI:{2}", codNaelP1, codNaelP2, codNaelP3);
|
||||
}
|
||||
else
|
||||
{
|
||||
// leggo record...
|
||||
codNael = rigaAs.OCDODM;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo14 (014)", tipoLog.ERROR);
|
||||
}
|
||||
// campo16_5
|
||||
try
|
||||
{
|
||||
// sistema codAQP
|
||||
codAQP = rigaAs.ECLAQP;
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog("Errore campo16 (016)", tipoLog.ERROR);
|
||||
}
|
||||
}
|
||||
if (trovati >= 1)
|
||||
{
|
||||
try
|
||||
{
|
||||
taOdette.updateValAs400(UDC, ragSocCli, indirCli, capCittCli, destinatario, "", "", pesoNetto, pesoLordo, numColli, disPart, descPart, codPart, codImb, codMaz, codNael, codAQP);
|
||||
answ = true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
answ = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
taOdette.caricaDatiBollaEtichettaOdette(memLayer.ML.confReadString("CodCS"), UDC, numBolla.ToString(), dataBolla.ToString(), RaggMag, GrpBolla, particolare);
|
||||
answ = true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
answ = false;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
/// <summary>
|
||||
/// singleton
|
||||
/// </summary>
|
||||
public static Odette mgr = new Odette();
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <param name="lingua"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma, string lingua)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma, lingua);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// verifica l'esistenza di una bolla dato il suo codice + data
|
||||
/// </summary>
|
||||
/// <param name="RaggMag">cod raggr magazzino</param>
|
||||
/// <param name="GrpBolla">gruppo bolla</param>
|
||||
/// <param name="numBolla">codice bolla NUMERICO</param>
|
||||
/// <param name="dataBolla">data bolla formato numerico YYYYMMDD</param>
|
||||
/// <param name="particolare">codice particolare</param>
|
||||
/// <returns></returns>
|
||||
public bool checkCodBolla(string RaggMag, string GrpBolla, decimal numBolla, decimal dataBolla, string particolare)
|
||||
{
|
||||
bool answ = false;
|
||||
int righeBolla = 0;
|
||||
// controllo che la bolla esista...
|
||||
try
|
||||
{
|
||||
// provo a caricarle con stored...
|
||||
taBORI.caricaDatiBolla(RaggMag, GrpBolla, numBolla.ToString(), dataBolla.ToString(), particolare);
|
||||
// rileggo se presenti...
|
||||
righeBolla = taBORI.getByKeyFull(RaggMag, GrpBolla, Convert.ToDecimal(numBolla), Convert.ToDecimal(dataBolla), particolare).Rows.Count;
|
||||
answ = (righeBolla >= 1);
|
||||
}
|
||||
catch(Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore in checkCodBolla:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
// controllo che la bolla non sia già associata... ovvero SENZA NESSUNA etichetta odette associata x quel particolare...
|
||||
if (answ)
|
||||
{
|
||||
// controllo se trovo odette associate a tale bolla...
|
||||
answ = (taOdette.getByBolla(RaggMag, GrpBolla, numBolla, dataBolla, particolare).Rows.Count == 0);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// conteggia il num di colli x una data bolla
|
||||
/// </summary>
|
||||
/// <param name="RaggMag">cod raggr magazzino</param>
|
||||
/// <param name="GrpBolla">gruppo bolla</param>
|
||||
/// <param name="numBolla">codice bolla NUMERICO</param>
|
||||
/// <param name="dataBolla">data bolla formato numerico YYYYMMDD</param>
|
||||
/// <param name="particolare">codice particolare</param>
|
||||
/// <returns></returns>
|
||||
public int totColliBolla(string RaggMag, string GrpBolla, decimal numBolla, decimal dataBolla, string particolare)
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
// calcolo il totale dei pezzi: ogni riga contiene il totale colli della bolla...
|
||||
//answ = (int)taBORI.getByKeyFull(RaggMag, GrpBolla, Convert.ToDecimal(numBolla), Convert.ToDecimal(dataBolla), particolare)[0].NRC1B;
|
||||
answ = Convert.ToInt32(taBORI.getByKeyFull(RaggMag, GrpBolla, Convert.ToDecimal(numBolla), Convert.ToDecimal(dataBolla), particolare).Compute("SUM(NRC1B)", ""));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// conteggia il num di pezzi x una data bolla
|
||||
/// </summary>
|
||||
/// <param name="RaggMag">cod raggr magazzino</param>
|
||||
/// <param name="GrpBolla">gruppo bolla</param>
|
||||
/// <param name="numBolla">codice bolla NUMERICO</param>
|
||||
/// <param name="dataBolla">data bolla formato numerico YYYYMMDD</param>
|
||||
/// <param name="particolare">codice particolare</param>
|
||||
/// <returns></returns>
|
||||
public int totPezziBolla(string RaggMag, string GrpBolla, decimal numBolla, decimal dataBolla, string particolare)
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
// rileggo se presenti...
|
||||
answ = Convert.ToInt32(taBORI.getByKeyFull(RaggMag, GrpBolla, Convert.ToDecimal(numBolla), Convert.ToDecimal(dataBolla), particolare).Compute("SUM(QTCNS)", ""));
|
||||
//answ = (int)taBORI.getByKeyFull(RaggMag, GrpBolla, Convert.ToDecimal(numBolla), Convert.ToDecimal(dataBolla), particolare)[0].QTCNS;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// crea tutte le righe encessarie alal stampa dei cartellini Odette dati lista di prelievo, bolla da associare
|
||||
/// </summary>
|
||||
/// <param name="CodLista">codice lista di prelievo</param>
|
||||
/// <param name="RaggMag">cod raggr magazzino</param>
|
||||
/// <param name="GrpBolla">gruppo bolla</param>
|
||||
/// <param name="numBolla">codice bolla NUMERICO</param>
|
||||
/// <param name="dataBolla">data bolla formato numerico YYYYMMDD</param>
|
||||
/// <param name="particolare">codice particolare</param>
|
||||
/// <param name="Lingua">IT/EN/...</param>
|
||||
/// <returns>in caso di errore e ritorno false, salva in sessione il messaggio di errore relativo in errCreazOdette</returns>
|
||||
public bool creaOdetteByBollaPackList(string CodLista, string RaggMag, string GrpBolla, decimal numBolla, decimal dataBolla, string particolare, string lingua)
|
||||
{
|
||||
bool answ = false;
|
||||
string errCreazOdette = "";
|
||||
int totUdc = 0;
|
||||
int totPz = 0;
|
||||
int udcOk = 0;
|
||||
DS_magazzino.RigheListePrelievoDataTable ElencoUdc = new DS_magazzino.RigheListePrelievoDataTable();
|
||||
// conto totale etichette da creare
|
||||
try
|
||||
{
|
||||
ElencoUdc = MagClass.magazzino.taRigheListePrelievo.getByCodLista(CodLista);
|
||||
totUdc = ElencoUdc.Rows.Count;
|
||||
totPz = (int)MagClass.magazzino.taElencoListePrelievo.getByCodLista(CodLista)[0].Prelevato;
|
||||
}
|
||||
catch
|
||||
{
|
||||
errCreazOdette = string.Format("Errore: non ci sono UDC da creare per la PackList {0}", CodLista);
|
||||
logger.lg.scriviLog(errCreazOdette, tipoLog.ERROR);
|
||||
}
|
||||
// in primis comunque verifico che la bolla ci sia altrimenti non procedo (anche se avrebbe già dovuto controllare...)
|
||||
if (checkCodBolla(RaggMag, GrpBolla, numBolla, dataBolla, particolare) && totUdc > 0)
|
||||
{
|
||||
// controllo se il totale colli corrisponde al totale UDC..
|
||||
if (totColliBolla(RaggMag, GrpBolla, numBolla, dataBolla, particolare) == totUdc || true) // controllo disattivato 2013.03.22 perché i colli riga sono i colli totali bolla
|
||||
{
|
||||
// controllo se il totale pezzi corrisponde al totale qta...
|
||||
if (totPezziBolla(RaggMag, GrpBolla, numBolla, dataBolla, particolare) == totPz)
|
||||
{
|
||||
// leggo elenco UDC da packing list
|
||||
foreach (DS_magazzino.RigheListePrelievoRow rigaUdc in ElencoUdc)
|
||||
{
|
||||
// per ogni UDC creo una riga
|
||||
taOdette.upsertUdc(rigaUdc.UDC, memLayer.ML.confReadString("CodCS"), numBolla.ToString(), dataBolla.ToString(), RaggMag, GrpBolla, particolare, CodLista, memLayer.ML.confReadString("indStabFrom"), rigaUdc.Qta.ToString());
|
||||
udcOk++;
|
||||
// per ogni riga inserisco traduzione nella lingua richiesta
|
||||
caricaEtichetteLinguaPerOdette(rigaUdc.UDC, lingua);
|
||||
// vado a caricare i dati dalla tab dei dati bolle
|
||||
caricaDatiBollaEtichettaOdette(rigaUdc.UDC, RaggMag, GrpBolla, numBolla, dataBolla, particolare);
|
||||
// effettuo check della riga odette e determino se sia conforme
|
||||
updateStatoOdette(rigaUdc.UDC);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errCreazOdette = string.Format("Errore assegnazione bolle/odette, il num di pezzi non corrisponde: num bolla {0} del {1}, lista prelievo {2}", numBolla, dataBolla, CodLista);
|
||||
logger.lg.scriviLog(errCreazOdette, tipoLog.ERROR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errCreazOdette = string.Format("Errore assegnazione bolle/odette, il num di colli non corrisponde: num bolla {0} del {1}, lista prelievo {2}", numBolla, dataBolla, CodLista);
|
||||
logger.lg.scriviLog(errCreazOdette, tipoLog.ERROR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errCreazOdette = string.Format("Tentativo di generazione etichette odette da bolla inesistente/già impiegata: codice {0} del {1}", numBolla, dataBolla);
|
||||
logger.lg.scriviLog(errCreazOdette, tipoLog.ERROR);
|
||||
}
|
||||
// controllo se tutte le etichette sono sstate create
|
||||
if (totUdc == udcOk)
|
||||
{
|
||||
answ = true;
|
||||
}
|
||||
memLayer.ML.setSessionVal("errCreazOdette", errCreazOdette);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Stampa tutte le etichette odette di una lista di prelievo
|
||||
/// </summary>
|
||||
/// <param name="CodLista"></param>
|
||||
/// <param name="printerName"></param>
|
||||
/// <returns></returns>
|
||||
public bool stampaOdettePackingList(string CodLista, string printerName)
|
||||
{
|
||||
bool answ = false;
|
||||
int totOdette = 0;
|
||||
DS_Odette.OdetteDataTable ElencoOdette = new DS_Odette.OdetteDataTable();
|
||||
// conto totale etichette Odette con StatusOK=1 corrispondenti a lista prelievo
|
||||
try
|
||||
{
|
||||
ElencoOdette = taOdette.getByCodLista(CodLista);
|
||||
totOdette = ElencoOdette.Rows.Count;
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore: non ci sono UDC da creare per la PackList {0}", CodLista), tipoLog.ERROR);
|
||||
}
|
||||
// in primis comunque verifico che la bolla ci sia altrimenti non procedo (anche se avrebbe già dovuto controllare...)
|
||||
if (totOdette > 0)
|
||||
{
|
||||
// processo elenco Odette
|
||||
foreach (DS_Odette.OdetteRow rigaOdette in ElencoOdette)
|
||||
{
|
||||
stampaEtichettaOdette(rigaOdette.CampoUDC, printerName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Attenzione: non ho trovaot etichette odette valide per la lista di prelievo {0}", CodLista), tipoLog.ERROR);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// stampa una singola etichetta odette
|
||||
/// </summary>
|
||||
/// <param name="UDC"></param>
|
||||
/// <param name="printerName"></param>
|
||||
/// <returns></returns>
|
||||
public bool stampaEtichettaOdette(string UDC, string printerName)
|
||||
{
|
||||
bool answ = false;
|
||||
// chiamo il report...
|
||||
try
|
||||
{
|
||||
answ = reportPrinter.obj.stampaCartellino(tipoCartellino.cartOdette, UDC, printerName);
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(String.Format("Errore nella stmapa del cartellino per l'UDC {0}", UDC), tipoLog.ERROR);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// determina se ci siano odette x la lista di prelievo
|
||||
/// </summary>
|
||||
/// <param name="codLista"></param>
|
||||
/// <returns></returns>
|
||||
public bool listaHasOdette(string codLista)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
DS_Odette.stp_OdetteStatoCreateRow rigaCreate = taOdCreate.GetData(codLista)[0];
|
||||
answ = rigaCreate.OdetteCreate > 0;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce info se un gitterbox abbia una etichetta odette associata
|
||||
/// <param name="codGitterbox"></param>
|
||||
/// </summary>
|
||||
public bool gitterboxInOdette(string codGitterbox)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = taOdette.getByUdc(codGitterbox).Rows.Count > 0;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce info se un datamatrix faccia parte di un gitterbox con una etichetta odette associata
|
||||
/// </summary>
|
||||
public bool datamatrixInOdette(decimal codDataMatrix)
|
||||
{
|
||||
bool answ = false;
|
||||
string codGitterbox = DataMatrix.mgr.gitterboxFromDataMatrix(codDataMatrix);
|
||||
answ = gitterboxInOdette(codGitterbox);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Restituisce info se un datamatrix possa essere spostato tra 2 gitterbox (il suo d'origine e quello indicato),
|
||||
/// mantenendo l'omogeneità dei prodotti nel gitterbox.
|
||||
/// Verifiche:
|
||||
/// - se il datamatrix ha un gitterbox associato --> le prime 2 cifre dei gitterbox devono coincidere
|
||||
/// - se il datamatrix non ha un gitterbox associato --> rileggo gitterbox originale pre importazione e faccio verifica dei primi 2 char
|
||||
/// <param name="codDataMatrix"></param>
|
||||
/// <param name="codGitterbox"></param>
|
||||
/// </summary>
|
||||
public bool dtMtxGtboxCompatibili(decimal codDataMatrix, string codGitterboxTo)
|
||||
{
|
||||
bool answ = false;
|
||||
string codGitterboxFrom = "";
|
||||
try
|
||||
{
|
||||
codGitterboxFrom = DataMatrix.mgr.gitterboxFromDataMatrix(codDataMatrix);
|
||||
if (codGitterboxFrom != "EmptyGBox")
|
||||
{
|
||||
answ = (codGitterboxFrom.Substring(0, 2) == codGitterboxTo.Substring(0, 2));
|
||||
}
|
||||
else
|
||||
{
|
||||
// cerco gitterbox originale...
|
||||
codGitterboxFrom = DataMatrix.mgr.gitterboxOrigFromDataMatrix(codDataMatrix);
|
||||
answ = (codGitterboxFrom.Substring(0, 2) == codGitterboxTo.Substring(0, 2));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce info se un datamatrix esista
|
||||
/// <param name="codDataMatrix"></param>
|
||||
/// </summary>
|
||||
public bool datamatrixEsiste(decimal codDataMatrix)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = DataMatrix.mgr.taElencoDM.getByCode(codDataMatrix).Rows.Count > 0;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace GMW_data
|
||||
{
|
||||
/// <summary>
|
||||
/// Classe gestione auth utente
|
||||
/// </summary>
|
||||
public class OpAuth
|
||||
{
|
||||
/// <summary>
|
||||
/// CodSoggetto (univoco)
|
||||
/// </summary>
|
||||
public string CodSoggetto { get; set; }
|
||||
/// <summary>
|
||||
/// Matricola OP (univoca)
|
||||
/// </summary>
|
||||
public int Matricola { get; set; }
|
||||
/// <summary>
|
||||
/// Cognome - Nome
|
||||
/// </summary>
|
||||
public string CognomeNome { get; set; }
|
||||
/// <summary>
|
||||
/// numero autorizzazioni ancora possibili
|
||||
/// </summary>
|
||||
public int remAuth { get; set; }
|
||||
/// <summary>
|
||||
/// scadenza massima auth
|
||||
/// </summary>
|
||||
public DateTime scadAuth { get; set; }
|
||||
/// <summary>
|
||||
/// inizializzazione componente, default da web.config MA CON AUTH
|
||||
/// </summary>
|
||||
protected OpAuth()
|
||||
{
|
||||
// imposto valori di default (scaduti...)
|
||||
CodSoggetto = "";
|
||||
Matricola = 0;
|
||||
CognomeNome = "NA";
|
||||
remAuth = memLayer.ML.CRI("defRemAuth");
|
||||
scadAuth = DateTime.Now.AddMinutes(memLayer.ML.CRI("defMinScad"));
|
||||
}
|
||||
/// <summary>
|
||||
/// Fornisce un oggetto OpAuth popolato da CodSoggetto calcolando il resto + lettura default da web.config
|
||||
/// </summary>
|
||||
/// <param name="CodSoggetto"></param>
|
||||
/// <returns></returns>
|
||||
public static OpAuth startOpAuth(string CodSoggetto)
|
||||
{
|
||||
OpAuth answ = new OpAuth();
|
||||
if (CodSoggetto != "")
|
||||
{
|
||||
answ.CodSoggetto = CodSoggetto;
|
||||
answ.CognomeNome = utils.obj.getOperatoreByCod(CodSoggetto);
|
||||
answ.Matricola = DataProxy.obj.taTrascSogg.getByKey(CodSoggetto, 0)[0].CodMatricola;
|
||||
}
|
||||
currAuth = answ;
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Fornisce un oggetto OpAuth popolato da Matricola calcolando il resto + lettura default da web.config
|
||||
/// </summary>
|
||||
/// <param name="Matricola"></param>
|
||||
/// <returns></returns>
|
||||
public static OpAuth startOpAuth(int Matricola)
|
||||
{
|
||||
OpAuth answ = new OpAuth();
|
||||
if (Matricola > 0)
|
||||
{
|
||||
answ.CodSoggetto = DataProxy.obj.taTrascSogg.getByKey("", Matricola)[0].CodSoggetto;
|
||||
answ.CognomeNome = utils.obj.getOperatoreByCod(answ.CodSoggetto);
|
||||
answ.Matricola = Matricola;
|
||||
}
|
||||
currAuth = answ;
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// toglie auth utente
|
||||
/// </summary>
|
||||
public static void stopAuth()
|
||||
{
|
||||
memLayer.ML.emptySessionVal("OpAuth");
|
||||
}
|
||||
/// <summary>
|
||||
/// Auth Corrente x operazioni User
|
||||
/// </summary>
|
||||
public static OpAuth currAuth
|
||||
{
|
||||
get
|
||||
{
|
||||
OpAuth answ = new OpAuth();
|
||||
// cerco in sessione...
|
||||
if (memLayer.ML.isInSessionObject("OpAuth"))
|
||||
{
|
||||
answ = (OpAuth)memLayer.ML.objSessionObj("OpAuth");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("OpAuth", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// definisce si sia valida auth operatività utente, ovvero
|
||||
/// - valori in sessione
|
||||
/// - num auth > 0
|
||||
/// - auth non scaduta
|
||||
/// </summary>
|
||||
public static bool isAuth
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
// se ho valori in sessione
|
||||
if (memLayer.ML.isInSessionObject("OpAuth"))
|
||||
{
|
||||
// se ho num auth > 0
|
||||
if (currAuth.remAuth > 0)
|
||||
{
|
||||
// se non è scaduta auth..
|
||||
if (currAuth.scadAuth > DateTime.Now)
|
||||
{
|
||||
// se ho un CodSoggetto VALIDO
|
||||
if (currAuth.CodSoggetto != "")
|
||||
{
|
||||
answ = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// definisce se sia richiesta OpAuth
|
||||
/// </summary>
|
||||
public static bool opAuthReq
|
||||
{
|
||||
get
|
||||
{
|
||||
// verifico SE devo fare controllo OpAuth...
|
||||
return memLayer.ML.CRB("enableOpAuth");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,251 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace GMW_data
|
||||
{
|
||||
/// <summary>
|
||||
/// classe gestione dati inerenti la postazione (fisica) da cui si esegue la pagina web
|
||||
/// </summary>
|
||||
public class Postazione
|
||||
{
|
||||
/// <summary>
|
||||
/// indica stampante associata alla postazione corrente
|
||||
/// </summary>
|
||||
public static string printer
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_printer");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_printer", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica formato Dmtx associato alla postazione corrente
|
||||
/// </summary>
|
||||
public static string formatoDmtx
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_formatoDmtx");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_formatoDmtx", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica name della postazione corrente
|
||||
/// </summary>
|
||||
public static string name
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_name");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_name", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica ip della postazione corrente
|
||||
/// </summary>
|
||||
public static string IP
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_IP");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_IP", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// warning text x la postazione corrente
|
||||
/// </summary>
|
||||
public static string warningText
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("warningText");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("warningText", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// MESSAGGI text x la postazione corrente
|
||||
/// </summary>
|
||||
public static string messaggiText
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("messaggiText");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("messaggiText", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica calsse css della postazione corrente
|
||||
/// </summary>
|
||||
public static string CssClass
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("cssClass");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("cssClass", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// codice della linea corrente
|
||||
/// </summary>
|
||||
public static string currCodLinea
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject(string.Format("codLinea-{0}", Postazione.IP)))
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj(string.Format("codLinea-{0}", Postazione.IP));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("codLinea-{0}", Postazione.IP), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// NOME della linea corrente
|
||||
/// </summary>
|
||||
public static string currNomeLinea
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject(string.Format("nomeLinea-{0}", Postazione.IP)))
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj(string.Format("nomeLinea-{0}", Postazione.IP));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("nomeLinea-{0}", Postazione.IP), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idx cella associata alla linea corrente
|
||||
/// </summary>
|
||||
public static int currIdxCella
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (memLayer.ML.isInSessionObject(string.Format("IdxCella-{0}", Postazione.IP)))
|
||||
{
|
||||
answ = memLayer.ML.IntSessionObj(string.Format("IdxCella-{0}", Postazione.IP));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("IdxCella-{0}", Postazione.IP), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// cod cella associata alla linea corrente
|
||||
/// </summary>
|
||||
public static string currCodCella
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject(string.Format("CodCella-{0}", Postazione.IP)))
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj(string.Format("CodCella-{0}", Postazione.IP));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("CodCella-{0}", Postazione.IP), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// cod blocco associata alla linea corrente
|
||||
/// </summary>
|
||||
public static string currCodBlocco
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = currCodCella.Substring(0, 3);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// definisce se mostrare lo storico
|
||||
/// </summary>
|
||||
public static bool showStorico
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
if (memLayer.ML.isInSessionObject("showHist"))
|
||||
{
|
||||
answ = memLayer.ML.BoolSessionObj("showHist");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("showHist", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua calcolo parametri postazione dato IP
|
||||
/// </summary>
|
||||
public static void setupPrinter()
|
||||
{
|
||||
name = dnsUtils.DetermineCompName(IP);
|
||||
// cerco stampante x postazione
|
||||
printer = "n.d.";
|
||||
try
|
||||
{
|
||||
DS_Applicazione.ElencoPostazioniDataTable tabPost = DataProxy.obj.taElPost.getByCod(name);
|
||||
if (tabPost.Rows.Count > 0)
|
||||
{
|
||||
printer = tabPost[0].stampante;
|
||||
formatoDmtx = tabPost[0].FormatoDtmx;
|
||||
}
|
||||
else
|
||||
{
|
||||
tabPost = DataProxy.obj.taElPost.getByCod("default");
|
||||
printer = tabPost[0].stampante;
|
||||
formatoDmtx = tabPost[0].FormatoDtmx;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("GMW_data")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("GMW_data")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("61bef1a5-eb5d-4bb5-8d56-f7b4c197d2c8")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
Generated
+48
@@ -0,0 +1,48 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GMW_data.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=SQL-STEAM\\SQL2012;Initial Catalog=TK_GMW;Persist Security Info=True;U" +
|
||||
"ser ID=sa;Password=keyhammer")]
|
||||
public string GMWConnectionString {
|
||||
get {
|
||||
return ((string)(this["GMWConnectionString"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=SQL-STEAM\\SQL2012;Initial Catalog=SP_produzione;Persist Security Info" +
|
||||
"=True;User ID=sa;Password=keyhammer")]
|
||||
public string SP_produzioneConnectionString {
|
||||
get {
|
||||
return ((string)(this["SP_produzioneConnectionString"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="GMW_data.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="GMWConnectionString" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<ConnectionString>Data Source=SQL-STEAM\SQL2012;Initial Catalog=TK_GMW;Persist Security Info=True;User ID=sa;Password=keyhammer</ConnectionString>
|
||||
<ProviderName>System.Data.SqlClient</ProviderName>
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=SQL-STEAM\SQL2012;Initial Catalog=TK_GMW;Persist Security Info=True;User ID=sa;Password=keyhammer</Value>
|
||||
</Setting>
|
||||
<Setting Name="SP_produzioneConnectionString" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<ConnectionString>Data Source=SQL-STEAM\SQL2012;Initial Catalog=SP_produzione;Persist Security Info=True;User ID=sa;Password=keyhammer</ConnectionString>
|
||||
<ProviderName>System.Data.SqlClient</ProviderName>
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=SQL-STEAM\SQL2012;Initial Catalog=SP_produzione;Persist Security Info=True;User ID=sa;Password=keyhammer</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,75 @@
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_prtCartByUDC
|
||||
*
|
||||
* ottiene il record del Cartellino dato l'UDC richiesto x la sstampa
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.05.28
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_prtCartByUDC
|
||||
(
|
||||
@UDC VARCHAR(50)
|
||||
)
|
||||
AS
|
||||
SELECT
|
||||
ElencoCartellini.UDC, ElencoCartellini.CodCS, ISNULL(ElencoCartellini.CodCliente, N'') AS codcliente,
|
||||
ISNULL(ElencoCartellini.RagSociale, N'') AS ragsociale, ISNULL(ElencoCartellini.Particolare, N'') AS particolare,
|
||||
ISNULL(ElencoCartellini.DescParticolare, N'') AS DescParticolare, ISNULL(ElencoCartellini.DisegnoGrezzo, N'') AS DisegnoGrezzo,
|
||||
ISNULL(ElencoCartellini.Esponente, N'') AS esponente, ISNULL(ElencoCartellini.CodImpianto, N'') AS CodImpianto,
|
||||
ISNULL(ElencoCartellini.DescImpianto, N'') AS DescImpianto, ISNULL(ElencoCartellini.CodStampo, N'') AS codstampo,
|
||||
ISNULL(ElencoCartellini.Figura, N'') AS figura, ISNULL(ElencoCartellini.DataFus, N'') AS datafus,
|
||||
ISNULL(ElencoCartellini.TurnoFus, N'') AS turnofus, ISNULL(ElencoCartellini.CodImballo, N'') AS CodImballo,
|
||||
ISNULL(ElencoCartellini.CodSoggetto, N'') AS CodSoggetto, ISNULL(ElencoCartellini.NumCont, N'') AS NumCont,
|
||||
ISNULL(ElencoCartellini.Tara, N'') AS tara, ISNULL(ElencoCartellini.Qta, N'') AS qta, ISNULL(ElencoCartellini.CodStato, N'') AS CodStato,
|
||||
ISNULL(ElencoCartellini.IdxPosizione, N'') AS IdxPosizione,
|
||||
ISNULL(ElencoCartellini.PesoTot, N'') AS PesoTot, ISNULL(ElencoCartellini.PesoCad, N'') AS PesoCad, ElencoCartellini.CreateDate,
|
||||
ElencoCartellini.ModDate, ISNULL(RilPro.AnagOperatori.Cognome, N'') AS cognome,
|
||||
ISNULL(RilPro.AnagOperatori.Nome, N'') AS nome, ISNULL(AnagStatiProdotto.DescStato, N'') AS DescStato,
|
||||
ISNULL(RilPro.AnagImballi.DescImballo, N'') AS DescImballo, RilPro.AnagParticolari.CodFamiglia, RilPro.AnagFamiglie.DescFamiglia
|
||||
FROM
|
||||
RilPro.AnagParticolari
|
||||
LEFT OUTER JOIN
|
||||
RilPro.AnagFamiglie
|
||||
ON
|
||||
RilPro.AnagParticolari.CodFamiglia = RilPro.AnagFamiglie.CodFamiglia
|
||||
RIGHT OUTER JOIN
|
||||
ElencoCartellini
|
||||
ON
|
||||
RilPro.AnagParticolari.Particolare = ElencoCartellini.Particolare
|
||||
LEFT OUTER JOIN
|
||||
AnagStatiProdotto
|
||||
ON
|
||||
ElencoCartellini.CodStato = AnagStatiProdotto.CodStato
|
||||
LEFT OUTER JOIN
|
||||
RilPro.AnagOperatori
|
||||
ON
|
||||
ElencoCartellini.CodSoggetto = RilPro.AnagOperatori.CodSoggetto
|
||||
LEFT OUTER JOIN
|
||||
RilPro.AnagImballi
|
||||
ON
|
||||
ElencoCartellini.CodImballo = RilPro.AnagImballi.CodImballo
|
||||
WHERE
|
||||
(ElencoCartellini.UDC = @UDC)
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(52, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,81 @@
|
||||
/* Aggiornamento ed udpate DB!*/
|
||||
|
||||
-- drop stored inutilizzate
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
drop procedure stp_getImp2Art_ByImpData
|
||||
go
|
||||
|
||||
drop procedure stp_getImp2Art_currProd
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
-- nuove stored!
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_dummy
|
||||
*
|
||||
* stored dummy per poter settare stringhe di connessione alle stored operative associate allos tesso oggetto del dataset
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.05.18
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_dummy
|
||||
AS
|
||||
|
||||
SELECT * FROM LogUpdateDb
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_getImballoLikeSearch
|
||||
*
|
||||
* carica le righe imballo da ricerca like
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.05.28
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_getImballoLikeSearch
|
||||
(
|
||||
@searchVal VARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT CodImballo, ClasseArticolo, DescImballo
|
||||
FROM RilPro.AnagImballi
|
||||
WHERE (CodImballo LIKE '%' + @searchVal + '%')
|
||||
OR (DescImballo LIKE '%' + @searchVal + '%')
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(70, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,687 @@
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
create VIEW V_CelleOverview
|
||||
AS
|
||||
SELECT dbo.Celle.CodCS, dbo.Celle.IdxCella, dbo.Celle.CodCella, dbo.Celle.X, dbo.Celle.Y, dbo.Celle.Z, ISNULL(dbo.PosizioneUdcCorrente.UDC, '') AS UDC
|
||||
FROM dbo.Celle LEFT OUTER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "Celle"
|
||||
Begin Extent =
|
||||
Top = 35
|
||||
Left = 80
|
||||
Bottom = 285
|
||||
Right = 250
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "PosizioneUdcCorrente"
|
||||
Begin Extent =
|
||||
Top = 42
|
||||
Left = 422
|
||||
Bottom = 171
|
||||
Right = 592
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 9
|
||||
Width = 284
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
End
|
||||
End
|
||||
Begin CriteriaPane =
|
||||
Begin ColumnWidths = 11
|
||||
Column = 1440
|
||||
Alias = 900
|
||||
Table = 1170
|
||||
Output = 720
|
||||
Append = 1400
|
||||
NewValue = 1170
|
||||
SortType = 1350
|
||||
SortOrder = 1410
|
||||
GroupBy = 1350
|
||||
Filter = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
End
|
||||
End
|
||||
End
|
||||
', 'SCHEMA', 'dbo', 'VIEW', 'V_CelleOverview'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPaneCount', 1, 'SCHEMA', 'dbo', 'VIEW', 'V_CelleOverview'
|
||||
go
|
||||
|
||||
create VIEW V_DettMagPart
|
||||
AS
|
||||
SELECT TOP (100) PERCENT dbo.AnagMag.CodCS, dbo.AnagMag.CodMag, dbo.AnagMag.DescMag, dbo.Blocchi.IdxBlocco, dbo.Blocchi.CodBlocco,
|
||||
dbo.ElencoCartellini.Particolare, dbo.ElencoCartellini.Esponente, COUNT(dbo.PosizioneUdcCorrente.UDC) AS NumUDC,
|
||||
ISNULL(MIN(dbo.PosizioneUdcCorrente.DataRif), GETDATE()) AS Oldest, ISNULL(MAX(dbo.PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest,
|
||||
SUM(dbo.ElencoCartellini.Qta) AS QtaTotPz, dbo.AnagStatiProdotto.DescStato
|
||||
FROM dbo.AnagMag INNER JOIN
|
||||
dbo.Blocchi ON dbo.AnagMag.CodMag = dbo.Blocchi.CodMag AND dbo.AnagMag.CodCS = dbo.Blocchi.CodCS INNER JOIN
|
||||
dbo.Celle INNER JOIN
|
||||
dbo.ElencoCartellini INNER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.ElencoCartellini.UDC = dbo.PosizioneUdcCorrente.UDC ON dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella ON
|
||||
dbo.Blocchi.IdxBlocco = dbo.Celle.IdxBlocco INNER JOIN
|
||||
dbo.AnagStatiProdotto ON dbo.ElencoCartellini.CodStato = dbo.AnagStatiProdotto.CodStato
|
||||
WHERE (dbo.Celle.Attiva = 1)
|
||||
GROUP BY dbo.AnagMag.CodCS, dbo.AnagMag.CodMag, dbo.AnagMag.DescMag, dbo.Blocchi.IdxBlocco, dbo.Blocchi.CodBlocco, dbo.Blocchi.NumX, dbo.Blocchi.NumY,
|
||||
dbo.Blocchi.NumZ, dbo.ElencoCartellini.Particolare, dbo.AnagStatiProdotto.DescStato, dbo.ElencoCartellini.Esponente
|
||||
ORDER BY QtaTotPz DESC
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "AnagMag"
|
||||
Begin Extent =
|
||||
Top = 22
|
||||
Left = 1012
|
||||
Bottom = 134
|
||||
Right = 1198
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "Blocchi"
|
||||
Begin Extent =
|
||||
Top = 16
|
||||
Left = 737
|
||||
Bottom = 145
|
||||
Right = 923
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "Celle"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 486
|
||||
Bottom = 135
|
||||
Right = 672
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "ElencoCartellini"
|
||||
Begin Extent =
|
||||
Top = 163
|
||||
Left = 416
|
||||
Bottom = 328
|
||||
Right = 602
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "PosizioneUdcCorrente"
|
||||
Begin Extent =
|
||||
Top = 116
|
||||
Left = 35
|
||||
Bottom = 245
|
||||
Right = 221
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "AnagStatiProdotto"
|
||||
Begin Extent =
|
||||
Top = 226
|
||||
Left = 650
|
||||
Bottom = 321
|
||||
Right = 836
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 13
|
||||
Width = 284
|
||||
Width = ', 'SCHEMA', 'dbo', 'VIEW', 'V_DettMagPart'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPane2', '1500
|
||||
Width = 1500
|
||||
Width = 2145
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 2415
|
||||
Width = 1500
|
||||
End
|
||||
End
|
||||
Begin CriteriaPane =
|
||||
Begin ColumnWidths = 12
|
||||
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_DettMagPart'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPaneCount', 2, 'SCHEMA', 'dbo', 'VIEW', 'V_DettMagPart'
|
||||
go
|
||||
|
||||
create VIEW V_MagazziniOverview
|
||||
AS
|
||||
SELECT dbo.AnagMag.CodCS, dbo.AnagMag.CodMag, dbo.AnagMag.DescMag, dbo.Blocchi.IdxBlocco, dbo.Blocchi.CodBlocco,
|
||||
dbo.Blocchi.NumX * dbo.Blocchi.NumY * dbo.Blocchi.NumZ AS TotCelle, COUNT(dbo.Celle.IdxCella) AS CelleAttive, COUNT(dbo.PosizioneUdcCorrente.UDC)
|
||||
AS CelleOccupate, COUNT(dbo.Celle.IdxCella) - COUNT(dbo.PosizioneUdcCorrente.UDC) AS CelleLibere, ISNULL(MIN(dbo.PosizioneUdcCorrente.DataRif), GETDATE())
|
||||
AS Oldest, ISNULL(MAX(dbo.PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest
|
||||
FROM dbo.Celle RIGHT OUTER JOIN
|
||||
dbo.AnagMag INNER JOIN
|
||||
dbo.Blocchi ON dbo.AnagMag.CodMag = dbo.Blocchi.CodMag AND dbo.AnagMag.CodCS = dbo.Blocchi.CodCS ON
|
||||
dbo.Celle.IdxBlocco = dbo.Blocchi.IdxBlocco LEFT OUTER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella
|
||||
WHERE (dbo.Celle.Attiva = 1)
|
||||
GROUP BY dbo.AnagMag.CodCS, dbo.AnagMag.CodMag, dbo.AnagMag.DescMag, dbo.Blocchi.IdxBlocco, dbo.Blocchi.CodBlocco, dbo.Blocchi.NumX, dbo.Blocchi.NumY,
|
||||
dbo.Blocchi.NumZ
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "Celle"
|
||||
Begin Extent =
|
||||
Top = 149
|
||||
Left = 629
|
||||
Bottom = 313
|
||||
Right = 799
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 4
|
||||
End
|
||||
Begin Table = "AnagMag"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 662
|
||||
Bottom = 118
|
||||
Right = 832
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "Blocchi"
|
||||
Begin Extent =
|
||||
Top = 36
|
||||
Left = 974
|
||||
Bottom = 257
|
||||
Right = 1144
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "PosizioneUdcCorrente"
|
||||
Begin Extent =
|
||||
Top = 159
|
||||
Left = 201
|
||||
Bottom = 288
|
||||
Right = 371
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 11
|
||||
Width = 284
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1665
|
||||
Width = 1665
|
||||
End
|
||||
End
|
||||
Begin CriteriaPane =
|
||||
Begin ColumnWidths = 12
|
||||
Column = 1440
|
||||
Alias = 900
|
||||
Table = 1170
|
||||
Output = 720
|
||||
Append = 1400
|
||||
NewValue = 1170
|
||||
SortType = 1350
|
||||
SortOrder = 1410
|
||||
GroupBy = 1350
|
||||
Filter = 1350
|
||||
Or', 'SCHEMA', 'dbo', 'VIEW', 'V_MagazziniOverview'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPane2', ' = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
End
|
||||
End
|
||||
End
|
||||
', 'SCHEMA', 'dbo', 'VIEW', 'V_MagazziniOverview'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPaneCount', 2, 'SCHEMA', 'dbo', 'VIEW', 'V_MagazziniOverview'
|
||||
go
|
||||
|
||||
create VIEW V_ParticolariOverview
|
||||
AS
|
||||
SELECT RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare, ISNULL(COUNT(dbo.ElencoCartellini.UDC), 0) AS NumUDC,
|
||||
ISNULL(SUM(dbo.ElencoCartellini.Qta), 0) AS TotQta, ISNULL(COUNT(dbo.PosizioneUdcCorrente.IdxCella), 0) AS NumInMag
|
||||
FROM RilPro.AnagParticolari LEFT OUTER JOIN
|
||||
dbo.ElencoCartellini ON RilPro.AnagParticolari.Particolare = dbo.ElencoCartellini.Particolare LEFT OUTER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.ElencoCartellini.UDC = dbo.PosizioneUdcCorrente.UDC
|
||||
GROUP BY RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare, dbo.ElencoCartellini.UDC, dbo.ElencoCartellini.Qta, dbo.PosizioneUdcCorrente.IdxCella
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "AnagParticolari (RilPro)"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 38
|
||||
Bottom = 191
|
||||
Right = 208
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "ElencoCartellini"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 277
|
||||
Bottom = 270
|
||||
Right = 447
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "PosizioneUdcCorrente"
|
||||
Begin Extent =
|
||||
Top = 7
|
||||
Left = 533
|
||||
Bottom = 136
|
||||
Right = 703
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 9
|
||||
Width = 284
|
||||
Width = 1500
|
||||
Width = 2580
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
End
|
||||
End
|
||||
Begin CriteriaPane =
|
||||
Begin ColumnWidths = 12
|
||||
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_ParticolariOverview'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPaneCount', 1, 'SCHEMA', 'dbo', 'VIEW', 'V_ParticolariOverview'
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(80, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,65 @@
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_celleLibereGetByIdxBlocco
|
||||
*
|
||||
* ottiene l'elenco delle posizioni LIBERE associate ad un dato blocco
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.02
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_celleLibereGetByIdxBlocco
|
||||
(
|
||||
@IdxBlocco INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT Celle.IdxCella, Celle.CodCS, Celle.CodCella, Celle.IdxTipoCella, Celle.Descrizione, Celle.Attiva, Celle.IdxBlocco, Celle.X, Celle.Y, Celle.Z
|
||||
FROM Celle LEFT OUTER JOIN
|
||||
PosizioneUdcCorrente ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella
|
||||
WHERE (Celle.IdxBlocco = @IdxBlocco) AND (Celle.Attiva = 1) AND (PosizioneUdcCorrente.IdxCella IS NULL)
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_celleNonAttiveByIdxBlocco
|
||||
*
|
||||
* ottiene l'elenco delle posizioni NON ATTIVE associate ad un dato blocco
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.03
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_celleNonAttiveByIdxBlocco
|
||||
(
|
||||
@IdxBlocco INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT Celle.IdxCella, Celle.CodCS, Celle.CodCella, Celle.IdxTipoCella, Celle.Descrizione, Celle.Attiva, Celle.IdxBlocco,
|
||||
Celle.X, Celle.Y, Celle.Z
|
||||
FROM Celle
|
||||
WHERE (Celle.IdxBlocco = @IdxBlocco) AND (Celle.Attiva = 0)
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(81, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,100 @@
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverview
|
||||
*
|
||||
* elenco di overview sullo stato dei magazzini (dettaglio a "maglie larghe")
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.02
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_magazzinoOverview
|
||||
(
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT dbo.AnagMag.CodCS, dbo.AnagMag.CodMag, dbo.AnagMag.DescMag, dbo.Blocchi.IdxBlocco, dbo.Blocchi.CodBlocco,
|
||||
dbo.Blocchi.NumX * dbo.Blocchi.NumY * dbo.Blocchi.NumZ AS TotCelle, COUNT(dbo.Celle.IdxCella) AS CelleAttive,
|
||||
COUNT(dbo.PosizioneUdcCorrente.UDC) AS CelleOccupate, COUNT(dbo.Celle.IdxCella) - COUNT(dbo.PosizioneUdcCorrente.UDC) AS CelleLibere,
|
||||
ISNULL(MIN(dbo.PosizioneUdcCorrente.DataRif), GETDATE())
|
||||
AS Oldest, ISNULL(MAX(dbo.PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest
|
||||
FROM dbo.Celle RIGHT OUTER JOIN
|
||||
dbo.AnagMag INNER JOIN
|
||||
dbo.Blocchi ON dbo.AnagMag.CodMag = dbo.Blocchi.CodMag AND dbo.AnagMag.CodCS = dbo.Blocchi.CodCS ON
|
||||
dbo.Celle.IdxBlocco = dbo.Blocchi.IdxBlocco LEFT OUTER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella
|
||||
WHERE (dbo.Celle.Attiva = 1) AND dbo.AnagMag.CodCS = @CodCS
|
||||
GROUP BY dbo.AnagMag.CodCS, dbo.AnagMag.CodMag, dbo.AnagMag.DescMag, dbo.Blocchi.IdxBlocco, dbo.Blocchi.CodBlocco,
|
||||
dbo.Blocchi.NumX, dbo.Blocchi.NumY, dbo.Blocchi.NumZ
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverview
|
||||
*
|
||||
* restituisce solo la riga con il num max di celle DI UN DATO magazzino
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.02
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_magazzinoOverviewByMag_maxCelle
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@CodMag VARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT TOP (1) AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, ISNULL(Blocchi.NumX * Blocchi.NumY * Blocchi.NumZ,1) AS TotCelle,
|
||||
0 AS CelleAttive, 0 AS CelleOccupate, 0 AS CelleLibere, GETDATE() AS Oldest, GETDATE() AS Newest
|
||||
FROM AnagMag INNER JOIN Blocchi ON AnagMag.CodMag = Blocchi.CodMag AND AnagMag.CodCS = Blocchi.CodCS
|
||||
WHERE (AnagMag.CodCS = @CodCS) AND AnagMag.CodMag = @CodMag
|
||||
ORDER BY TotCelle DESC
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverview
|
||||
*
|
||||
* restituisce solo la riga con il num max di celle
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.02
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_magazzinoOverview_maxCelle
|
||||
(
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT TOP (1) AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, ISNULL(Blocchi.NumX * Blocchi.NumY * Blocchi.NumZ,1) AS TotCelle,
|
||||
0 AS CelleAttive, 0 AS CelleOccupate, 0 AS CelleLibere, GETDATE() AS Oldest, GETDATE() AS Newest
|
||||
FROM AnagMag INNER JOIN Blocchi ON AnagMag.CodMag = Blocchi.CodMag AND AnagMag.CodCS = Blocchi.CodCS
|
||||
WHERE (AnagMag.CodCS = @CodCS)
|
||||
ORDER BY TotCelle DESC
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(82, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,101 @@
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverview
|
||||
*
|
||||
* elenco di overview sullo stato dei magazzini (dettaglio a "maglie larghe")
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.02
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_magazzinoOverview
|
||||
(
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT dbo.AnagMag.CodCS, dbo.AnagMag.CodMag, dbo.AnagMag.DescMag, dbo.Blocchi.IdxBlocco, dbo.Blocchi.CodBlocco,
|
||||
dbo.Blocchi.NumX * dbo.Blocchi.NumY * dbo.Blocchi.NumZ AS TotCelle, COUNT(dbo.Celle.IdxCella) AS CelleAttive,
|
||||
COUNT(dbo.PosizioneUdcCorrente.UDC) AS CelleOccupate, COUNT(dbo.Celle.IdxCella) - COUNT(dbo.PosizioneUdcCorrente.UDC) AS CelleLibere,
|
||||
ISNULL(MIN(dbo.PosizioneUdcCorrente.DataRif), GETDATE())
|
||||
AS Oldest, ISNULL(MAX(dbo.PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest
|
||||
FROM dbo.Celle RIGHT OUTER JOIN
|
||||
dbo.AnagMag INNER JOIN
|
||||
dbo.Blocchi ON dbo.AnagMag.CodMag = dbo.Blocchi.CodMag AND dbo.AnagMag.CodCS = dbo.Blocchi.CodCS ON
|
||||
dbo.Celle.IdxBlocco = dbo.Blocchi.IdxBlocco LEFT OUTER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella
|
||||
WHERE (dbo.Celle.Attiva = 1) AND dbo.AnagMag.CodCS = @CodCS
|
||||
GROUP BY dbo.AnagMag.CodCS, dbo.AnagMag.CodMag, dbo.AnagMag.DescMag, dbo.Blocchi.IdxBlocco, dbo.Blocchi.CodBlocco,
|
||||
dbo.Blocchi.NumX, dbo.Blocchi.NumY, dbo.Blocchi.NumZ
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverview
|
||||
*
|
||||
* restituisce solo la riga con il num max di celle DI UN DATO magazzino
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.02
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_magazzinoOverviewByMag_maxCelle
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@CodMag VARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT TOP (1) AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, ISNULL(Blocchi.NumX * Blocchi.NumY * Blocchi.NumZ,1) AS TotCelle,
|
||||
0 AS CelleAttive, 0 AS CelleOccupate, 0 AS CelleLibere, GETDATE() AS Oldest, GETDATE() AS Newest
|
||||
FROM AnagMag INNER JOIN Blocchi ON AnagMag.CodMag = Blocchi.CodMag AND AnagMag.CodCS = Blocchi.CodCS
|
||||
WHERE (AnagMag.CodCS = @CodCS) AND AnagMag.CodMag = @CodMag
|
||||
ORDER BY TotCelle DESC
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverview
|
||||
*
|
||||
* restituisce solo la riga con il num max di celle
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.02
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_magazzinoOverview_maxCelle
|
||||
(
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT TOP (1) AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, ISNULL(Blocchi.NumX * Blocchi.NumY * Blocchi.NumZ,1) AS TotCelle,
|
||||
0 AS CelleAttive, 0 AS CelleOccupate, 0 AS CelleLibere, GETDATE() AS Oldest, GETDATE() AS Newest
|
||||
FROM AnagMag INNER JOIN Blocchi ON AnagMag.CodMag = Blocchi.CodMag AND AnagMag.CodCS = Blocchi.CodCS
|
||||
WHERE (AnagMag.CodCS = @CodCS)
|
||||
ORDER BY TotCelle DESC
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(83, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,268 @@
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_paretoDettMagByParticolare
|
||||
*
|
||||
* restituisce elenco giacenze a magazzino in logica pareto (quantità) per un dato particolare
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.04
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_paretoDettMagByParticolare
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@Particolare VARCHAR(20)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT TOP (100) PERCENT AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, ElencoCartellini.Particolare,
|
||||
ElencoCartellini.Esponente, COUNT(PosizioneUdcCorrente.UDC) AS NumUDC, ISNULL(MIN(PosizioneUdcCorrente.DataRif),
|
||||
GETDATE()) AS Oldest, ISNULL(MAX(PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest, SUM(ElencoCartellini.Qta) AS QtaTotPz,
|
||||
AnagStatiProdotto.DescStato
|
||||
FROM AnagMag INNER JOIN
|
||||
Blocchi ON AnagMag.CodMag = Blocchi.CodMag AND AnagMag.CodCS = Blocchi.CodCS INNER JOIN
|
||||
Celle INNER JOIN
|
||||
ElencoCartellini INNER JOIN
|
||||
PosizioneUdcCorrente ON ElencoCartellini.UDC = PosizioneUdcCorrente.UDC ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella ON
|
||||
Blocchi.IdxBlocco = Celle.IdxBlocco INNER JOIN
|
||||
AnagStatiProdotto ON ElencoCartellini.CodStato = AnagStatiProdotto.CodStato
|
||||
WHERE (Celle.Attiva = 1) AND (AnagMag.CodCS = @CodCS) AND (ElencoCartellini.Particolare = @Particolare)
|
||||
GROUP BY AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, Blocchi.NumX, Blocchi.NumY, Blocchi.NumZ,
|
||||
ElencoCartellini.Particolare, ElencoCartellini.Esponente, AnagStatiProdotto.DescStato
|
||||
ORDER BY QtaTotPz DESC
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_paretoDettPartByFullSpec
|
||||
*
|
||||
* restituisce elenco particolari in logica pareto (quantità) per un dato blocco di magazzino e il particolare
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.04
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_paretoDettPartByFullSpec
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@CodMag VARCHAR(50),
|
||||
@IdxBlocco INT,
|
||||
@Particolare VARCHAR(20)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT TOP (100) PERCENT AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, ElencoCartellini.Particolare,
|
||||
ElencoCartellini.Esponente, COUNT(PosizioneUdcCorrente.UDC) AS NumUDC, ISNULL(MIN(PosizioneUdcCorrente.DataRif),
|
||||
GETDATE()) AS Oldest, ISNULL(MAX(PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest, SUM(ElencoCartellini.Qta) AS QtaTotPz,
|
||||
AnagStatiProdotto.DescStato
|
||||
FROM AnagMag INNER JOIN
|
||||
Blocchi ON AnagMag.CodMag = Blocchi.CodMag AND AnagMag.CodCS = Blocchi.CodCS INNER JOIN
|
||||
Celle INNER JOIN
|
||||
ElencoCartellini INNER JOIN
|
||||
PosizioneUdcCorrente ON ElencoCartellini.UDC = PosizioneUdcCorrente.UDC ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella ON
|
||||
Blocchi.IdxBlocco = Celle.IdxBlocco INNER JOIN
|
||||
AnagStatiProdotto ON ElencoCartellini.CodStato = AnagStatiProdotto.CodStato
|
||||
WHERE (Celle.Attiva = 1) AND (AnagMag.CodCS = @CodCS) AND (AnagMag.CodMag = @CodMag) AND (Blocchi.IdxBlocco = @IdxBlocco) AND
|
||||
(ElencoCartellini.Particolare = @Particolare)
|
||||
GROUP BY AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, Blocchi.NumX, Blocchi.NumY, Blocchi.NumZ,
|
||||
ElencoCartellini.Particolare, ElencoCartellini.Esponente, AnagStatiProdotto.DescStato
|
||||
ORDER BY QtaTotPz DESC
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_paretoPartByMagBlocco
|
||||
*
|
||||
* restituisce elenco particolari in logica pareto (quantità) per un dato blocco di magazzino, aggregati (no stato)
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.03
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_paretoPartByMagBlocco
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@CodMag VARCHAR(50),
|
||||
@IdxBlocco INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT TOP (100) PERCENT
|
||||
dbo.AnagMag.CodCS, dbo.AnagMag.CodMag, dbo.AnagMag.DescMag, dbo.Blocchi.IdxBlocco, dbo.Blocchi.CodBlocco,
|
||||
dbo.ElencoCartellini.Particolare, '' as Esponente, COUNT(dbo.PosizioneUdcCorrente.UDC) AS NumUDC, ISNULL(MIN(dbo.PosizioneUdcCorrente.DataRif),
|
||||
GETDATE()) AS Oldest, ISNULL(MAX(dbo.PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest, SUM(dbo.ElencoCartellini.Qta) AS QtaTotPz,
|
||||
'' AS DescStato
|
||||
FROM dbo.AnagMag INNER JOIN
|
||||
dbo.Blocchi ON dbo.AnagMag.CodMag = dbo.Blocchi.CodMag AND dbo.AnagMag.CodCS = dbo.Blocchi.CodCS INNER JOIN
|
||||
dbo.Celle INNER JOIN
|
||||
dbo.ElencoCartellini INNER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.ElencoCartellini.UDC = dbo.PosizioneUdcCorrente.UDC
|
||||
ON dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella
|
||||
ON dbo.Blocchi.IdxBlocco = dbo.Celle.IdxBlocco INNER JOIN
|
||||
dbo.AnagStatiProdotto ON dbo.ElencoCartellini.CodStato = dbo.AnagStatiProdotto.CodStato
|
||||
WHERE (dbo.Celle.Attiva = 1) AND (AnagMag.CodCS = @CodCS) AND AnagMag.CodMag = @CodMag AND Blocchi.IdxBlocco = @IdxBlocco
|
||||
GROUP BY dbo.AnagMag.CodCS, dbo.AnagMag.CodMag, dbo.AnagMag.DescMag, dbo.Blocchi.IdxBlocco, dbo.Blocchi.CodBlocco,
|
||||
dbo.Blocchi.NumX, dbo.Blocchi.NumY, dbo.Blocchi.NumZ, dbo.ElencoCartellini.Particolare
|
||||
ORDER BY QtaTotPz DESC
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverview
|
||||
*
|
||||
* elenco di overview sull'impiego dei particolari (dettaglio a "maglie larghe")
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.05.31
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_ParticolariOverview
|
||||
(
|
||||
@searchVal VARCHAR(50),
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare, ISNULL(COUNT(dbo.ElencoCartellini.UDC), 0) AS NumUDC,
|
||||
ISNULL(SUM(dbo.ElencoCartellini.Qta), 0) AS TotQta, ISNULL(COUNT(dbo.PosizioneUdcCorrente.IdxCella), 0) AS NumInMag
|
||||
FROM RilPro.AnagParticolari LEFT OUTER JOIN
|
||||
dbo.ElencoCartellini ON RilPro.AnagParticolari.Particolare = dbo.ElencoCartellini.Particolare LEFT OUTER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.ElencoCartellini.UDC = dbo.PosizioneUdcCorrente.UDC
|
||||
WHERE RilPro.AnagParticolari.CodCS = @CodCS AND RilPro.AnagParticolari.Particolare = @searchVal
|
||||
GROUP BY RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverviewLike
|
||||
*
|
||||
* elenco di overview sull'impiego dei particolari (dettaglio a "maglie larghe") - modalità LIKE
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.05.31
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_ParticolariOverviewLike
|
||||
(
|
||||
@searchVal VARCHAR(50),
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare, ISNULL(COUNT(ElencoCartellini.UDC), 0) AS NumUDC,
|
||||
SUM(ISNULL(ElencoCartellini.Qta, 0)) AS TotQta, ISNULL(COUNT(PosizioneUdcCorrente.IdxCella), 0) AS NumInMag
|
||||
FROM RilPro.AnagParticolari LEFT OUTER JOIN
|
||||
ElencoCartellini ON RilPro.AnagParticolari.Particolare = ElencoCartellini.Particolare LEFT OUTER JOIN
|
||||
PosizioneUdcCorrente ON ElencoCartellini.UDC = PosizioneUdcCorrente.UDC
|
||||
WHERE (RilPro.AnagParticolari.CodCS = @CodCS) AND (RilPro.AnagParticolari.Particolare LIKE '%' + @searchVal + '%')
|
||||
GROUP BY RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_posizioniGetByIdxBlocco
|
||||
*
|
||||
* ottiene l'elenco delle posizioni UDC associate ad un dato blocco
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.02
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_posizioniGetByIdxBlocco
|
||||
(
|
||||
@IdxBlocco INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT PosizioneUdcCorrente.UDC, PosizioneUdcCorrente.IdxCella, PosizioneUdcCorrente.CodCS, PosizioneUdcCorrente.DataRif
|
||||
FROM Celle INNER JOIN
|
||||
PosizioneUdcCorrente ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella
|
||||
WHERE (Celle.IdxBlocco = @IdxBlocco)
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_posizioniGetByIdxCella
|
||||
*
|
||||
* ottiene una singola posizione data la cella richiesta
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.03
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_posizioniGetByIdxCella
|
||||
(
|
||||
@IdxCella INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT UDC, IdxCella, CodCS, DataRif
|
||||
FROM PosizioneUdcCorrente
|
||||
WHERE (IdxCella = @IdxCella)
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UdcDetailGetByIdxBlocco
|
||||
*
|
||||
* ottiene l'elenco degli UDC con dettaglio posizioni OCCUPATE associati ad un dato blocco di magazzino
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.03
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_UdcDetailGetByIdxBlocco
|
||||
(
|
||||
@IdxBlocco INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT ElencoCartellini.UDC, ElencoCartellini.RagSociale, ElencoCartellini.Particolare, ElencoCartellini.DescParticolare,
|
||||
ElencoCartellini.DisegnoGrezzo, ElencoCartellini.Esponente, ElencoCartellini.DescImpianto, ElencoCartellini.DataFus,
|
||||
ElencoCartellini.TurnoFus, ElencoCartellini.CodImballo, ElencoCartellini.Qta, AnagStatiProdotto.DescStato, ElencoCartellini.ModDate,
|
||||
ISNULL(Blocchi.CodMag, N'') AS CodMag, ISNULL(Blocchi.CodBlocco, N'') AS CodBlocco, ISNULL(Celle.CodCella, N'') AS CodCella,
|
||||
ISNULL(Celle.X, 0) AS X, ISNULL(Celle.Y, 0) AS Y, ISNULL(Celle.Z, 0) AS Z
|
||||
FROM AnagStatiProdotto RIGHT OUTER JOIN ElencoCartellini
|
||||
ON AnagStatiProdotto.CodStato = ElencoCartellini.CodStato AND AnagStatiProdotto.CodStato = ElencoCartellini.CodStato
|
||||
LEFT OUTER JOIN Celle INNER JOIN PosizioneUdcCorrente
|
||||
ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND
|
||||
Celle.IdxCella = PosizioneUdcCorrente.IdxCella INNER JOIN
|
||||
Blocchi ON Celle.IdxBlocco = Blocchi.IdxBlocco INNER JOIN
|
||||
AnagMag ON Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND
|
||||
Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS ON
|
||||
ElencoCartellini.UDC = PosizioneUdcCorrente.UDC
|
||||
WHERE (Celle.IdxBlocco = @IdxBlocco)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(84, GETDATE())
|
||||
GO
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,51 @@
|
||||
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Soggetti2Utente_DOMINIO]') AND type = 'D')
|
||||
BEGIN
|
||||
ALTER TABLE [dbo].[Soggetti2Utente] DROP CONSTRAINT [DF_Soggetti2Utente_DOMINIO]
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
USE [GMW_prod]
|
||||
GO
|
||||
|
||||
/****** Object: Table [dbo].[Soggetti2Utente] Script Date: 07/16/2010 17:30:24 ******/
|
||||
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Soggetti2Utente]') AND type in (N'U'))
|
||||
DROP TABLE [dbo].[Soggetti2Utente]
|
||||
GO
|
||||
|
||||
-- creazione tabella Soggetti2Utenti
|
||||
|
||||
create table Soggetti2Utente(
|
||||
CodSoggetto nchar(16) not null,
|
||||
USER_NAME nvarchar(50) not null,
|
||||
DOMINIO varchar(30) collate SQL_Latin1_General_CP1_CI_AS constraint DF_Soggetti2Utente_DOMINIO default ('DOMITBREMBO'),
|
||||
|
||||
constraint PK_Soggetti2Utente primary key(CodSoggetto,USER_NAME)
|
||||
)
|
||||
go
|
||||
|
||||
|
||||
-- update dati tabella Soggetti2Utente
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.Soggetti2Utente
|
||||
VALUES (N'O900000000000001', N'samuele', 'STEAMWAREWIN')
|
||||
INSERT INTO dbo.Soggetti2Utente
|
||||
VALUES (N'O900000000000002', N'marco', 'STEAMWAREWIN')
|
||||
INSERT INTO dbo.Soggetti2Utente
|
||||
VALUES (N'O900000000000003', N'ermanno', 'STEAMWAREWIN')
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(90, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,293 @@
|
||||
-- elimina tabella COPIA se desiderato
|
||||
|
||||
-- drop table AnagOperatori_Copia
|
||||
-- go
|
||||
|
||||
-- crea tab AnagPeriodi ok
|
||||
|
||||
create table AnagPeriodi(
|
||||
codPeriodo nvarchar(20) not null constraint PK_AnagPeriodi primary key,
|
||||
lemmaPeriodo nvarchar(50)
|
||||
)
|
||||
go
|
||||
|
||||
|
||||
-- crea tab AnagStatiListe ok
|
||||
|
||||
create table AnagStatiListe(
|
||||
CodStatoLista int not null constraint PK_AnagStatiListe primary key,
|
||||
DescStato nvarchar(50)
|
||||
)
|
||||
go
|
||||
|
||||
|
||||
-- modifica tab Celle utilizzando tab temporanee ok
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table PosizioneUdcCorrente drop
|
||||
constraint FK_PosizioneUdcCorrente_Celle
|
||||
go
|
||||
|
||||
alter table Celle drop
|
||||
constraint DF_Celle_IdxBlocco
|
||||
go
|
||||
|
||||
exec sp_rename 'PK_Celle', 'tmp__PK_Celle', 'OBJECT'
|
||||
go
|
||||
|
||||
exec sp_rename 'Celle', 'tmp__Celle_2', 'OBJECT'
|
||||
go
|
||||
|
||||
create table Celle(
|
||||
IdxCella int not null identity constraint PK_Celle primary key,
|
||||
CodCS nchar(2) not null,
|
||||
CodCella nvarchar(50) not null,
|
||||
IdxTipoCella int,
|
||||
Descrizione nvarchar(50),
|
||||
Attiva bit,
|
||||
Piena bit not null constraint DF_Celle_Piena default (0),
|
||||
IdxBlocco int not null constraint DF_Celle_IdxBlocco default (0),
|
||||
X int not null,
|
||||
Y int not null,
|
||||
Z int not null
|
||||
)
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', N'indica se sia attiva, se non lo fosse è impedito caricamento nella stessa', 'SCHEMA', 'dbo', 'TABLE', 'Celle', 'COLUMN', 'Attiva'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'posizione X (colonna)', 'SCHEMA', 'dbo', 'TABLE', 'Celle', 'COLUMN', 'X'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'posizione Y (livello/ripiano)', 'SCHEMA', 'dbo', 'TABLE', 'Celle', 'COLUMN', 'Y'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'posizione Z (profondita)', 'SCHEMA', 'dbo', 'TABLE', 'Celle', 'COLUMN', 'Z'
|
||||
go
|
||||
|
||||
set identity_insert Celle on
|
||||
go
|
||||
|
||||
insert into Celle(IdxCella,CodCS,CodCella,IdxTipoCella,Descrizione,Attiva,IdxBlocco,X,Y,Z) select IdxCella,CodCS,CodCella,IdxTipoCella,Descrizione,Attiva,IdxBlocco,X,Y,Z from tmp__Celle_2
|
||||
go
|
||||
|
||||
set identity_insert Celle off
|
||||
go
|
||||
|
||||
drop table tmp__Celle_2
|
||||
go
|
||||
|
||||
alter table PosizioneUdcCorrente add
|
||||
constraint FK_PosizioneUdcCorrente_Celle foreign key(IdxCella) references Celle(IdxCella) on update cascade
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
-- crea tab ContatoriListePrelievo ok
|
||||
|
||||
create table ContatoriListePrelievo(
|
||||
CodCS nvarchar(2) not null,
|
||||
Anno varchar(2) not null,
|
||||
Mese varchar(2) not null,
|
||||
LastIdx int constraint DF_ContatoriListePrelievo_LastIdx default (0),
|
||||
|
||||
constraint PK_ContatoriListePrelievo primary key(CodCS,Anno,Mese)
|
||||
)
|
||||
go
|
||||
|
||||
|
||||
|
||||
-- crea tab tipolistaPrelievo ok
|
||||
|
||||
create table TipoListaPrelievo(
|
||||
CodTipoLista nvarchar(10) not null constraint PK_TipoListaPrelievo primary key,
|
||||
DescrLista nvarchar(250),
|
||||
IdxPosizione int,
|
||||
CodCella nvarchar(50) not null
|
||||
)
|
||||
go
|
||||
|
||||
|
||||
|
||||
-- crea tab ElencoListe prelievo ok
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
create table ElencoListePrelievo(
|
||||
CodLista nvarchar(12) not null constraint PK_ElencoListePrelievo primary key,
|
||||
CodTipoLista nvarchar(10) not null,
|
||||
CodCS nchar(2) not null,
|
||||
DataCreaz datetime not null,
|
||||
CodCliente nvarchar(6),
|
||||
RagSociale nvarchar(35),
|
||||
CodSoggetto nchar(17) not null,
|
||||
Particolare nvarchar(15) not null,
|
||||
DescParticolare nvarchar(30),
|
||||
DisegnoGrezzo nvarchar(30),
|
||||
Esponente nvarchar(6),
|
||||
CodImballo nvarchar(15),
|
||||
QtaTot decimal(10,2) not null,
|
||||
CodStatoLista int not null constraint DF_ElencoListePrelievo_CodStatoLista default (1)
|
||||
)
|
||||
go
|
||||
|
||||
-- The script may need editing: Some other object must have been synchronized first!
|
||||
go
|
||||
|
||||
alter table ElencoListePrelievo add
|
||||
constraint FK_ElencoListePrelievo_AnagStatiListe foreign key(CodStatoLista) references AnagStatiListe(CodStatoLista) on update cascade
|
||||
go
|
||||
|
||||
-- The script may need editing: Some other object must have been synchronized first!
|
||||
go
|
||||
|
||||
alter table ElencoListePrelievo add
|
||||
constraint FK_ElencoListePrelievo_TipoListaPrelievo1 foreign key(CodTipoLista) references TipoListaPrelievo(CodTipoLista) on update cascade
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
-- crea tab RigheLIstePrelievo ok
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
create table RigheListePrelievo(
|
||||
CodLista nvarchar(12) not null,
|
||||
UDC nvarchar(50) not null,
|
||||
Qta decimal(10,2) not null,
|
||||
Proposto bit,
|
||||
Prelevato bit,
|
||||
|
||||
constraint PK_RigheListePrelievo primary key(CodLista,UDC)
|
||||
)
|
||||
go
|
||||
|
||||
alter table RigheListePrelievo add
|
||||
constraint FK_RigheListePrelievo_ElencoCartellini foreign key(UDC) references ElencoCartellini(UDC) on update cascade
|
||||
go
|
||||
|
||||
-- The script may need editing: Some other object must have been synchronized first!
|
||||
go
|
||||
|
||||
alter table RigheListePrelievo add
|
||||
constraint FK_RigheListePrelievo_ElencoListePrelievo1 foreign key(CodLista) references ElencoListePrelievo(CodLista) on update cascade
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
-- mod tab rilproAnagOperatori ok
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table RilPro.AnagOperatori drop
|
||||
constraint PK_AnagOperatori_1
|
||||
go
|
||||
|
||||
alter table RilPro.AnagOperatori alter column
|
||||
CodSoggetto nchar(17) not null
|
||||
go
|
||||
|
||||
alter table RilPro.AnagOperatori add
|
||||
constraint PK_AnagOperatori_1 primary key(CodSoggetto)
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
-- mod tab tipocella
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table TipoCella add
|
||||
CheckPiena bit not null constraint DF_TipoCella_CheckPiena default (0)
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_TipoCella_updateQuery
|
||||
*
|
||||
* aggiorna tipo cella
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.16
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_TipoCella_updateQuery
|
||||
(
|
||||
@Original_IdxTipoCella INT,
|
||||
@CodMag VARCHAR(50),
|
||||
@CodCS VARCHAR(2),
|
||||
@Quantita INT,
|
||||
@Capienza INT,
|
||||
@Max_X FLOAT,
|
||||
@Max_Y FLOAT,
|
||||
@Max_Z FLOAT,
|
||||
@Max_Kg FLOAT,
|
||||
@CheckPiena BIT
|
||||
)
|
||||
|
||||
AS
|
||||
|
||||
UPDATE TipoCella
|
||||
SET CodMag = @CodMag, CodCS = @CodCS, Quantita = @Quantita, Capienza = @Capienza, Max_X = @Max_X, Max_Y = @Max_Y, Max_Z = @Max_Z,
|
||||
Max_Kg = @Max_Kg, CheckPiena = @CheckPiena
|
||||
WHERE (IdxTipoCella = @Original_IdxTipoCella)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_TipoCella_deleteQuery
|
||||
*
|
||||
* elimina tipo cella
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.16
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_TipoCella_deleteQuery
|
||||
(
|
||||
@Original_IdxTipoCella INT
|
||||
)
|
||||
|
||||
AS
|
||||
|
||||
DELETE FROM TipoCella
|
||||
WHERE (IdxTipoCella = @Original_IdxTipoCella)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(95, GETDATE())
|
||||
GO
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,939 @@
|
||||
-- mod tabella
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table TipoListaPrelievo add
|
||||
IdxPosizioneFinal int
|
||||
go
|
||||
|
||||
exec sp_rename 'stp_getTipoListaByCodTipoLista', 'stp_TL_getByCodTipoLista', 'object'
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_getUDC_Older
|
||||
*
|
||||
* ottiene l'elenco degli UDC più vecchi in ordine asc TRA QUELLI in una data posizione
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.06
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_getUDC_Older
|
||||
(
|
||||
@Esponente VARCHAR(50),
|
||||
@Particolare VARCHAR (50),
|
||||
@IdxPosizione INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT *
|
||||
FROM ElencoCartellini
|
||||
WHERE (Esponente = @Esponente) AND (Particolare = @Particolare) AND (IdxPosizione = @IdxPosizione)
|
||||
ORDER BY DataFus
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_getUDC_UnusedOlder
|
||||
*
|
||||
* ottiene l'elenco degli UDC più vecchi in ordine asc TRA QUELLI NON ANCORA PRELEVATI nè proposti nella lista corrente
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.06
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_getUDC_UnusedOlder
|
||||
(
|
||||
@CodLista VARCHAR(12)
|
||||
)
|
||||
AS
|
||||
|
||||
-- variabili locali che mi servono
|
||||
DECLARE @Figura AS VARCHAR(4)
|
||||
DECLARE @Esponente AS VARCHAR(6)
|
||||
DECLARE @CodImballo AS VARCHAR(15)
|
||||
DECLARE @Particolare AS VARCHAR (50)
|
||||
DECLARE @CodTipoLista AS VARCHAR (10)
|
||||
DECLARE @IdxPosizione AS INT
|
||||
SET @Figura = (SELECT Figura FROM ElencoListePrelievo WHERE CodLista = @CodLista)
|
||||
SET @Esponente = (SELECT Esponente FROM ElencoListePrelievo WHERE CodLista = @CodLista)
|
||||
SET @CodImballo = (SELECT CodImballo FROM ElencoListePrelievo WHERE CodLista = @CodLista)
|
||||
SET @Particolare = (SELECT Particolare FROM ElencoListePrelievo WHERE CodLista = @CodLista)
|
||||
SET @CodTipoLista = (SELECT CodTipoLista FROM ElencoListePrelievo WHERE CodLista = @CodLista)
|
||||
SET @IdxPosizione = (SELECT IdxPosizione FROM TipoListaPrelievo WHERE CodTipoLista = @CodTipoLista)
|
||||
|
||||
-- effettuo la selezione
|
||||
SELECT *
|
||||
FROM ElencoCartellini
|
||||
WHERE (Particolare = @Particolare) AND (IdxPosizione = @IdxPosizione) AND
|
||||
(Figura = CASE WHEN @Figura = '*' THEN Figura ELSE @Figura END) AND
|
||||
(Esponente = CASE WHEN @Esponente = '*' THEN Esponente ELSE @Esponente END) AND
|
||||
(CodImballo = CASE WHEN @CodImballo = '*' THEN CodImballo ELSE @CodImballo END)
|
||||
AND UDC NOT IN (
|
||||
SELECT DISTINCT UDC
|
||||
FROM RigheListePrelievo INNER JOIN ElencoListePrelievo
|
||||
ON RigheListePrelievo.CodLista = ElencoListePrelievo.CodLista
|
||||
WHERE (ElencoListePrelievo.CodLista = @CodLista)
|
||||
OR (ElencoListePrelievo.CodLista <> @CodLista AND CodStatoLista > 1 AND Prelevato = 1)
|
||||
)
|
||||
ORDER BY ElencoCartellini.DataFus
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_LP_deleteQuery
|
||||
*
|
||||
* elimina lista di prelievo (e righe lista associate) della list aindicata
|
||||
*
|
||||
* Steamware, S.E.L. 8 (from Stintino)
|
||||
* mod: 2010.07.15
|
||||
*
|
||||
************************************/
|
||||
create PROCEDURE stp_LP_deleteQuery
|
||||
(
|
||||
@Original_CodLista varchar(12)
|
||||
)
|
||||
AS
|
||||
|
||||
-- cancello righe lista
|
||||
DELETE FROM RigheListePrelievo
|
||||
WHERE CodLista = @Original_CodLista
|
||||
|
||||
-- cancello record lista
|
||||
DELETE FROM ElencoListePrelievo
|
||||
WHERE CodLista = @Original_CodLista
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_LP_exportToAs400
|
||||
*
|
||||
* esporta la lista di prelievo (e le relative righe) verso AS400 andando a copaire nelle relative tabelle _AS
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.19
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_LP_exportToAs400
|
||||
(
|
||||
@CodLista NVARCHAR(12)
|
||||
)
|
||||
AS
|
||||
|
||||
-- copio la lista (intestazione)
|
||||
INSERT INTO ElencoListePrelievo_AS
|
||||
SELECT *
|
||||
FROM ElencoListePrelievo
|
||||
WHERE (CodLista = @CodLista)
|
||||
|
||||
-- copio le righe lista di dettaglio
|
||||
INSERT INTO RigheListePrelievo_AS
|
||||
SELECT *
|
||||
FROM RigheListePrelievo
|
||||
WHERE (CodLista = @CodLista) AND Prelevato = 1
|
||||
|
||||
-- aggiorno le quantità passate ad AS...
|
||||
UPDATE ElencoListePrelievo_AS
|
||||
SET QtaTot = ( SELECT SUM(Qta) AS QtaTot FROM RigheListePrelievo WHERE (CodLista =@CodLista) AND Prelevato = 1 )
|
||||
WHERE (CodLista = @CodLista)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_LP_updateUDC
|
||||
*
|
||||
* modifica l'UDC in una riga di lista prelievo
|
||||
*
|
||||
* Steamware, S.E.L. 8 (from Stintino)
|
||||
* mod: 2010.07.15
|
||||
*
|
||||
************************************/
|
||||
create PROCEDURE stp_LP_updateUDC
|
||||
(
|
||||
@Original_CodLista VARCHAR(12),
|
||||
@Original_UDC VARCHAR(50),
|
||||
@UDC VARCHAR(50)
|
||||
|
||||
)
|
||||
AS
|
||||
|
||||
-- aggiorno lista prelievo con nuovo UDC
|
||||
UPDATE RigheListePrelievo
|
||||
SET UDC = @UDC, QTA = (SELECT Qta FROM ElencoCartellini WHERE UDC = @UDC)
|
||||
WHERE CodLista = @Original_CodLista AND UDC = @Original_UDC
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/*(
|
||||
* STORED stp_ParticolariEspByParticolare
|
||||
*
|
||||
* elenco distinct particolari/esponente da particoalre
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.07
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_ParticolariEspByParticolare
|
||||
(
|
||||
@Particolare VARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT DISTINCT Particolare, DescParticolare, Esponente, Figura, CodImballo
|
||||
FROM (
|
||||
SELECT TOP (1) @Particolare AS Particolare, '' AS DescParticolare, '*' AS Esponente, '' AS Figura, '' AS CodImballo
|
||||
FROM v_particolariEsponenteFigura
|
||||
WHERE (Particolare = @Particolare)
|
||||
UNION
|
||||
SELECT DISTINCT Particolare, '' AS DescParticolare, Esponente, '' AS Figura, '' AS CodImballo
|
||||
FROM v_particolariEsponenteFigura
|
||||
WHERE Particolare = @Particolare
|
||||
) AS derivTab
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/*(
|
||||
* STORED stp_ParticolariFiguraByParticolare
|
||||
*
|
||||
* elenco distinct particolari/figure da particoalre
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.07
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_ParticolariFiguraByParticolare
|
||||
(
|
||||
@Particolare VARCHAR(50)
|
||||
)
|
||||
AS
|
||||
SELECT DISTINCT Particolare, DescParticolare, Esponente, Figura, CodImballo
|
||||
FROM (
|
||||
SELECT TOP (1) @Particolare AS Particolare, '' AS DescParticolare, '' AS Esponente, '*' AS Figura, '' AS CodImballo
|
||||
FROM v_particolariEsponenteFigura
|
||||
WHERE (Particolare = @Particolare)
|
||||
UNION
|
||||
SELECT DISTINCT Particolare, '' AS DescParticolare, '' AS Esponente, Figura, '' AS CodImballo
|
||||
FROM v_particolariEsponenteFigura
|
||||
WHERE Particolare = @Particolare
|
||||
) AS derivTab
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/*(
|
||||
* STORED stp_ParticolariImballoByParticolare
|
||||
*
|
||||
* elenco distinct particolari/imballo da particoalre
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.07
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_ParticolariImballoByParticolare
|
||||
(
|
||||
@Particolare VARCHAR(50)
|
||||
)
|
||||
AS
|
||||
SELECT DISTINCT Particolare, DescParticolare, Esponente, Figura, CodImballo
|
||||
FROM (
|
||||
SELECT TOP (1) @Particolare AS Particolare, '' AS DescParticolare, '' AS Esponente, '' AS Figura, '*' AS CodImballo
|
||||
FROM v_particolariEsponenteFigura
|
||||
WHERE (Particolare = @Particolare)
|
||||
UNION
|
||||
SELECT DISTINCT Particolare, '' AS DescParticolare, '' AS Esponente, '' AS Figura, CodImballo
|
||||
FROM v_particolariEsponenteFigura AS v_particolariEsponenteFigura_1
|
||||
WHERE (Particolare = @Particolare)
|
||||
) AS derivTab
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- mod stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverviewLike
|
||||
*
|
||||
* elenco di overview sull'impiego dei particolari (dettaglio a "maglie larghe") - modalità LIKE
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.05.31
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_ParticolariOverviewLike
|
||||
(
|
||||
@searchVal VARCHAR(50),
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare, ISNULL(COUNT(ElencoCartellini.UDC), 0) AS NumUDC,
|
||||
SUM(ISNULL(ElencoCartellini.Qta, 0)) AS TotQta, ISNULL(COUNT(PosizioneUdcCorrente.IdxCella), 0) AS NumInMag
|
||||
FROM RilPro.AnagParticolari LEFT OUTER JOIN
|
||||
ElencoCartellini ON RilPro.AnagParticolari.Particolare = ElencoCartellini.Particolare LEFT OUTER JOIN
|
||||
PosizioneUdcCorrente ON ElencoCartellini.UDC = PosizioneUdcCorrente.UDC
|
||||
WHERE (RilPro.AnagParticolari.CodCS = @CodCS) AND ((RilPro.AnagParticolari.Particolare LIKE '%' + @searchVal + '%') OR (RilPro.AnagParticolari.DescParticolare LIKE '%' + @searchVal + '%'))
|
||||
GROUP BY RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/*(
|
||||
* STORED stp_ParticolariOverviewLike
|
||||
*
|
||||
* elenco di overview sull'impiego dei particolari (dettaglio a "maglie larghe") - modalità LIKE con testo CHE INIZIA per searchVal
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.07
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_ParticolariOverviewLikePrefix
|
||||
(
|
||||
@searchVal VARCHAR(50),
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare, ISNULL(COUNT(ElencoCartellini.UDC), 0) AS NumUDC,
|
||||
SUM(ISNULL(ElencoCartellini.Qta, 0)) AS TotQta, ISNULL(COUNT(PosizioneUdcCorrente.IdxCella), 0) AS NumInMag
|
||||
FROM RilPro.AnagParticolari LEFT OUTER JOIN
|
||||
ElencoCartellini ON RilPro.AnagParticolari.Particolare = ElencoCartellini.Particolare LEFT OUTER JOIN
|
||||
PosizioneUdcCorrente ON ElencoCartellini.UDC = PosizioneUdcCorrente.UDC
|
||||
WHERE (RilPro.AnagParticolari.CodCS = @CodCS) AND (RilPro.AnagParticolari.Particolare LIKE '%' + @searchVal + '%')
|
||||
GROUP BY RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_posizioniGetByIdxCellaUdc
|
||||
*
|
||||
* ottiene una singola posizione data la cella richiesta e l'UDC (e quindi verifica se sono associate...)
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.12
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_posizioniGetByIdxCellaUdc
|
||||
(
|
||||
@UDC VARCHAR(50),
|
||||
@IdxCella INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT UDC, IdxCella, CodCS, DataRif
|
||||
FROM PosizioneUdcCorrente
|
||||
WHERE (IdxCella = @IdxCella) AND (UDC = @UDC)
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_RigheListePrelievo_eliminaNonPrelevate
|
||||
*
|
||||
* aggiorna la lista di prelievo ELIMINANDO le righe non ancora prelevate (per poi rigenerare l'elenco)
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.06
|
||||
*
|
||||
************************************/
|
||||
create PROCEDURE stp_RigheListePrelievo_eliminaNonPrelevate
|
||||
(
|
||||
@CodLista AS varchar(12)
|
||||
)
|
||||
AS
|
||||
|
||||
DELETE FROM RigheListePrelievo
|
||||
WHERE CodLista = @CodLista AND Prelevato = 0
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_righePrelevateByUdc
|
||||
*
|
||||
* restituisce l'elenco delle righe delle liste di prelievo PRELEVATE dato un UDC
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.06
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_righePrelevateByUdc
|
||||
(
|
||||
@UDC VARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT *
|
||||
FROM RigheListePrelievo
|
||||
WHERE (UDC = @UDC) AND Prelevato = 1
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_S2U_getByUtente
|
||||
*
|
||||
* ottiene record x corrisponenda utente <-> cod soggetto
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.16
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_S2U_getByUtente
|
||||
(
|
||||
@USER_NAME VARCHAR(50),
|
||||
@DOMINIO VARCHAR(30)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT *
|
||||
FROM Soggetti2Utente
|
||||
WHERE [USER_NAME] = @USER_NAME AND DOMINIO = @DOMINIO
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_scaricaUdc
|
||||
*
|
||||
* elimina dalle posizioni correnti un UDC, salvandone la posizione precedente nella tab storica (per scaricamento / spedizione)
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.19
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_scaricaUdc
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@UDC VARCHAR(50),
|
||||
@IdxCellaFrom INT,
|
||||
@IdxPosizione INT
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN TRAN
|
||||
-- inizio mettendo in storico la posizione attuale dell'UDC (SE esiste)
|
||||
INSERT INTO PosizioneUdcStorico(UDC, IdxCella, CodCS, DataInizio, DataFine)
|
||||
(
|
||||
SELECT UDC, IdxCella, CodCS, DataRif as DataInizio, GETDATE() as DataFine
|
||||
FROM PosizioneUdcCorrente
|
||||
WHERE UDC = @UDC AND IdxCella = @IdxCellaFrom
|
||||
)
|
||||
|
||||
-- libero la posizione attuale dell'UDC (se c'è...)
|
||||
DELETE
|
||||
FROM PosizioneUdcCorrente
|
||||
WHERE UDC = @UDC AND IdxCella = @IdxCellaFrom
|
||||
|
||||
-- aggiorno l'UDC come posizione finale...
|
||||
UPDATE ElencoCartellini
|
||||
SET IdxPosizione = @IdxPosizione
|
||||
WHERE UDC = @UDC
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_setAnnullaUdcPrelevato
|
||||
*
|
||||
* Steamware, E.N.
|
||||
* mod: 2010.06.25
|
||||
*
|
||||
************************************/
|
||||
create PROCEDURE stp_setAnnullaUdcPrelevato
|
||||
(
|
||||
@CodLista NVARCHAR(12),
|
||||
@UDC NVARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE RigheListePrelievo
|
||||
SET Prelevato=0
|
||||
WHERE (CodLista = @CodLista) AND (UDC = @UDC)
|
||||
|
||||
SELECT *
|
||||
FROM RigheListePrelievo
|
||||
WHERE (CodLista = @CodLista) AND (UDC = @UDC)
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_spostaUdc
|
||||
*
|
||||
* sposta un UDC, salvandone la posizione precedente (se esiste) nella tab storica
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.11
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_spostaUdc
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@UDC VARCHAR(50),
|
||||
@IdxCellaFrom INT,
|
||||
@IdxCellaTo INT
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN TRAN
|
||||
-- inizio mettendo in storico la posizione attuale dell'UDC (SE esiste)
|
||||
INSERT INTO PosizioneUdcStorico(UDC, IdxCella, CodCS, DataInizio, DataFine)
|
||||
(
|
||||
SELECT UDC, IdxCella, CodCS, DataRif as DataInizio, GETDATE() as DataFine
|
||||
FROM PosizioneUdcCorrente
|
||||
WHERE UDC = @UDC AND IdxCella = @IdxCellaFrom
|
||||
)
|
||||
|
||||
-- libero la posizione attuale dell'UDC (se c'è...)
|
||||
DELETE
|
||||
FROM PosizioneUdcCorrente
|
||||
WHERE UDC = @UDC AND IdxCella = @IdxCellaFrom
|
||||
|
||||
-- creo una nuova posizione per l'UDC
|
||||
INSERT INTO PosizioneUdcCorrente(UDC, IdxCella, CodCS, DataRif)
|
||||
VALUES(@UDC, @IdxCellaTo, @CodCS, GETDATE())
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UDC_updateQty
|
||||
*
|
||||
* aggiorna un cartellino x la sua quantità
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.12
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_UDC_updateQty
|
||||
(
|
||||
@UDC VARCHAR(20),
|
||||
@CodSoggetto VARCHAR(16),
|
||||
@CodTipoDichiaraz CHAR(1),
|
||||
@CodEvento VARCHAR(10),
|
||||
@Qta DECIMAL(10,2)
|
||||
)
|
||||
AS
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Ciclo principale x edit record
|
||||
------------------------------------------------------------------------------------------------------
|
||||
BEGIN TRAN
|
||||
|
||||
-- registro in StoricoCartellini
|
||||
INSERT INTO StoricoCartellini(DataEv, CodEvento, CodTipoDichiaraz, UDC, CodCS,CodCliente, RagSociale, Particolare, DescParticolare,
|
||||
DisegnoGrezzo, Esponente, CodImpianto, DescImpianto, CodStampo, Figura, DataFus, TurnoFus, CodImballo, CodSoggetto,
|
||||
NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad)
|
||||
SELECT GETDATE() AS DataEv, @CodEvento AS CodEvento, @CodTipoDichiaraz AS CodTipoDichiaraz, UDC, CodCS,
|
||||
CodCliente, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, CodImpianto, DescImpianto, CodStampo, Figura,
|
||||
DataFus, TurnoFus, CodImballo, @CodSoggetto AS CodSoggetto, NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad
|
||||
FROM ElencoCartellini
|
||||
WHERE (UDC = @UDC)
|
||||
|
||||
-- modifico il record
|
||||
UPDATE ElencoCartellini
|
||||
SET Qta = @Qta, ModDate = GETDATE()
|
||||
WHERE UDC = @UDC
|
||||
|
||||
COMMIT TRAN
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- restituisco la tab dati con l'udc appena inserito
|
||||
------------------------------------------------------------------------------------------------------
|
||||
SELECT *
|
||||
FROM ElencoCartellini
|
||||
WHERE UDC = @UDC
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- crea stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UDC_upsertPrelevato
|
||||
*
|
||||
* fa un upsert sulle righe liste prelievo indicando che è stato prelevato un dato udc
|
||||
* (upsert: se c'è update, se non c'è insert...)
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.29
|
||||
*
|
||||
************************************/
|
||||
create PROCEDURE stp_UDC_upsertPrelevato
|
||||
(
|
||||
@CodLista NVARCHAR(12),
|
||||
@UDC NVARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
-- controllo se ci sia l'UDC tra quelli proposti...
|
||||
DECLARE @trovato AS BIT
|
||||
|
||||
SET @trovato = (SELECT COUNT(*) AS trovati
|
||||
FROM RigheListePrelievo
|
||||
WHERE (CodLista = @CodLista) AND (UDC = @UDC))
|
||||
|
||||
-- controllo x scelta upsert
|
||||
|
||||
IF ( @trovato > 0) -- UPDATE!
|
||||
BEGIN
|
||||
UPDATE RigheListePrelievo
|
||||
SET Prelevato=1
|
||||
WHERE (CodLista = @CodLista) AND (UDC = @UDC)
|
||||
END
|
||||
ELSE -- INSERT!
|
||||
BEGIN
|
||||
INSERT INTO RigheListePrelievo (CodLista, UDC, Qta, Proposto, Prelevato)
|
||||
SELECT @CodLista, @UDC, Qta, 0, 1
|
||||
FROM ElencoCartellini
|
||||
WHERE (UDC = @UDC)
|
||||
END
|
||||
|
||||
|
||||
-- restituisce la tab delle righe di prelievo della lista indicata
|
||||
|
||||
SELECT *
|
||||
FROM RigheListePrelievo
|
||||
WHERE (CodLista = @CodLista) AND (UDC = @UDC)
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(110, GETDATE())
|
||||
GO
|
||||
|
||||
|
||||
@@ -0,0 +1,922 @@
|
||||
/* versione 160 */
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table ElencoListePrelievo add
|
||||
Destinatario nvarchar(50)
|
||||
go
|
||||
|
||||
create index i_destinatario on ElencoListePrelievo(Destinatario)
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_creaListaPrelievo
|
||||
*
|
||||
* crea un nuovo record nella ElencoListePrelievo e restituisce il codice ID appena creato
|
||||
*
|
||||
* Steamware, S.E.L. 8 (FROM Stintino)
|
||||
* mod: 2010.07.30
|
||||
*
|
||||
************************************/
|
||||
alter PROCEDURE stp_creaListaPrelievo
|
||||
(
|
||||
@Anno NVARCHAR(2),
|
||||
@Mese NVARCHAR(2),
|
||||
@CodTipoLista NVARCHAR(10),
|
||||
@CodCS NCHAR(2),
|
||||
@CodCliente NVARCHAR(6),
|
||||
@RagSociale NVARCHAR(35),
|
||||
@CodSoggetto NCHAR(16),
|
||||
@Particolare NVARCHAR(15),
|
||||
@DescParticolare NVARCHAR(30),
|
||||
@DisegnoGrezzo NVARCHAR(30),
|
||||
@Esponente NVARCHAR(6),
|
||||
@Figura NVARCHAR(4),
|
||||
@CodImballo NVARCHAR(15),
|
||||
@QtaTot DECIMAL(10,2),
|
||||
@Destinatario NVARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
-- Dichiarazioni iniziali
|
||||
DECLARE @CodLista AS NVARCHAR(12)
|
||||
DECLARE @numLista AS INT
|
||||
DECLARE @temp AS INT
|
||||
DECLARE @ora AS DATETIME
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- codice lista di prelievo KAAMM00000 - K = start char, AA = anno, MM = mese, 00000 = progressivo
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- controllo se ci sia già una lista di prelievo per company / flusso anno
|
||||
BEGIN TRAN
|
||||
-- cerco nella tab contatori liste prelievo l'ultimo valido
|
||||
SET @numLista = (
|
||||
SELECT COUNT(*)
|
||||
FROM ContatoriListePrelievo
|
||||
WHERE CodCS = @CodCS
|
||||
AND Anno = @Anno
|
||||
AND Mese = @Mese
|
||||
)
|
||||
-- controllo se record c'è...
|
||||
IF(@numLista > 0)
|
||||
BEGIN
|
||||
-- se c'è incremento di 1 in tab
|
||||
UPDATE ContatoriListePrelievo
|
||||
SET LastIdx = LastIdx + 1
|
||||
WHERE CodCS = @CodCS
|
||||
AND Anno = @Anno
|
||||
AND Mese = @Mese
|
||||
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
-- lo creo!
|
||||
INSERT INTO ContatoriListePrelievo(CodCS, Anno, Mese, LastIdx)
|
||||
VALUES (@CodCS, @Anno, @Mese, 1)
|
||||
END
|
||||
-- aggiorno numero lista prelievo
|
||||
SET @numLista = (
|
||||
SELECT LastIdx
|
||||
FROM ContatoriListePrelievo
|
||||
WHERE CodCS = @CodCS
|
||||
AND Anno = @Anno
|
||||
AND Mese = @Mese
|
||||
|
||||
)
|
||||
COMMIT TRAN
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
BEGIN TRAN
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Ciclo principale x inserimento nuovo record
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- ottengo il nuovo codice lista di prelievo completo
|
||||
SET @CodLista = 'K' + @CodCS + @Anno + dbo.f_padLeft(CAST(@Mese AS NVARCHAR(2)), 2, '0') + + dbo.f_padLeft(CAST(@numLista AS NVARCHAR(5)), 5, '0')
|
||||
|
||||
INSERT INTO ElencoListePrelievo
|
||||
(CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSoggetto, Particolare, DescParticolare, DisegnoGrezzo, Esponente, Figura, CodImballo, QtaTot, CodStatoLista, Destinatario)
|
||||
VALUES (@CodLista, @CodTipoLista, @CodCS, GETDATE(), @CodCliente, @RagSociale, @CodSoggetto, @Particolare, @DescParticolare, @DisegnoGrezzo, @Esponente,@Figura, @CodImballo, @QtaTot, 0, @Destinatario)
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
SELECT * FROM V_elencoListePrelievo WHERE CodLista = @CodLista;
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
create VIEW v_selDestinatariListePrelievo
|
||||
AS
|
||||
SELECT DISTINCT ISNULL(Destinatario, '') AS Destinatario
|
||||
FROM dbo.ElencoListePrelievo
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "ElencoListePrelievo"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 38
|
||||
Bottom = 315
|
||||
Right = 208
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 2
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 9
|
||||
Width = 284
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
End
|
||||
End
|
||||
Begin CriteriaPane =
|
||||
Begin ColumnWidths = 11
|
||||
Column = 1440
|
||||
Alias = 900
|
||||
Table = 1170
|
||||
Output = 720
|
||||
Append = 1400
|
||||
NewValue = 1170
|
||||
SortType = 1350
|
||||
SortOrder = 1410
|
||||
GroupBy = 1350
|
||||
Filter = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
End
|
||||
End
|
||||
End
|
||||
', 'SCHEMA', 'dbo', 'VIEW', 'v_selDestinatariListePrelievo'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPaneCount', 1, 'SCHEMA', 'dbo', 'VIEW', 'v_selDestinatariListePrelievo'
|
||||
go
|
||||
|
||||
alter VIEW V_elencoListePrelievo
|
||||
AS
|
||||
SELECT TOP (100) PERCENT dbo.ElencoListePrelievo.CodLista, dbo.ElencoListePrelievo.CodTipoLista, dbo.ElencoListePrelievo.CodCS, dbo.ElencoListePrelievo.DataCreaz,
|
||||
dbo.ElencoListePrelievo.CodCliente, dbo.ElencoListePrelievo.RagSociale, dbo.ElencoListePrelievo.CodSoggetto, dbo.ElencoListePrelievo.Particolare,
|
||||
dbo.ElencoListePrelievo.DescParticolare, dbo.ElencoListePrelievo.DisegnoGrezzo, dbo.ElencoListePrelievo.Esponente, dbo.ElencoListePrelievo.Figura,
|
||||
dbo.ElencoListePrelievo.CodImballo, dbo.ElencoListePrelievo.QtaTot, dbo.ElencoListePrelievo.CodStatoLista, ISNULL(dbo.v_righePrelevate.TotQta, 0) AS Prelevato,
|
||||
dbo.ElencoListePrelievo.Destinatario
|
||||
FROM dbo.ElencoListePrelievo LEFT OUTER JOIN
|
||||
dbo.v_righePrelevate ON dbo.ElencoListePrelievo.CodLista = dbo.v_righePrelevate.CodLista
|
||||
ORDER BY dbo.ElencoListePrelievo.DataCreaz DESC
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
update ElencoListePrelievo
|
||||
set Destinatario='-'
|
||||
where Destinatario is null
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
DELETE FROM dbo.RigheListePrelievo WHERE CodLista=N'KMA100700004' and UDC=N'UMAB310000752'
|
||||
DELETE FROM dbo.RigheListePrelievo WHERE CodLista=N'KMA100700004' and UDC=N'UMAB310000754'
|
||||
DELETE FROM dbo.RigheListePrelievo WHERE CodLista=N'KMA100700004' and UDC=N'UMAB310000756'
|
||||
DELETE FROM dbo.RigheListePrelievo WHERE CodLista=N'KMA100700004' and UDC=N'UMAB310000758'
|
||||
DELETE FROM dbo.RigheListePrelievo WHERE CodLista=N'KMA100700005' and UDC=N'UMAB310000752'
|
||||
DELETE FROM dbo.RigheListePrelievo WHERE CodLista=N'KMA100700005' and UDC=N'UMAB310000754'
|
||||
DELETE FROM dbo.RigheListePrelievo WHERE CodLista=N'KMA100700005' and UDC=N'UMAB310000756'
|
||||
DELETE FROM dbo.RigheListePrelievo WHERE CodLista=N'KMA100700005' and UDC=N'UMAB310000758'
|
||||
DELETE FROM dbo.RigheListePrelievo WHERE CodLista=N'KMA100700016' and UDC=N'UMAB310000752'
|
||||
DELETE FROM dbo.RigheListePrelievo WHERE CodLista=N'KMA100700016' and UDC=N'UMAB310000754'
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
UPDATE dbo.ElencoListePrelievo SET
|
||||
CodStatoLista=4, Destinatario=N'Gatti'
|
||||
WHERE CodLista=N'KMA100700017'
|
||||
INSERT INTO dbo.ElencoListePrelievo
|
||||
VALUES (N'KMA100700019', N'02-PreCli', N'MA', '2010-07-27 12:06:38.443', N'00505 ', N'ZF LENKSYSTEME GmbH', N'O990000000000000', N'P00505005162', N'SCATOLA STERZO DX VOLVO ', N'7853 501 162 ', N'*', N'*', N'*', 100.00, 0, N'RoNo')
|
||||
INSERT INTO dbo.ElencoListePrelievo
|
||||
VALUES (N'KMA100700023', N'01-PreFus', N'MA', '2010-07-30 10:57:19.340', N'00505 ', N'ZF LENKSYSTEME GmbH', N'O990000000000000', N'P00505005162', N'SCATOLA STERZO DX VOLVO ', N'7853 501 162 ', N'*', N'*', N'*', 120.00, 4, N'-')
|
||||
INSERT INTO dbo.ElencoListePrelievo
|
||||
VALUES (N'KMA100700024', N'01-PreFus', N'MA', '2010-07-30 10:58:24.013', N'00505 ', N'ZF LENKSYSTEME GmbH', N'O990000000000000', N'P00505005162', N'SCATOLA STERZO DX VOLVO ', N'7853 501 162 ', N'*', N'*', N'*', 120.00, 4, N'-')
|
||||
DELETE FROM dbo.ElencoListePrelievo WHERE CodLista=N'KMA100700004'
|
||||
DELETE FROM dbo.ElencoListePrelievo WHERE CodLista=N'KMA100700005'
|
||||
DELETE FROM dbo.ElencoListePrelievo WHERE CodLista=N'KMA100700016'
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.RigheListePrelievo_AS
|
||||
VALUES (N'KMA100700017', N'UMAB310000442', 63.00, 1, 1)
|
||||
INSERT INTO dbo.RigheListePrelievo_AS
|
||||
VALUES (N'KMA100700017', N'UMAB310000444', 54.00, 1, 1)
|
||||
INSERT INTO dbo.RigheListePrelievo_AS
|
||||
VALUES (N'KMA100700023', N'UMAB310000004', 56.00, 1, 1)
|
||||
INSERT INTO dbo.RigheListePrelievo_AS
|
||||
VALUES (N'KMA100700023', N'UMAB310001248', 70.00, 1, 1)
|
||||
INSERT INTO dbo.RigheListePrelievo_AS
|
||||
VALUES (N'KMA100700024', N'UMAB310001246', 59.00, 1, 1)
|
||||
INSERT INTO dbo.RigheListePrelievo_AS
|
||||
VALUES (N'KMA100700024', N'UMAB310001250', 65.00, 1, 1)
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table ElencoListePrelievo_AS add
|
||||
Destinatario nvarchar(50)
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_LP_exportToAs400
|
||||
*
|
||||
* esporta la lista di prelievo (e le relative righe) verso AS400 andando a copaire nelle relative tabelle _AS
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.19
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_LP_exportToAs400
|
||||
(
|
||||
@CodLista NVARCHAR(12)
|
||||
)
|
||||
AS
|
||||
|
||||
-- copio la lista (intestazione)
|
||||
INSERT INTO ElencoListePrelievo_AS
|
||||
SELECT *
|
||||
FROM ElencoListePrelievo
|
||||
WHERE (CodLista = @CodLista)
|
||||
|
||||
-- copio le righe lista di dettaglio
|
||||
INSERT INTO RigheListePrelievo_AS
|
||||
SELECT *
|
||||
FROM RigheListePrelievo
|
||||
WHERE (CodLista = @CodLista) AND Prelevato = 1
|
||||
|
||||
-- aggiorno le quantità passate ad AS...
|
||||
UPDATE ElencoListePrelievo_AS
|
||||
SET QtaTot = ( SELECT SUM(Qta) AS QtaTot FROM RigheListePrelievo WHERE (CodLista =@CodLista) AND Prelevato = 1 )
|
||||
WHERE (CodLista = @CodLista)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.ElencoListePrelievo_AS
|
||||
VALUES (N'KMA100700017', N'03-TerWip', N'MA', '2010-07-27 11:59:22.417', N'00505 ', N'ZF LENKSYSTEME GmbH', N'O990000000000000', N'P00505005162', N'SCATOLA STERZO DX VOLVO ', N'7853 501 162 ', N'*', N'*', N'*', 117.00, 4, NULL)
|
||||
INSERT INTO dbo.ElencoListePrelievo_AS
|
||||
VALUES (N'KMA100700023', N'01-PreFus', N'MA', '2010-07-30 10:57:19.340', N'00505 ', N'ZF LENKSYSTEME GmbH', N'O990000000000000', N'P00505005162', N'SCATOLA STERZO DX VOLVO ', N'7853 501 162 ', N'*', N'*', N'*', 126.00, 4, NULL)
|
||||
INSERT INTO dbo.ElencoListePrelievo_AS
|
||||
VALUES (N'KMA100700024', N'01-PreFus', N'MA', '2010-07-30 10:58:24.013', N'00505 ', N'ZF LENKSYSTEME GmbH', N'O990000000000000', N'P00505005162', N'SCATOLA STERZO DX VOLVO ', N'7853 501 162 ', N'*', N'*', N'*', 124.00, 4, NULL)
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_getDestListePrelLike
|
||||
*
|
||||
* ottiene l'elenco dei destinatari liste di prelievo data la substring di ricerca
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.30
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_getDestListePrelLike
|
||||
(
|
||||
@cerca VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT * FROM v_selDestinatariListePrelievo
|
||||
WHERE Destinatario LIKE '%'+ @cerca + '%'
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
UPDATE dbo.Blocchi SET
|
||||
NumX=15, NumY=5
|
||||
WHERE IdxBlocco=1
|
||||
UPDATE dbo.Blocchi SET
|
||||
NumX=15, NumY=5
|
||||
WHERE IdxBlocco=4
|
||||
UPDATE dbo.Blocchi SET
|
||||
NumX=10, NumY=5
|
||||
WHERE IdxBlocco=6
|
||||
DELETE FROM dbo.Blocchi WHERE IdxBlocco=23
|
||||
DELETE FROM dbo.Blocchi WHERE IdxBlocco=24
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.PosizioneUdcCorrente
|
||||
VALUES (N'UMAB310000114', 57, N'MA', '2010-04-29 01:00:00.000')
|
||||
UPDATE dbo.PosizioneUdcCorrente SET
|
||||
DataRif='2010-07-28 16:20:57.250'
|
||||
WHERE UDC=N'UMAB310000140' and IdxCella=88
|
||||
INSERT INTO dbo.PosizioneUdcCorrente
|
||||
VALUES (N'UMAB310000142', 88, N'MA', '2010-07-28 16:08:06.447')
|
||||
INSERT INTO dbo.PosizioneUdcCorrente
|
||||
VALUES (N'UMAB310000162', 99, N'MA', '2010-04-28 02:00:00.000')
|
||||
UPDATE dbo.PosizioneUdcCorrente SET
|
||||
DataRif='2010-07-23 18:12:54.563'
|
||||
WHERE UDC=N'UMAB310000214' and IdxCella=129
|
||||
UPDATE dbo.PosizioneUdcCorrente SET
|
||||
DataRif='2010-04-30 01:00:00.000'
|
||||
WHERE UDC=N'UMAB310000220' and IdxCella=128
|
||||
DELETE FROM dbo.PosizioneUdcCorrente WHERE UDC=N'UMAB310000004' and IdxCella=2
|
||||
DELETE FROM dbo.PosizioneUdcCorrente WHERE UDC=N'UMAB310000114' and IdxCella=499
|
||||
DELETE FROM dbo.PosizioneUdcCorrente WHERE UDC=N'UMAB310000142' and IdxCella=89
|
||||
DELETE FROM dbo.PosizioneUdcCorrente WHERE UDC=N'UMAB310000162' and IdxCella=499
|
||||
DELETE FROM dbo.PosizioneUdcCorrente WHERE UDC=N'UMAB310000442' and IdxCella=76
|
||||
DELETE FROM dbo.PosizioneUdcCorrente WHERE UDC=N'UMAB310000444' and IdxCella=77
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.PosizioneUdcStorico
|
||||
VALUES (N'UMAB310000004', 2, N'MA', '2010-04-15 00:00:00.000', '2010-07-30 11:38:33.483')
|
||||
INSERT INTO dbo.PosizioneUdcStorico
|
||||
VALUES (N'UMAB310000004', 202, N'MA', '2010-07-30 11:38:33.493', '2010-07-30 11:38:38.883')
|
||||
INSERT INTO dbo.PosizioneUdcStorico
|
||||
VALUES (N'UMAB310000140', 88, N'MA', '2010-03-26 01:00:00.000', '2010-07-28 15:50:22.837')
|
||||
INSERT INTO dbo.PosizioneUdcStorico
|
||||
VALUES (N'UMAB310000140', 89, N'MA', '2010-07-28 15:50:22.837', '2010-07-28 16:00:20.507')
|
||||
INSERT INTO dbo.PosizioneUdcStorico
|
||||
VALUES (N'UMAB310000142', 88, N'MA', '2010-07-28 15:49:02.407', '2010-07-28 16:00:05.967')
|
||||
INSERT INTO dbo.PosizioneUdcStorico
|
||||
VALUES (N'UMAB310000142', 89, N'MA', '2010-03-24 00:00:00.000', '2010-07-28 15:49:02.357')
|
||||
INSERT INTO dbo.PosizioneUdcStorico
|
||||
VALUES (N'UMAB310000442', 76, N'MA', '2010-07-19 17:59:09.310', '2010-07-30 12:32:25.000')
|
||||
INSERT INTO dbo.PosizioneUdcStorico
|
||||
VALUES (N'UMAB310000442', 206, N'MA', '2010-07-30 12:32:25.000', '2010-07-30 12:32:28.307')
|
||||
INSERT INTO dbo.PosizioneUdcStorico
|
||||
VALUES (N'UMAB310000444', 77, N'MA', '2010-07-19 17:59:17.063', '2010-07-30 12:32:25.033')
|
||||
INSERT INTO dbo.PosizioneUdcStorico
|
||||
VALUES (N'UMAB310000444', 206, N'MA', '2010-07-30 12:32:25.033', '2010-07-30 12:32:28.313')
|
||||
INSERT INTO dbo.PosizioneUdcStorico
|
||||
VALUES (N'UMAB310001246', 202, N'MA', '2010-07-30 12:31:44.230', '2010-07-30 12:31:56.213')
|
||||
INSERT INTO dbo.PosizioneUdcStorico
|
||||
VALUES (N'UMAB310001248', 202, N'MA', '2010-07-30 12:31:34.947', '2010-07-30 12:31:47.127')
|
||||
INSERT INTO dbo.PosizioneUdcStorico
|
||||
VALUES (N'UMAB310001250', 202, N'MA', '2010-07-30 12:31:44.243', '2010-07-30 12:31:56.230')
|
||||
DELETE FROM dbo.PosizioneUdcStorico WHERE UDC=N'UMAB310000114' and IdxCella=57
|
||||
DELETE FROM dbo.PosizioneUdcStorico WHERE UDC=N'UMAB310000162' and IdxCella=99
|
||||
DELETE FROM dbo.PosizioneUdcStorico WHERE UDC=N'UMAB310000214' and IdxCella=129
|
||||
DELETE FROM dbo.PosizioneUdcStorico WHERE UDC=N'UMAB310000214' and IdxCella=130
|
||||
DELETE FROM dbo.PosizioneUdcStorico WHERE UDC=N'UMAB310000214' and IdxCella=139
|
||||
DELETE FROM dbo.PosizioneUdcStorico WHERE UDC=N'UMAB310000220' and IdxCella=128
|
||||
DELETE FROM dbo.PosizioneUdcStorico WHERE UDC=N'UMAB310000220' and IdxCella=133
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
UPDATE dbo.Celle SET
|
||||
Piena=0
|
||||
WHERE IdxCella=5
|
||||
UPDATE dbo.Celle SET
|
||||
IdxTipoCella=5
|
||||
WHERE IdxCella=76
|
||||
UPDATE dbo.Celle SET
|
||||
Attiva=0
|
||||
WHERE IdxCella=80
|
||||
UPDATE dbo.Celle SET
|
||||
Attiva=0
|
||||
WHERE IdxCella=85
|
||||
UPDATE dbo.Celle SET
|
||||
Attiva=0
|
||||
WHERE IdxCella=90
|
||||
UPDATE dbo.Celle SET
|
||||
Attiva=0
|
||||
WHERE IdxCella=95
|
||||
UPDATE dbo.Celle SET
|
||||
Attiva=0
|
||||
WHERE IdxCella=100
|
||||
UPDATE dbo.Celle SET
|
||||
Attiva=0
|
||||
WHERE IdxCella=105
|
||||
UPDATE dbo.Celle SET
|
||||
Attiva=0
|
||||
WHERE IdxCella=110
|
||||
UPDATE dbo.Celle SET
|
||||
Attiva=0
|
||||
WHERE IdxCella=115
|
||||
UPDATE dbo.Celle SET
|
||||
Attiva=0
|
||||
WHERE IdxCella=120
|
||||
UPDATE dbo.Celle SET
|
||||
Attiva=0
|
||||
WHERE IdxCella=125
|
||||
UPDATE dbo.Celle SET
|
||||
Attiva=0
|
||||
WHERE IdxCella=130
|
||||
UPDATE dbo.Celle SET
|
||||
Attiva=0
|
||||
WHERE IdxCella=135
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=207
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=208
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=209
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=210
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=211
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=212
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=213
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=214
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=215
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=216
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=217
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=218
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=219
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=220
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=221
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=222
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=223
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=224
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=225
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=226
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=227
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=228
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=229
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=230
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=231
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=232
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=233
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=234
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=235
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=236
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=237
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=238
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=239
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=240
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=241
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=242
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=243
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=244
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=245
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=246
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=247
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=248
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=249
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=250
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=251
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=252
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=253
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=254
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=255
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=256
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=257
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=258
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=259
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=260
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=261
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=262
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=263
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=264
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=265
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=266
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=267
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=268
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=269
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=270
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=271
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=272
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=273
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=274
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=275
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=276
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=277
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=278
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=279
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=280
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=281
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=282
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=283
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=284
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=285
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=286
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=287
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=288
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=289
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=290
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=291
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=292
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=293
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=294
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=295
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=296
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=297
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=298
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=299
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=300
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=301
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=302
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=303
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=304
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=305
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=306
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=307
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=308
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=309
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=310
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=311
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=312
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=313
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=314
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=315
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=316
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=317
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=318
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=319
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=320
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=321
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=322
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=323
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=324
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=325
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=326
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=327
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=328
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=329
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=330
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=331
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=332
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=333
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=334
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=335
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=336
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=337
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=338
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=339
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=340
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=341
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=342
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=343
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=344
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=345
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=346
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=347
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=348
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=349
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=350
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=351
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=352
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=353
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=354
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=355
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=356
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=357
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=358
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=359
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=360
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=361
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=362
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=363
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=364
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=365
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=366
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=367
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=368
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=369
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=370
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=371
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=372
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=373
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=374
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=375
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=376
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=377
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=378
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=379
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=380
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=381
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=382
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=383
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=384
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=385
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=386
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=387
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=388
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=389
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=390
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=391
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=392
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=393
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=394
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=395
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=396
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=397
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=398
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=399
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=400
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=401
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=402
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=403
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=404
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=405
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=406
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=407
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=408
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=409
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=410
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=411
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=412
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=413
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=414
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=415
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=416
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=417
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=418
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=419
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=420
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=421
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=422
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=423
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=424
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=425
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=426
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=427
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=428
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=429
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=430
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=431
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=432
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=433
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=434
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=435
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=436
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=437
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=438
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=439
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=440
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=441
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=442
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=443
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=444
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=445
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=446
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=447
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=448
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=449
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=450
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=451
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=452
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=453
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=454
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=455
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=456
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=457
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=458
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=459
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=460
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=461
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=462
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=463
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=464
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=465
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=466
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=467
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=468
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=469
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=470
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=471
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=472
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=473
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=474
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=475
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=476
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=477
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=478
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=479
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=480
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=481
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=482
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=483
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=484
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=485
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=486
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=487
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=488
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=489
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=490
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=491
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=492
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=493
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=494
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=495
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=496
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=497
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=498
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=499
|
||||
DELETE FROM dbo.Celle WHERE IdxCella=500
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
UPDATE dbo.TipoCella SET
|
||||
Quantita=200, Capienza=3, Max_X=3000, Max_Kg=3000
|
||||
WHERE IdxTipoCella=5
|
||||
DELETE FROM dbo.TipoCella WHERE IdxTipoCella=16
|
||||
DELETE FROM dbo.TipoCella WHERE IdxTipoCella=17
|
||||
DELETE FROM dbo.TipoCella WHERE IdxTipoCella=18
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(160, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,491 @@
|
||||
/* Sistemo parametri x cambio posizioni da web.config */
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.AnagTipoEvento
|
||||
VALUES (N'UDC_FINITO', N'Richiesta UDC Finito')
|
||||
INSERT INTO dbo.AnagTipoEvento
|
||||
VALUES (N'UDC_WIP', N'Richiesta UDC WIP')
|
||||
go
|
||||
|
||||
commit transaction
|
||||
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[41] 4[20] 2[11] 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 = "Celle"
|
||||
Begin Extent =
|
||||
Top = 149
|
||||
Left = 629
|
||||
Bottom = 313
|
||||
Right = 799
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "AnagMag"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 662
|
||||
Bottom = 118
|
||||
Right = 832
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "Blocchi"
|
||||
Begin Extent =
|
||||
Top = 36
|
||||
Left = 974
|
||||
Bottom = 257
|
||||
Right = 1144
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "PosizioneUdcCorrente"
|
||||
Begin Extent =
|
||||
Top = 159
|
||||
Left = 201
|
||||
Bottom = 288
|
||||
Right = 371
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "TipoCella"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 38
|
||||
Bottom = 135
|
||||
Right = 224
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 12
|
||||
Width = 284
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1665
|
||||
Width = 1665
|
||||
Width = 1500
|
||||
End
|
||||
End
|
||||
Begin CriteriaPane =
|
||||
', 'SCHEMA', 'dbo', 'VIEW', 'V_MagazziniOverview'
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
alter VIEW V_statoCelleCapienzaAssegnati
|
||||
AS
|
||||
SELECT dbo.Celle.IdxCella, dbo.Celle.CodCella, dbo.TipoCella.Capienza, COUNT(dbo.PosizioneUdcCorrente.UDC) AS UdcAssegnati, dbo.Celle.Piena
|
||||
FROM dbo.TipoCella INNER JOIN
|
||||
dbo.Celle ON dbo.TipoCella.IdxTipoCella = dbo.Celle.IdxTipoCella INNER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella
|
||||
GROUP BY dbo.TipoCella.Capienza, dbo.Celle.IdxCella, dbo.Celle.Piena, dbo.Celle.CodCella
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_anagOperatoriGetByCodSogg
|
||||
*
|
||||
* ottiene l'elenco degli operatori da CodSoggetto
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.12
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_anagOperatoriGetByCodSogg
|
||||
(
|
||||
@CodSoggetto VARCHAR(17)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT *
|
||||
FROM RilPro.AnagOperatori
|
||||
WHERE (CodSoggetto = @CodSoggetto)
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_elencoListePrelievoUpdateStato
|
||||
*
|
||||
* aggiorna la lista di prelievo indicando lo stato richiesto
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.06
|
||||
*
|
||||
************************************/
|
||||
alter PROCEDURE stp_elencoListePrelievoUpdateStato
|
||||
(
|
||||
@NewCodSoggetto NCHAR(17),
|
||||
@CodListaAttuale AS varchar(12),
|
||||
@CodStatoLista INT
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE ElencoListePrelievo
|
||||
SET CodSoggetto = @NewCodSoggetto, CodStatoLista = @CodStatoLista
|
||||
WHERE (CodLista = @CodListaAttuale)
|
||||
|
||||
SELECT * FROM V_elencoListePrelievo WHERE (CodLista = @CodListaAttuale)
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_elencoListePrelievoUpdateStato
|
||||
*
|
||||
* aggiorna la lista di prelievo indicando lo stato richiesto
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.06
|
||||
*
|
||||
************************************/
|
||||
alter PROCEDURE stp_elencoListePrelievoUpdateStato
|
||||
(
|
||||
@NewCodSoggetto NCHAR(17),
|
||||
@CodListaAttuale AS varchar(12),
|
||||
@CodStatoLista INT
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE ElencoListePrelievo
|
||||
SET CodSoggetto = @NewCodSoggetto, CodStatoLista = @CodStatoLista
|
||||
WHERE (CodLista = @CodListaAttuale)
|
||||
|
||||
SELECT * FROM V_elencoListePrelievo WHERE (CodLista = @CodListaAttuale)
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_elencoListePrelievoUpdateStato
|
||||
*
|
||||
* aggiorna la lista di prelievo indicando lo stato richiesto
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.06
|
||||
*
|
||||
************************************/
|
||||
alter PROCEDURE stp_elencoListePrelievoUpdateStato
|
||||
(
|
||||
@NewCodSoggetto NCHAR(17),
|
||||
@CodListaAttuale AS varchar(12),
|
||||
@CodStatoLista INT
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE ElencoListePrelievo
|
||||
SET CodSoggetto = @NewCodSoggetto, CodStatoLista = @CodStatoLista
|
||||
WHERE (CodLista = @CodListaAttuale)
|
||||
|
||||
SELECT * FROM V_elencoListePrelievo WHERE (CodLista = @CodListaAttuale)
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_elencoListePrelievoByCodLista
|
||||
*
|
||||
* elenco liste di prelievo ATTIVE da codice soggetto
|
||||
*
|
||||
* Steamware, S.E.L
|
||||
* mod: 2010.08.25
|
||||
*
|
||||
************************************/
|
||||
create PROCEDURE stp_elencoLP_attiveByCodSoggetto
|
||||
(
|
||||
@CodSoggetto NVARCHAR(17)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT *
|
||||
FROM V_elencoListePrelievo
|
||||
WHERE CodStatoLista = 2 AND (CodSoggetto = @CodSoggetto)
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_spostaUdc
|
||||
*
|
||||
* sposta un UDC, salvandone la posizione precedente (se esiste) nella tab storica
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.11
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_spostaUdc
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@UDC VARCHAR(50),
|
||||
--@IdxCellaFrom INT,
|
||||
@IdxCellaTo INT
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN TRAN
|
||||
-- inizio mettendo in storico la posizione attuale dell'UDC (SE esiste)
|
||||
INSERT INTO PosizioneUdcStorico(UDC, IdxCella, CodCS, DataInizio, DataFine)
|
||||
(
|
||||
SELECT UDC, IdxCella, CodCS, DataRif as DataInizio, GETDATE() as DataFine
|
||||
FROM PosizioneUdcCorrente
|
||||
WHERE UDC = @UDC-- AND IdxCella = @IdxCellaFrom
|
||||
)
|
||||
|
||||
-- libero la posizione attuale dell'UDC (se c'è...)
|
||||
DELETE
|
||||
FROM PosizioneUdcCorrente
|
||||
WHERE UDC = @UDC-- AND IdxCella = @IdxCellaFrom
|
||||
|
||||
-- creo una nuova posizione per l'UDC
|
||||
INSERT INTO PosizioneUdcCorrente(UDC, IdxCella, CodCS, DataRif)
|
||||
VALUES(@UDC, @IdxCellaTo, @CodCS, GETDATE())
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_StatoCelleByCodCella
|
||||
*
|
||||
* stato cella filtrato x CodCella
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.08.03
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_StatoCelleByCodCella
|
||||
(
|
||||
@CodCella VARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT *
|
||||
FROM V_statoCelleCapienzaAssegnati
|
||||
WHERE (CodCella= @CodCella)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_StatoCelleByIdxCella
|
||||
*
|
||||
* stato cella filtrato x idxCella
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.08.03
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_StatoCelleByIdxCella
|
||||
(
|
||||
@IdxCella INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT *
|
||||
FROM V_statoCelleCapienzaAssegnati
|
||||
WHERE (IdxCella= @IdxCella)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_StatoCelleOverbooked
|
||||
*
|
||||
* elenco delle celle con overbookinbg (UDC assegnati >= capienza)
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.08.03
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_StatoCelleOverbooked
|
||||
AS
|
||||
|
||||
SELECT *
|
||||
FROM V_statoCelleCapienzaAssegnati
|
||||
WHERE (UdcAssegnati >= Capienza)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(200, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,152 @@
|
||||
/* Sistemo unique x cod blocco */
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
update Blocchi set CodBlocco = N'' where CodBlocco is null
|
||||
go
|
||||
|
||||
alter table Blocchi alter column
|
||||
CodBlocco nvarchar(3) not null
|
||||
go
|
||||
|
||||
alter table Blocchi add
|
||||
constraint i_CodBlocco unique(CodBlocco)
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_LP_exportToAs400
|
||||
*
|
||||
* esporta la lista di prelievo (e le relative righe) verso AS400 andando a copaire nelle relative tabelle _AS
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.19
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_LP_exportToAs400
|
||||
(
|
||||
@CodLista NVARCHAR(12)
|
||||
)
|
||||
AS
|
||||
|
||||
-- copio la lista (intestazione)
|
||||
INSERT INTO ElencoListePrelievo_AS
|
||||
SELECT *
|
||||
FROM ElencoListePrelievo
|
||||
WHERE (CodLista = @CodLista)
|
||||
|
||||
-- copio le righe lista di dettaglio
|
||||
INSERT INTO RigheListePrelievo_AS
|
||||
SELECT *
|
||||
FROM RigheListePrelievo
|
||||
WHERE (CodLista = @CodLista) AND Prelevato = 1
|
||||
|
||||
-- aggiorno le quantità passate ad AS...
|
||||
UPDATE ElencoListePrelievo_AS
|
||||
SET QtaTot = ( SELECT SUM(Qta) AS QtaTot FROM RigheListePrelievo WHERE (CodLista = @CodLista) AND Prelevato = 1 )
|
||||
WHERE (CodLista = @CodLista)
|
||||
|
||||
-- IMPORTANTE: in caso siano rimasti riferimenti ad un UDC scaricato in AS in altre liste di prelievo li tolgo in modo da "ripulirle" ed evitare che lo stesso UDC venga prelevato 2 volte...
|
||||
DELETE RLP
|
||||
FROM RigheListePrelievo RLP
|
||||
INNER JOIN ElencoListePrelievo ELP
|
||||
ON RLP.CodLista = ELP.CodLista
|
||||
WHERE ELP.CodStatoLista < 4 AND RLP.CodLista <> @CodLista AND RLP.UDC IN (
|
||||
SELECT UDC
|
||||
FROM RigheListePrelievo
|
||||
WHERE (CodLista = @CodLista) AND Prelevato = 1
|
||||
)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_RLP_sbloccaNonPrelevate
|
||||
*
|
||||
* sblocca righe liste di prelievo ATTIVE x UDC non prelevati
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.08.31
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_RLP_sbloccaNonPrelevate
|
||||
(
|
||||
@UDC NVARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
-- creo una CTE x le righe liste prelievo ATTIVE (escludo bozze e liste scaricate) - candidate per sblocco
|
||||
WITH cteUdcRigheAttive AS (
|
||||
SELECT RLP.CodLista, RLP.UDC, RLP.Prelevato
|
||||
FROM RigheListePrelievo AS RLP INNER JOIN ElencoListePrelievo AS ELP
|
||||
ON RLP.CodLista = ELP.CodLista
|
||||
WHERE (ELP.CodStatoLista BETWEEN 1 AND 3) AND RLP.Prelevato = 1
|
||||
)
|
||||
/*
|
||||
,
|
||||
|
||||
-- creo una CTE x gli UDC che sono attualmente nella posizione virtuale di VLP (Virtual Lista Prelievo) e quindi VANNO ESCLUSE dallo sblocco
|
||||
cteUdcInPrelievo AS (
|
||||
SELECT UDC
|
||||
FROM PosizioneUdcCorrente
|
||||
WHERE (IdxCella IN (
|
||||
SELECT c.IdxCella
|
||||
FROM Celle AS c INNER JOIN TipoCella AS tc ON c.IdxTipoCella = tc.IdxTipoCella
|
||||
WHERE (tc.CodMag = 'VMLP')))
|
||||
)
|
||||
|
||||
-- effettua "sblocco" delle righe liste prelievo che danno UDC prelevati ma che NON risultano
|
||||
UPDATE cteUdcRigheAttive
|
||||
SET Prelevato = 0
|
||||
WHERE (Prelevato = 1)
|
||||
AND (UDC NOT IN (select * from cteUdcInPrelievo))
|
||||
*/
|
||||
|
||||
-- effettua "sblocco" delle righe liste prelievo che danno UDC prelevati ma che NON risultano
|
||||
UPDATE cteUdcRigheAttive
|
||||
SET Prelevato = 0
|
||||
WHERE UDC = @UDC
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(215, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,209 @@
|
||||
/* Sistemo stored x bugs risolti */
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_creaListaPrelievo
|
||||
*
|
||||
* crea un nuovo record nella ElencoListePrelievo e restituisce il codice ID appena creato
|
||||
*
|
||||
* Steamware, S.E.L. 8 (FROM Stintino)
|
||||
* mod: 2010.07.30
|
||||
*
|
||||
************************************/
|
||||
alter PROCEDURE stp_creaListaPrelievo
|
||||
(
|
||||
@Anno NVARCHAR(2),
|
||||
@Mese NVARCHAR(2),
|
||||
@CodTipoLista NVARCHAR(10),
|
||||
@CodCS NCHAR(2),
|
||||
@CodCliente NVARCHAR(6),
|
||||
@RagSociale NVARCHAR(35),
|
||||
@CodSoggetto NCHAR(17),
|
||||
@Particolare NVARCHAR(15),
|
||||
@DescParticolare NVARCHAR(30),
|
||||
@DisegnoGrezzo NVARCHAR(30),
|
||||
@Esponente NVARCHAR(6),
|
||||
@Figura NVARCHAR(4),
|
||||
@CodImballo NVARCHAR(15),
|
||||
@QtaTot DECIMAL(10,2),
|
||||
@Destinatario NVARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
-- Dichiarazioni iniziali
|
||||
DECLARE @CodLista AS NVARCHAR(12)
|
||||
DECLARE @numLista AS INT
|
||||
DECLARE @temp AS INT
|
||||
DECLARE @ora AS DATETIME
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- codice lista di prelievo KAAMM00000 - K = start char, AA = anno, MM = mese, 00000 = progressivo
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- controllo se ci sia già una lista di prelievo per company / flusso anno
|
||||
BEGIN TRAN
|
||||
-- cerco nella tab contatori liste prelievo l'ultimo valido
|
||||
SET @numLista = (
|
||||
SELECT COUNT(*)
|
||||
FROM ContatoriListePrelievo
|
||||
WHERE CodCS = @CodCS
|
||||
AND Anno = @Anno
|
||||
AND Mese = @Mese
|
||||
)
|
||||
-- controllo se record c'è...
|
||||
IF(@numLista > 0)
|
||||
BEGIN
|
||||
-- se c'è incremento di 1 in tab
|
||||
UPDATE ContatoriListePrelievo
|
||||
SET LastIdx = LastIdx + 1
|
||||
WHERE CodCS = @CodCS
|
||||
AND Anno = @Anno
|
||||
AND Mese = @Mese
|
||||
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
-- lo creo!
|
||||
INSERT INTO ContatoriListePrelievo(CodCS, Anno, Mese, LastIdx)
|
||||
VALUES (@CodCS, @Anno, @Mese, 1)
|
||||
END
|
||||
-- aggiorno numero lista prelievo
|
||||
SET @numLista = (
|
||||
SELECT LastIdx
|
||||
FROM ContatoriListePrelievo
|
||||
WHERE CodCS = @CodCS
|
||||
AND Anno = @Anno
|
||||
AND Mese = @Mese
|
||||
|
||||
)
|
||||
COMMIT TRAN
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
BEGIN TRAN
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Ciclo principale x inserimento nuovo record
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- ottengo il nuovo codice lista di prelievo completo
|
||||
SET @CodLista = 'K' + @CodCS + @Anno + dbo.f_padLeft(CAST(@Mese AS NVARCHAR(2)), 2, '0') + + dbo.f_padLeft(CAST(@numLista AS NVARCHAR(5)), 5, '0')
|
||||
|
||||
INSERT INTO ElencoListePrelievo
|
||||
(CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSoggetto, Particolare, DescParticolare, DisegnoGrezzo, Esponente, Figura, CodImballo, QtaTot, CodStatoLista, Destinatario)
|
||||
VALUES (@CodLista, @CodTipoLista, @CodCS, GETDATE(), @CodCliente, @RagSociale, @CodSoggetto, @Particolare, @DescParticolare, @DisegnoGrezzo, @Esponente,@Figura, @CodImballo, @QtaTot, 0, @Destinatario)
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
SELECT * FROM V_elencoListePrelievo WHERE CodLista = @CodLista;
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_RLP_delete
|
||||
*
|
||||
* cancella riga x un UDC non prelevato
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.03
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_RLP_delete
|
||||
(
|
||||
@Original_CodLista AS varchar(12),
|
||||
@Original_UDC NVARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
-- cancello
|
||||
DELETE FROM RigheListePrelievo
|
||||
WHERE CodLista = @Original_CodLista
|
||||
AND UDC = @Original_UDC
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_RLP_sbloccaNonPrelevate
|
||||
*
|
||||
* sblocca righe liste di prelievo ATTIVE x UDC non prelevati
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.08.31
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_RLP_sbloccaNonPrelevate
|
||||
(
|
||||
@CodLista NVARCHAR(12),
|
||||
@UDC NVARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
-- creo una CTE x le righe liste prelievo ATTIVE (escludo bozze e liste scaricate) - candidate per sblocco che NON fanno aprte della lista di prelievo attuale
|
||||
WITH cteUdcRigheAttive AS (
|
||||
SELECT RLP.CodLista, RLP.UDC, RLP.Prelevato
|
||||
FROM RigheListePrelievo AS RLP INNER JOIN ElencoListePrelievo AS ELP
|
||||
ON RLP.CodLista = ELP.CodLista
|
||||
WHERE (ELP.CodStatoLista BETWEEN 1 AND 3) AND RLP.Prelevato = 1 AND ELP.CodLista <> @CodLista
|
||||
)
|
||||
|
||||
-- effettua "sblocco" delle righe liste prelievo che danno UDC prelevati ma che NON risultano
|
||||
UPDATE cteUdcRigheAttive
|
||||
SET Prelevato = 0
|
||||
WHERE UDC = @UDC
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_RLP_updateQty
|
||||
*
|
||||
* aggiorna qta dato un UDC
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.06
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_RLP_updateQty
|
||||
(
|
||||
@UDC VARCHAR(50),
|
||||
@Qta DECIMAL
|
||||
)
|
||||
AS
|
||||
|
||||
update RigheListePrelievo
|
||||
SET Qta = @Qta
|
||||
WHERE (UDC = @UDC)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(220, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,207 @@
|
||||
-- struttura
|
||||
|
||||
alter table Celle add
|
||||
constraint FK_Celle_TipoCella foreign key(IdxTipoCella) references TipoCella(IdxTipoCella) on update cascade
|
||||
go
|
||||
|
||||
|
||||
--
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
alter VIEW V_statoCelleCapienzaAssegnati
|
||||
AS
|
||||
SELECT dbo.Celle.IdxCella, dbo.Celle.CodCella, dbo.TipoCella.Capienza, ISNULL(COUNT(dbo.PosizioneUdcCorrente.UDC), 0) AS UdcAssegnati, dbo.Celle.Piena
|
||||
FROM dbo.TipoCella INNER JOIN
|
||||
dbo.Celle ON dbo.TipoCella.IdxTipoCella = dbo.Celle.IdxTipoCella LEFT OUTER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella
|
||||
GROUP BY dbo.TipoCella.Capienza, dbo.Celle.IdxCella, dbo.Celle.Piena, dbo.Celle.CodCella
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
--
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_celleCreaMancantiBlocco
|
||||
*
|
||||
* crea il numero di celle richeiste e le assegna al blocco con valori default
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.05.18
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_celleCreaMancantiBlocco
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@CodMag VARCHAR(50),
|
||||
@IdxBlocco INT,
|
||||
@IdxTipoCellaNew INT
|
||||
)
|
||||
AS
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- setup iniziale valori XYZ del blocco
|
||||
---------------------------------------------------------------------
|
||||
DECLARE @CodBlocco VARCHAR(3);
|
||||
SET @CodBlocco = (SELECT CodBlocco FROM Blocchi WHERE IdxBlocco = @IdxBlocco)
|
||||
DECLARE @NumX INT;
|
||||
DECLARE @NumY INT;
|
||||
DECLARE @NumZ INT;
|
||||
SET @NumX = (SELECT NumX FROM Blocchi WHERE IdxBlocco = @IdxBlocco) ;
|
||||
SET @NumY = (SELECT NumY FROM Blocchi WHERE IdxBlocco = @IdxBlocco) ;
|
||||
SET @NumZ = (SELECT NumZ FROM Blocchi WHERE IdxBlocco = @IdxBlocco) ;
|
||||
|
||||
DECLARE @Index INT ;
|
||||
DECLARE @IdxTipoCella INT;
|
||||
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- creazione temp table x numeri delle dimensioni XYZ del blocco
|
||||
---------------------------------------------------------------------
|
||||
DECLARE @DimTable TABLE
|
||||
(
|
||||
dimensione VARCHAR(1),
|
||||
valore INT
|
||||
)
|
||||
|
||||
-- inserisco X
|
||||
SET @Index = 1 ;
|
||||
WHILE @Index <= @NumX
|
||||
BEGIN
|
||||
INSERT @DimTable(dimensione, valore)
|
||||
VALUES ('X', @Index)
|
||||
SET @Index = @Index + 1 ;
|
||||
END
|
||||
-- inserisco Y
|
||||
SET @Index = 1 ;
|
||||
WHILE @Index <= @NumY
|
||||
BEGIN
|
||||
INSERT @DimTable(dimensione, valore)
|
||||
VALUES ('Y', @Index)
|
||||
SET @Index = @Index + 1 ;
|
||||
END
|
||||
-- inserisco Z
|
||||
SET @Index = 1 ;
|
||||
WHILE @Index <= @NumZ
|
||||
BEGIN
|
||||
INSERT @DimTable(dimensione, valore)
|
||||
VALUES ('Z', @Index)
|
||||
SET @Index = @Index + 1 ;
|
||||
END
|
||||
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- creazione temp table x schema COMPLETO posizioni blocco
|
||||
---------------------------------------------------------------------
|
||||
DECLARE @SchemaBlocco TABLE
|
||||
(
|
||||
X INT,
|
||||
Y INT,
|
||||
Z INT
|
||||
)
|
||||
INSERT INTO @SchemaBlocco
|
||||
SELECT X_val.valore, Y_val.valore, Z_val.valore
|
||||
FROM (SELECT * FROM @DimTable WHERE dimensione='X') AS X_val,
|
||||
(SELECT * FROM @DimTable WHERE dimensione='Y') AS Y_val,
|
||||
(SELECT * FROM @DimTable WHERE dimensione='Z') AS Z_val
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-- cerco primo tipo di celle per il mag indicato SE non ce ne è una specificata
|
||||
----------------------------------------------------------------------------------
|
||||
IF @IdxTipoCellaNew > 0
|
||||
BEGIN
|
||||
SET @IdxTipoCella = @IdxTipoCellaNew
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
SET @IdxTipoCella = (SELECT TOP (1) ISNULL(IdxTipoCella, 0) AS IdxTipoCella
|
||||
FROM TipoCella
|
||||
WHERE (CodCS = @CodCS) AND (CodMag = @CodMag))
|
||||
END
|
||||
---------------------------------------------------------------------
|
||||
-- inserisco le celle nelle posizioni LIBERE del blocco
|
||||
---------------------------------------------------------------------
|
||||
INSERT INTO Celle(CodCS, CodCella, IdxTipoCella, Descrizione, Attiva, Piena, IdxBlocco,X,Y,Z)
|
||||
SELECT @CodCS, @CodBlocco + dbo.f_padLeft(CAST(sb.X AS VARCHAR),2,'0') + dbo.f_padLeft(CAST(sb.Y AS VARCHAR),2,'0') + dbo.f_padLeft(CAST(sb.Z AS VARCHAR),2,'0'), @IdxTipoCella, '-', 1, 0, @IdxBlocco, sb.X, sb.Y, sb.Z
|
||||
FROM @SchemaBlocco sb LEFT OUTER JOIN (SELECT *
|
||||
FROM Celle
|
||||
WHERE IdxBlocco = @IdxBlocco) c
|
||||
ON sb.X = c.X AND sb.Y = c.Y AND sb.Z = c.Z
|
||||
WHERE c.IdxCella IS NULL
|
||||
ORDER BY sb.X,sb.Y,sb.Z ASC
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
--
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ricercaFullTerminalino
|
||||
*
|
||||
* effettua una ricerca full text da terminalino x codice UDC (su cartellini), x nome particolare (AnagParticolari) o posizione (Celle)
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.10
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_ricercaFullTerminalino
|
||||
(
|
||||
@txtSearch VARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT 'UDC' AS Tipo, UDC AS label, UDC AS valore
|
||||
FROM dbo.ElencoCartellini
|
||||
WHERE UDC LIKE '%'+@txtSearch+'%'
|
||||
|
||||
UNION
|
||||
|
||||
SELECT 'Particolare' AS Tipo, Particolare AS label, Particolare AS valore
|
||||
FROM RilPro.AnagParticolari
|
||||
WHERE Particolare LIKE '%'+@txtSearch+'%'
|
||||
|
||||
UNION
|
||||
|
||||
SELECT 'Cella' AS Tipo, CodCella AS label, CAST(IdxCella AS NVARCHAR)AS valore
|
||||
FROM dbo.Celle
|
||||
WHERE CodCella LIKE '%'+@txtSearch+'%'
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
-- DATI
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-09-13
|
||||
-- Description: trigger x inserimento valori in archivio storico alla cancellazione/modifica del dato
|
||||
-- =============================================
|
||||
create TRIGGER trg_storico
|
||||
ON PosizioneUdcCorrente
|
||||
AFTER DELETE,UPDATE
|
||||
AS
|
||||
BEGIN
|
||||
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||
-- interfering with SELECT statements.
|
||||
SET NOCOUNT ON;
|
||||
|
||||
-- metto in storico la posizione attuale dell'UDC (SE esiste) CANCELLATO
|
||||
INSERT INTO PosizioneUdcStorico(UDC, IdxCella, CodCS, DataInizio, DataFine)
|
||||
(
|
||||
SELECT UDC, IdxCella, CodCS, DataRif as DataInizio, GETDATE() as DataFine
|
||||
FROM deleted
|
||||
)
|
||||
|
||||
END
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
--
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_spostaUdc
|
||||
*
|
||||
* sposta un UDC, salvandone la posizione precedente (se esiste) nella tab storica
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.11
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_spostaUdc
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@UDC VARCHAR(50),
|
||||
@IdxCellaTo INT
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN TRAN
|
||||
/*
|
||||
-- inizio mettendo in storico la posizione attuale dell'UDC (SE esiste)
|
||||
INSERT INTO PosizioneUdcStorico(UDC, IdxCella, CodCS, DataInizio, DataFine)
|
||||
(
|
||||
SELECT UDC, IdxCella, CodCS, DataRif as DataInizio, GETDATE() as DataFine
|
||||
FROM PosizioneUdcCorrente
|
||||
WHERE UDC = @UDC
|
||||
)
|
||||
*/
|
||||
|
||||
-- libero la posizione attuale dell'UDC (se c'è...)
|
||||
DELETE
|
||||
FROM PosizioneUdcCorrente
|
||||
WHERE UDC = @UDC-- AND IdxCella = @IdxCellaFrom
|
||||
|
||||
-- creo una nuova posizione per l'UDC
|
||||
INSERT INTO PosizioneUdcCorrente(UDC, IdxCella, CodCS, DataRif)
|
||||
VALUES(@UDC, @IdxCellaTo, @CodCS, GETDATE())
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
--
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UDC_delibera
|
||||
*
|
||||
* fa la delibera dell'UDC andando a processare la state machien e quindi eventualmente cambiando la sua posizione
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.13
|
||||
*
|
||||
************************************/
|
||||
alter PROCEDURE stp_UDC_delibera
|
||||
(
|
||||
@CodTipoDelibera NVARCHAR(50),
|
||||
@UDC NVARCHAR(50),
|
||||
@CodSoggetto NVARCHAR(17),
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
|
||||
AS
|
||||
|
||||
BEGIN TRAN
|
||||
DECLARE @IdxPosizioneTo AS INT
|
||||
DECLARE @IdxCellaTo AS INT
|
||||
|
||||
-- registro delibera
|
||||
INSERT INTO DELIBERE
|
||||
VALUES (@CodTipoDelibera, @UDC, GETDATE(), @CodSoggetto)
|
||||
|
||||
-- ricavo nuova posizione
|
||||
SET @IdxPosizioneTo = (SELECT tt.IdxPosizioneTo
|
||||
FROM TabTranPosizEventi tt INNER JOIN AnagTipoDelibere atd ON tt.CodEvento = atd.CodEvento
|
||||
WHERE (atd.CodTipoDelibera = @CodTipoDelibera))
|
||||
|
||||
-- calcolo la prima cella della nuova posizione...
|
||||
SET @IdxCellaTo = (
|
||||
SELECT TOP 1 IdxCella FROM Celle
|
||||
WHERE IdxBlocco = (
|
||||
SELECT IdxBlocco FROM Blocchi
|
||||
WHERE CodMag=CAST(@IdxPosizioneTo AS VARCHAR(50)))
|
||||
)
|
||||
|
||||
-- faccio update posizione
|
||||
UPDATE ElencoCartellini
|
||||
SET IdxPosizione = @IdxPosizioneTo
|
||||
WHERE UDC = @UDC
|
||||
|
||||
-- ora cambio anche la posizione corrente dell'UDC (e tramite trigger storicizza...)
|
||||
EXEC stp_spostaUdc @CodCS, @UDC, @IdxCellaTo
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
-- update verisoni non inserito
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(225, GETDATE())
|
||||
GO
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(230, GETDATE())
|
||||
GO
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverviewPerListaPrelievo
|
||||
*
|
||||
* elenco di overview sull'impiego dei particolari (dettaglio a "maglie larghe") x una possibile lista di prelievo
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.05.31
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_ParticolariOverviewPerListaPrelievo
|
||||
(
|
||||
@Particolare VARCHAR(50),
|
||||
@CodCS VARCHAR(2),
|
||||
@Esponente NVARCHAR(6),
|
||||
@Figura NVARCHAR(4),
|
||||
@CodImballo NVARCHAR(15),
|
||||
@CodTipoLista NVARCHAR (10)
|
||||
)
|
||||
AS
|
||||
DECLARE @IdxPosizione AS INT
|
||||
SET @IdxPosizione = (SELECT tt.IdxPosizione
|
||||
FROM TipoListaPrelievo tlp INNER JOIN TabTranPosizEventi tt ON tlp.CodEvento = tt.CodEvento
|
||||
WHERE (tlp.CodTipoLista = @CodTipoLista))
|
||||
|
||||
SELECT RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare, ISNULL(COUNT(dbo.ElencoCartellini.UDC), 0) AS NumUDC,
|
||||
ISNULL(SUM(dbo.ElencoCartellini.Qta), 0) AS TotQta, ISNULL(COUNT(dbo.PosizioneUdcCorrente.IdxCella), 0) AS NumInMag
|
||||
FROM RilPro.AnagParticolari LEFT OUTER JOIN
|
||||
dbo.ElencoCartellini ON RilPro.AnagParticolari.Particolare = dbo.ElencoCartellini.Particolare LEFT OUTER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.ElencoCartellini.UDC = dbo.PosizioneUdcCorrente.UDC
|
||||
WHERE RilPro.AnagParticolari.CodCS = @CodCS AND
|
||||
RilPro.AnagParticolari.Particolare = @Particolare AND
|
||||
(IdxPosizione = @IdxPosizione) AND
|
||||
(dbo.ElencoCartellini.Figura = CASE WHEN @Figura = '*' THEN dbo.ElencoCartellini.Figura ELSE @Figura END) AND
|
||||
(dbo.ElencoCartellini.Esponente = CASE WHEN @Esponente = '*' THEN dbo.ElencoCartellini.Esponente ELSE @Esponente END) AND
|
||||
(dbo.ElencoCartellini.CodImballo = CASE WHEN @CodImballo = '*' THEN dbo.ElencoCartellini.CodImballo ELSE @CodImballo END)
|
||||
GROUP BY RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UDC_updateIdxPosizione
|
||||
*
|
||||
* aggiorna un cartellino x la sua posizione logica
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.12
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_UDC_updateIdxPosizione
|
||||
(
|
||||
@UDC VARCHAR(20),
|
||||
@CodSoggetto VARCHAR(16),
|
||||
@CodTipoDichiaraz CHAR(1),
|
||||
@CodEvento VARCHAR(10),
|
||||
@IdxPosizione INT
|
||||
)
|
||||
AS
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Ciclo principale x edit record
|
||||
------------------------------------------------------------------------------------------------------
|
||||
BEGIN TRAN
|
||||
|
||||
-- registro in StoricoCartellini
|
||||
INSERT INTO StoricoCartellini(DataEv, CodEvento, CodTipoDichiaraz, UDC, CodCS,CodCliente, RagSociale, Particolare, DescParticolare,
|
||||
DisegnoGrezzo, Esponente, CodImpianto, DescImpianto, CodStampo, Figura, DataFus, TurnoFus, CodImballo, CodSoggetto,
|
||||
NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad)
|
||||
SELECT GETDATE() AS DataEv, @CodEvento AS CodEvento, @CodTipoDichiaraz AS CodTipoDichiaraz, UDC, CodCS,
|
||||
CodCliente, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, CodImpianto, DescImpianto, CodStampo, Figura,
|
||||
DataFus, TurnoFus, CodImballo, @CodSoggetto AS CodSoggetto, NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad
|
||||
FROM ElencoCartellini
|
||||
WHERE (UDC = @UDC)
|
||||
|
||||
-- modifico il record
|
||||
UPDATE ElencoCartellini
|
||||
SET IdxPosizione = @IdxPosizione, ModDate = GETDATE()
|
||||
WHERE UDC = @UDC
|
||||
|
||||
COMMIT TRAN
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- restituisco la tab dati con l'udc appena inserito
|
||||
------------------------------------------------------------------------------------------------------
|
||||
SELECT *
|
||||
FROM ElencoCartellini
|
||||
WHERE UDC = @UDC
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
drop procedure stp_celleOverbooked
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(235, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,118 @@
|
||||
--- gestioen della proprietà di setting magazzino logico x tipo cella
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table TipoCella add
|
||||
SetMag bit constraint DF_TipoCella_SetMag default (1)
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'determina se deve o meno impostare il magazzino logico (contabile)', 'SCHEMA', 'dbo', 'TABLE', 'TipoCella', 'COLUMN', 'SetMag'
|
||||
go
|
||||
|
||||
update TipoCella set SetMag=1
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_TipoCella_deleteQuery
|
||||
*
|
||||
* elimina tipo cella
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.16
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_TipoCella_deleteQuery
|
||||
(
|
||||
@Original_IdxTipoCella INT
|
||||
)
|
||||
|
||||
AS
|
||||
|
||||
DELETE FROM TipoCella
|
||||
WHERE (IdxTipoCella = @Original_IdxTipoCella)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
---setto di default a true il cambio mag logico
|
||||
update TipoCella
|
||||
set SetMag = 1
|
||||
go
|
||||
|
||||
-- imposto a false x i magazzini "ovas"
|
||||
update TipoCella
|
||||
set SetMag = 0
|
||||
where CodMag ='OVAS'
|
||||
go
|
||||
|
||||
-- imposto a false x i magazzini "ovas"
|
||||
update TipoCella
|
||||
set SetMag = 0
|
||||
where CodMag ='VMLP'
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_TipoCella_updateQuery
|
||||
*
|
||||
* aggiorna tipo cella
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.16
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_TipoCella_updateQuery
|
||||
(
|
||||
@Original_IdxTipoCella INT,
|
||||
@CodMag VARCHAR(50),
|
||||
@CodCS VARCHAR(2),
|
||||
@Quantita INT,
|
||||
@Capienza INT,
|
||||
@Max_X FLOAT,
|
||||
@Max_Y FLOAT,
|
||||
@Max_Z FLOAT,
|
||||
@Max_Kg FLOAT,
|
||||
@CheckPiena BIT,
|
||||
@SetMag BIT
|
||||
)
|
||||
|
||||
AS
|
||||
|
||||
UPDATE TipoCella
|
||||
SET CodMag = @CodMag, CodCS = @CodCS, Quantita = @Quantita, Capienza = @Capienza, Max_X = @Max_X, Max_Y = @Max_Y, Max_Z = @Max_Z,
|
||||
Max_Kg = @Max_Kg, CheckPiena = @CheckPiena, SetMag = @SetMag
|
||||
WHERE (IdxTipoCella = @Original_IdxTipoCella)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(240, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,605 @@
|
||||
-- update permessi x magazzino logico
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
UPDATE dbo.Permessi SET
|
||||
NUMERO=5
|
||||
WHERE COD_PERMESSO='MAG_delibere'
|
||||
UPDATE dbo.Permessi SET
|
||||
NUMERO=4
|
||||
WHERE COD_PERMESSO='MAG_elListe'
|
||||
INSERT INTO dbo.Permessi
|
||||
VALUES ('MAG_logico', 'MagLogico.aspx', 2, 3, 'StatoMagLogico', 'StatoMagLogicoExpl')
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.Permessi2Funzione
|
||||
VALUES ('MAG_logico', N'GMW_user', 'S')
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
create VIEW V_MagazziniLogiciOverview
|
||||
AS
|
||||
SELECT TOP (100) PERCENT dbo.ElencoCartellini.CodCS, dbo.AnagPosizioni.IdxPosizione AS CodMagLogico, dbo.AnagPosizioni.DescPosizione AS DescMagLogico,
|
||||
dbo.Blocchi.IdxBlocco, dbo.AnagMag.CodMag, dbo.Blocchi.CodBlocco, COUNT(dbo.ElencoCartellini.UDC) AS CelleOccupate,
|
||||
ISNULL(MIN(dbo.PosizioneUdcCorrente.DataRif), GETDATE()) AS Oldest, ISNULL(MAX(dbo.PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest
|
||||
FROM dbo.Celle INNER JOIN
|
||||
dbo.Blocchi INNER JOIN
|
||||
dbo.AnagMag ON dbo.Blocchi.CodMag = dbo.AnagMag.CodMag AND dbo.Blocchi.CodCS = dbo.AnagMag.CodCS ON
|
||||
dbo.Celle.IdxBlocco = dbo.Blocchi.IdxBlocco INNER JOIN
|
||||
dbo.ElencoCartellini INNER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.ElencoCartellini.UDC = dbo.PosizioneUdcCorrente.UDC INNER JOIN
|
||||
dbo.AnagPosizioni ON dbo.ElencoCartellini.IdxPosizione = dbo.AnagPosizioni.IdxPosizione ON dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella
|
||||
GROUP BY dbo.ElencoCartellini.CodCS, dbo.AnagPosizioni.IdxPosizione, dbo.AnagPosizioni.DescPosizione, dbo.Blocchi.IdxBlocco, dbo.Blocchi.CodBlocco,
|
||||
dbo.AnagMag.CodMag
|
||||
ORDER BY CodMagLogico, dbo.Blocchi.CodBlocco
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "Blocchi"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 486
|
||||
Bottom = 135
|
||||
Right = 672
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "ElencoCartellini"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 38
|
||||
Bottom = 135
|
||||
Right = 224
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "PosizioneUdcCorrente"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 934
|
||||
Bottom = 135
|
||||
Right = 1120
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "AnagPosizioni"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 262
|
||||
Bottom = 101
|
||||
Right = 448
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "Celle"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 710
|
||||
Bottom = 135
|
||||
Right = 896
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "AnagMag"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 1158
|
||||
Bottom = 118
|
||||
Right = 1344
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 12
|
||||
Width = 284
|
||||
Width = 1500
|
||||
', 'SCHEMA', 'dbo', 'VIEW', 'V_MagazziniLogiciOverview'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPane2', ' 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 = 12
|
||||
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_MagazziniLogiciOverview'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPaneCount', 2, 'SCHEMA', 'dbo', 'VIEW', 'V_MagazziniLogiciOverview'
|
||||
go
|
||||
|
||||
create VIEW v_selMagLogico
|
||||
AS
|
||||
SELECT DISTINCT TOP (100) PERCENT CAST(IdxPosizione AS NVARCHAR(20)) AS value, 'Mag. ' + CAST(IdxPosizione AS NVARCHAR(20)) AS label, CodCS AS conditio
|
||||
FROM dbo.ElencoCartellini
|
||||
ORDER BY label
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "ElencoCartellini"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 38
|
||||
Bottom = 343
|
||||
Right = 208
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 9
|
||||
Width = 284
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
End
|
||||
End
|
||||
Begin CriteriaPane =
|
||||
Begin ColumnWidths = 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_selMagLogico'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPaneCount', 1, 'SCHEMA', 'dbo', 'VIEW', 'v_selMagLogico'
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverview
|
||||
*
|
||||
* elenco di overview sullo stato dei magazzini LOGICI (dettaglio a "maglie larghe")
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.15
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_magazzinoLogicoOverview
|
||||
(
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT ElencoCartellini.CodCS, AnagPosizioni.IdxPosizione AS CodMagLogico, AnagPosizioni.DescPosizione AS DescMagLogico, Blocchi.IdxBlocco, AnagMag.CodMag,
|
||||
Blocchi.CodBlocco, COUNT(ElencoCartellini.UDC) AS CelleOccupate, ISNULL(MIN(PosizioneUdcCorrente.DataRif), GETDATE()) AS Oldest,
|
||||
ISNULL(MAX(PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest
|
||||
FROM Celle INNER JOIN
|
||||
Blocchi INNER JOIN
|
||||
AnagMag ON Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS ON Celle.IdxBlocco = Blocchi.IdxBlocco INNER JOIN
|
||||
ElencoCartellini INNER JOIN
|
||||
PosizioneUdcCorrente ON ElencoCartellini.UDC = PosizioneUdcCorrente.UDC INNER JOIN
|
||||
AnagPosizioni ON ElencoCartellini.IdxPosizione = AnagPosizioni.IdxPosizione ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella
|
||||
WHERE (ElencoCartellini.CodCS = @CodCS)
|
||||
GROUP BY ElencoCartellini.CodCS, AnagPosizioni.IdxPosizione, AnagPosizioni.DescPosizione, Blocchi.IdxBlocco, Blocchi.CodBlocco, AnagMag.CodMag
|
||||
ORDER BY CodMagLogico, Blocchi.CodBlocco
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_paretoDettPartByFullSpecMagLog
|
||||
*
|
||||
* restituisce elenco particolari in logica pareto (quantità) per un dato blocco di magazzino e il particolare ed il magazzino logico!!!
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.15
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_paretoDettPartByFullSpecMagLog
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@CodMag VARCHAR(50),
|
||||
@IdxBlocco INT,
|
||||
@Particolare VARCHAR(20),
|
||||
@CodMagLog INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT TOP (100) PERCENT AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, ElencoCartellini.Particolare,
|
||||
ElencoCartellini.Esponente, COUNT(PosizioneUdcCorrente.UDC) AS NumUDC, ISNULL(MIN(PosizioneUdcCorrente.DataRif),
|
||||
GETDATE()) AS Oldest, ISNULL(MAX(PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest, SUM(ElencoCartellini.Qta) AS QtaTotPz,
|
||||
AnagStatiProdotto.DescStato
|
||||
FROM AnagMag INNER JOIN
|
||||
Blocchi ON AnagMag.CodMag = Blocchi.CodMag AND AnagMag.CodCS = Blocchi.CodCS INNER JOIN
|
||||
Celle INNER JOIN
|
||||
ElencoCartellini INNER JOIN
|
||||
PosizioneUdcCorrente ON ElencoCartellini.UDC = PosizioneUdcCorrente.UDC ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella ON
|
||||
Blocchi.IdxBlocco = Celle.IdxBlocco INNER JOIN
|
||||
AnagStatiProdotto ON ElencoCartellini.CodStato = AnagStatiProdotto.CodStato
|
||||
WHERE (Celle.Attiva = 1) AND (AnagMag.CodCS = @CodCS) AND (AnagMag.CodMag = @CodMag) AND (Blocchi.IdxBlocco = @IdxBlocco) AND
|
||||
(ElencoCartellini.Particolare = @Particolare) AND ElencoCartellini.IdxPosizione = @CodMagLog
|
||||
GROUP BY AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, Blocchi.NumX, Blocchi.NumY, Blocchi.NumZ,
|
||||
ElencoCartellini.Particolare, ElencoCartellini.Esponente, AnagStatiProdotto.DescStato
|
||||
ORDER BY QtaTotPz DESC
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_paretoPartByMagBloccoCodMagLog
|
||||
*
|
||||
* restituisce elenco particolari in logica pareto (quantità) per un dato blocco di magazzino ed un dato magazzino logico, aggregati (no stato)
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.15
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_paretoPartByMagBloccoCodMagLog
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@CodMag VARCHAR(50),
|
||||
@IdxBlocco INT,
|
||||
@CodMagLog INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT TOP (100) PERCENT
|
||||
dbo.AnagMag.CodCS, dbo.AnagMag.CodMag, dbo.AnagMag.DescMag, dbo.Blocchi.IdxBlocco, dbo.Blocchi.CodBlocco,
|
||||
dbo.ElencoCartellini.Particolare, '' as Esponente, COUNT(dbo.PosizioneUdcCorrente.UDC) AS NumUDC, ISNULL(MIN(dbo.PosizioneUdcCorrente.DataRif),
|
||||
GETDATE()) AS Oldest, ISNULL(MAX(dbo.PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest, SUM(dbo.ElencoCartellini.Qta) AS QtaTotPz,
|
||||
'' AS DescStato
|
||||
FROM dbo.AnagMag INNER JOIN
|
||||
dbo.Blocchi ON dbo.AnagMag.CodMag = dbo.Blocchi.CodMag AND dbo.AnagMag.CodCS = dbo.Blocchi.CodCS INNER JOIN
|
||||
dbo.Celle INNER JOIN
|
||||
dbo.ElencoCartellini INNER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.ElencoCartellini.UDC = dbo.PosizioneUdcCorrente.UDC
|
||||
ON dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella
|
||||
ON dbo.Blocchi.IdxBlocco = dbo.Celle.IdxBlocco INNER JOIN
|
||||
dbo.AnagStatiProdotto ON dbo.ElencoCartellini.CodStato = dbo.AnagStatiProdotto.CodStato
|
||||
WHERE (dbo.Celle.Attiva = 1) AND (AnagMag.CodCS = @CodCS) AND AnagMag.CodMag = @CodMag AND Blocchi.IdxBlocco = @IdxBlocco
|
||||
AND ElencoCartellini.IdxPosizione = @CodMagLog
|
||||
GROUP BY dbo.AnagMag.CodCS, dbo.AnagMag.CodMag, dbo.AnagMag.DescMag, dbo.Blocchi.IdxBlocco, dbo.Blocchi.CodBlocco,
|
||||
dbo.Blocchi.NumX, dbo.Blocchi.NumY, dbo.Blocchi.NumZ, dbo.ElencoCartellini.Particolare
|
||||
ORDER BY QtaTotPz DESC
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UdcDetailGetByIdxBloccoCodMagLog
|
||||
*
|
||||
* ottiene l'elenco degli UDC con dettaglio posizioni OCCUPATE associati ad un dato blocco di magazzino ed ad un dato STATO LOGICO
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.15
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_UdcDetailGetByIdxBloccoCodMagLog
|
||||
(
|
||||
@IdxBlocco INT,
|
||||
@CodMagLog INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT ElencoCartellini.UDC, ElencoCartellini.RagSociale, ElencoCartellini.Particolare, ElencoCartellini.DescParticolare,
|
||||
ElencoCartellini.DisegnoGrezzo, ElencoCartellini.Esponente, ElencoCartellini.DescImpianto, ElencoCartellini.DataFus,
|
||||
ElencoCartellini.TurnoFus, ElencoCartellini.CodImballo, ElencoCartellini.Qta, AnagStatiProdotto.DescStato,
|
||||
ElencoCartellini.ModDate, ISNULL(Blocchi.CodMag, N'') AS CodMag, ISNULL(Blocchi.CodBlocco, N'') AS CodBlocco,
|
||||
ISNULL(Celle.CodCella, N'') AS CodCella, ISNULL(dbo.Celle.IdxCella, 0) AS IdxCella,
|
||||
ISNULL(Celle.X, 0) AS X, ISNULL(Celle.Y, 0) AS Y, ISNULL(Celle.Z, 0) AS Z
|
||||
FROM Celle INNER JOIN
|
||||
PosizioneUdcCorrente ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND
|
||||
Celle.IdxCella = PosizioneUdcCorrente.IdxCella INNER JOIN
|
||||
Blocchi ON Celle.IdxBlocco = Blocchi.IdxBlocco INNER JOIN
|
||||
AnagMag ON Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND
|
||||
Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS INNER JOIN
|
||||
ElencoCartellini ON PosizioneUdcCorrente.UDC = ElencoCartellini.UDC LEFT OUTER JOIN
|
||||
AnagStatiProdotto ON ElencoCartellini.CodStato = AnagStatiProdotto.CodStato AND ElencoCartellini.CodStato = AnagStatiProdotto.CodStato
|
||||
WHERE (Celle.IdxBlocco = @IdxBlocco) AND ElencoCartellini.IdxPosizione = @CodMagLog
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_paretoDettMagByParticolare
|
||||
*
|
||||
* restituisce elenco giacenze a magazzino in logica pareto (quantità) per un dato particolare
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.04
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_paretoDettMagByParticolare
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@Particolare VARCHAR(20)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT TOP (100) PERCENT AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, ElencoCartellini.Particolare,
|
||||
ElencoCartellini.Esponente, COUNT(PosizioneUdcCorrente.UDC) AS NumUDC, ISNULL(MIN(PosizioneUdcCorrente.DataRif),
|
||||
GETDATE()) AS Oldest, ISNULL(MAX(PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest, SUM(ElencoCartellini.Qta) AS QtaTotPz,
|
||||
AnagStatiProdotto.DescStato, ElencoCartellini.IdxPosizione AS CodMagLog
|
||||
FROM AnagMag INNER JOIN
|
||||
Blocchi ON AnagMag.CodMag = Blocchi.CodMag AND AnagMag.CodCS = Blocchi.CodCS INNER JOIN
|
||||
Celle INNER JOIN
|
||||
ElencoCartellini INNER JOIN
|
||||
PosizioneUdcCorrente ON ElencoCartellini.UDC = PosizioneUdcCorrente.UDC ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella ON
|
||||
Blocchi.IdxBlocco = Celle.IdxBlocco INNER JOIN
|
||||
AnagStatiProdotto ON ElencoCartellini.CodStato = AnagStatiProdotto.CodStato
|
||||
WHERE (Celle.Attiva = 1) AND (AnagMag.CodCS = @CodCS) AND (ElencoCartellini.Particolare = @Particolare)
|
||||
GROUP BY AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, Blocchi.NumX, Blocchi.NumY, Blocchi.NumZ,
|
||||
ElencoCartellini.Particolare, ElencoCartellini.Esponente, ElencoCartellini.IdxPosizione, AnagStatiProdotto.DescStato
|
||||
ORDER BY QtaTotPz DESC
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(245, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,525 @@
|
||||
-- update permessi x magazzino logico
|
||||
|
||||
|
||||
-- dichiarazione variabili iniziale
|
||||
DECLARE @IdxCella AS INT
|
||||
|
||||
-- fix mag 84
|
||||
SET @IdxCella= (SELECT IdxCella FROM Celle c INNER JOIN Blocchi b ON c.IdxBlocco=b.IdxBlocco WHERE CodMag='84')
|
||||
|
||||
insert into PosizioneUdcCorrente
|
||||
select ec.UDC, @IdxCella as idxCella, 'MA' as CodCS, GETDATE() as datarif
|
||||
from ElencoCartellini ec
|
||||
left outer join PosizioneUdcCorrente puc on ec.UDC= puc.UDC
|
||||
where puc.IdxCella is null and IdxPosizione=84
|
||||
|
||||
-- fix mag 54
|
||||
SET @IdxCella= (SELECT IdxCella FROM Celle c INNER JOIN Blocchi b ON c.IdxBlocco=b.IdxBlocco WHERE CodMag='54')
|
||||
|
||||
insert into PosizioneUdcCorrente
|
||||
select ec.UDC, @IdxCella as idxCella, 'MA' as CodCS, GETDATE() as datarif
|
||||
from ElencoCartellini ec
|
||||
left outer join PosizioneUdcCorrente puc on ec.UDC= puc.UDC
|
||||
where puc.IdxCella is null and IdxPosizione=54
|
||||
|
||||
-- fix mag 56
|
||||
SET @IdxCella= (SELECT IdxCella FROM Celle c INNER JOIN Blocchi b ON c.IdxBlocco=b.IdxBlocco WHERE CodMag='56')
|
||||
|
||||
insert into PosizioneUdcCorrente
|
||||
select ec.UDC, @IdxCella as idxCella, 'MA' as CodCS, GETDATE() as datarif
|
||||
from ElencoCartellini ec
|
||||
left outer join PosizioneUdcCorrente puc on ec.UDC= puc.UDC
|
||||
where puc.IdxCella is null and IdxPosizione=56
|
||||
|
||||
-- fix mag 80
|
||||
SET @IdxCella= (SELECT IdxCella FROM Celle c INNER JOIN Blocchi b ON c.IdxBlocco=b.IdxBlocco WHERE CodMag='80')
|
||||
|
||||
insert into PosizioneUdcCorrente
|
||||
select ec.UDC, @IdxCella as idxCella, 'MA' as CodCS, GETDATE() as datarif
|
||||
from ElencoCartellini ec
|
||||
left outer join PosizioneUdcCorrente puc on ec.UDC= puc.UDC
|
||||
where puc.IdxCella is null and IdxPosizione=80
|
||||
|
||||
-- fix mag 0 --> 80
|
||||
SET @IdxCella= (SELECT IdxCella FROM Celle c INNER JOIN Blocchi b ON c.IdxBlocco=b.IdxBlocco WHERE CodMag='80')
|
||||
|
||||
insert into PosizioneUdcCorrente
|
||||
select ec.UDC, @IdxCella as idxCella, 'MA' as CodCS, GETDATE() as datarif
|
||||
from ElencoCartellini ec
|
||||
left outer join PosizioneUdcCorrente puc on ec.UDC= puc.UDC
|
||||
where puc.IdxCella is null and IdxPosizione=0
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
alter VIEW v_UdcDetail
|
||||
AS
|
||||
SELECT dbo.ElencoCartellini.UDC, dbo.ElencoCartellini.RagSociale, dbo.ElencoCartellini.Particolare, dbo.ElencoCartellini.DescParticolare,
|
||||
dbo.ElencoCartellini.DisegnoGrezzo, dbo.ElencoCartellini.Esponente, dbo.ElencoCartellini.DescImpianto, dbo.ElencoCartellini.DataFus,
|
||||
dbo.ElencoCartellini.TurnoFus, dbo.ElencoCartellini.CodImballo, dbo.ElencoCartellini.Qta, dbo.AnagStatiProdotto.DescStato, dbo.ElencoCartellini.ModDate,
|
||||
ISNULL(dbo.Blocchi.CodMag, N'') AS CodMag, ISNULL(dbo.Blocchi.CodBlocco, N'') AS CodBlocco, ISNULL(dbo.Celle.CodCella, N'') AS CodCella,
|
||||
ISNULL(dbo.Celle.IdxCella, 0) AS IdxCella, ISNULL(dbo.Celle.X, 0) AS X, ISNULL(dbo.Celle.Y, 0) AS Y, ISNULL(dbo.Celle.Z, 0) AS Z,
|
||||
dbo.ElencoCartellini.IdxPosizione
|
||||
FROM dbo.AnagStatiProdotto RIGHT OUTER JOIN
|
||||
dbo.ElencoCartellini ON dbo.AnagStatiProdotto.CodStato = dbo.ElencoCartellini.CodStato AND
|
||||
dbo.AnagStatiProdotto.CodStato = dbo.ElencoCartellini.CodStato LEFT OUTER JOIN
|
||||
dbo.Celle INNER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella AND dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella AND
|
||||
dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella INNER JOIN
|
||||
dbo.Blocchi ON dbo.Celle.IdxBlocco = dbo.Blocchi.IdxBlocco INNER JOIN
|
||||
dbo.AnagMag ON dbo.Blocchi.CodMag = dbo.AnagMag.CodMag AND dbo.Blocchi.CodCS = dbo.AnagMag.CodCS AND
|
||||
dbo.Blocchi.CodMag = dbo.AnagMag.CodMag AND dbo.Blocchi.CodCS = dbo.AnagMag.CodCS AND dbo.Blocchi.CodMag = dbo.AnagMag.CodMag AND
|
||||
dbo.Blocchi.CodCS = dbo.AnagMag.CodCS ON dbo.ElencoCartellini.UDC = dbo.PosizioneUdcCorrente.UDC
|
||||
go
|
||||
|
||||
exec sp_updateextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "AnagStatiProdotto"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 38
|
||||
Bottom = 101
|
||||
Right = 208
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "ElencoCartellini"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 246
|
||||
Bottom = 309
|
||||
Right = 416
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 11
|
||||
End
|
||||
Begin Table = "Celle"
|
||||
Begin Extent =
|
||||
Top = 27
|
||||
Left = 818
|
||||
Bottom = 156
|
||||
Right = 988
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "PosizioneUdcCorrente"
|
||||
Begin Extent =
|
||||
Top = 71
|
||||
Left = 548
|
||||
Bottom = 200
|
||||
Right = 718
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "Blocchi"
|
||||
Begin Extent =
|
||||
Top = 70
|
||||
Left = 1080
|
||||
Bottom = 199
|
||||
Right = 1250
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "AnagMag"
|
||||
Begin Extent =
|
||||
Top = 188
|
||||
Left = 799
|
||||
Bottom = 334
|
||||
Right = 969
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 21
|
||||
Width = 284
|
||||
Width = 15', 'SCHEMA', 'dbo', 'VIEW', 'v_UdcDetail'
|
||||
go
|
||||
|
||||
exec sp_updateextendedproperty 'MS_DiagramPane2', '00
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
End
|
||||
End
|
||||
Begin CriteriaPane =
|
||||
Begin ColumnWidths = 11
|
||||
Column = 1440
|
||||
Alias = 900
|
||||
Table = 1170
|
||||
Output = 720
|
||||
Append = 1400
|
||||
NewValue = 1170
|
||||
SortType = 1350
|
||||
SortOrder = 1410
|
||||
GroupBy = 1350
|
||||
Filter = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
End
|
||||
End
|
||||
End
|
||||
', 'SCHEMA', 'dbo', 'VIEW', 'v_UdcDetail'
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
--
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_getUdcDetailFullCode
|
||||
*
|
||||
* ottiene l'elenco degli UDC con i dati significativi partendo da un codice UDC COMPLETO
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.05.24
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_getUdcDetailFullCode
|
||||
(
|
||||
@UDC VARCHAR(50),
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT ElencoCartellini.UDC, ElencoCartellini.RagSociale, ElencoCartellini.Particolare, ElencoCartellini.DescParticolare, ElencoCartellini.DisegnoGrezzo,
|
||||
ElencoCartellini.Esponente, ElencoCartellini.DescImpianto, ElencoCartellini.DataFus, ElencoCartellini.TurnoFus, ElencoCartellini.CodImballo,
|
||||
ElencoCartellini.Qta, AnagStatiProdotto.DescStato, ElencoCartellini.ModDate, ISNULL(Blocchi.CodMag, N'') AS CodMag,
|
||||
ISNULL(Blocchi.CodBlocco, N'') AS CodBlocco, ISNULL(Celle.CodCella, N'') AS CodCella, ISNULL(dbo.Celle.IdxCella, 0) AS IdxCella,
|
||||
ISNULL(Celle.X, 0) AS X, ISNULL(Celle.Y, 0) AS Y, ISNULL(Celle.Z, 0) AS Z, ElencoCartellini.IdxPosizione
|
||||
FROM AnagStatiProdotto RIGHT OUTER JOIN
|
||||
ElencoCartellini ON AnagStatiProdotto.CodStato = ElencoCartellini.CodStato AND AnagStatiProdotto.CodStato = ElencoCartellini.CodStato
|
||||
LEFT OUTER JOIN Celle INNER JOIN PosizioneUdcCorrente ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella
|
||||
AND Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND Celle.IdxCella = PosizioneUdcCorrente.IdxCella
|
||||
INNER JOIN Blocchi ON Celle.IdxBlocco = Blocchi.IdxBlocco INNER JOIN AnagMag ON Blocchi.CodMag = AnagMag.CodMag
|
||||
AND Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag
|
||||
AND Blocchi.CodCS = AnagMag.CodCS ON ElencoCartellini.UDC = PosizioneUdcCorrente.UDC
|
||||
WHERE (ElencoCartellini.UDC = @UDC) AND (ElencoCartellini.CodCS = @CodCS)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
--
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_getUdcDetailFullCode
|
||||
*
|
||||
* ottiene l'elenco degli UDC con i dati significativi partendo da un valore da cercare come LIKE in
|
||||
* - UDC
|
||||
* - Particolare
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.05.24
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_getUdcDetailLikeSearch
|
||||
(
|
||||
@searchVal VARCHAR(50),
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT ElencoCartellini.UDC, ElencoCartellini.RagSociale, ElencoCartellini.Particolare, ElencoCartellini.DescParticolare,
|
||||
ElencoCartellini.DisegnoGrezzo, ElencoCartellini.Esponente, ElencoCartellini.DescImpianto, ElencoCartellini.DataFus,
|
||||
ElencoCartellini.TurnoFus, ElencoCartellini.CodImballo, ElencoCartellini.Qta, AnagStatiProdotto.DescStato, ElencoCartellini.ModDate,
|
||||
ISNULL(Blocchi.CodMag, N'') AS CodMag, ISNULL(Blocchi.CodBlocco, N'') AS CodBlocco, ISNULL(Celle.CodCella, N'') AS CodCella,
|
||||
ISNULL(dbo.Celle.IdxCella, 0) AS IdxCella, ISNULL(Celle.X, 0) AS X, ISNULL(Celle.Y, 0) AS Y, ISNULL(Celle.Z, 0) AS Z, ElencoCartellini.IdxPosizione
|
||||
FROM AnagStatiProdotto RIGHT OUTER JOIN ElencoCartellini
|
||||
ON AnagStatiProdotto.CodStato = ElencoCartellini.CodStato AND AnagStatiProdotto.CodStato = ElencoCartellini.CodStato
|
||||
LEFT OUTER JOIN Celle INNER JOIN PosizioneUdcCorrente
|
||||
ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND
|
||||
Celle.IdxCella = PosizioneUdcCorrente.IdxCella INNER JOIN
|
||||
Blocchi ON Celle.IdxBlocco = Blocchi.IdxBlocco INNER JOIN
|
||||
AnagMag ON Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND
|
||||
Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS ON
|
||||
ElencoCartellini.UDC = PosizioneUdcCorrente.UDC
|
||||
WHERE (ElencoCartellini.CodCS = @CodCS) AND
|
||||
((ElencoCartellini.UDC like '%'+ @searchVal+'%') OR (ElencoCartellini.Particolare like '%'+ @searchVal+'%') OR
|
||||
(ElencoCartellini.RagSociale like '%'+ @searchVal+'%'))
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
--
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UdcDetailGetByIdxBlocco
|
||||
*
|
||||
* ottiene l'elenco degli UDC con dettaglio posizioni OCCUPATE associati ad un dato blocco di magazzino
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.19
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_UdcDetailGetByIdxBlocco
|
||||
(
|
||||
@IdxBlocco INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT ElencoCartellini.UDC, ElencoCartellini.RagSociale, ElencoCartellini.Particolare, ElencoCartellini.DescParticolare,
|
||||
ElencoCartellini.DisegnoGrezzo, ElencoCartellini.Esponente, ElencoCartellini.DescImpianto, ElencoCartellini.DataFus,
|
||||
ElencoCartellini.TurnoFus, ElencoCartellini.CodImballo, ElencoCartellini.Qta, AnagStatiProdotto.DescStato,
|
||||
ElencoCartellini.ModDate, ISNULL(Blocchi.CodMag, N'') AS CodMag, ISNULL(Blocchi.CodBlocco, N'') AS CodBlocco,
|
||||
ISNULL(Celle.CodCella, N'') AS CodCella, ISNULL(dbo.Celle.IdxCella, 0) AS IdxCella,
|
||||
ISNULL(Celle.X, 0) AS X, ISNULL(Celle.Y, 0) AS Y, ISNULL(Celle.Z, 0) AS Z, ElencoCartellini.IdxPosizione
|
||||
FROM Celle INNER JOIN
|
||||
PosizioneUdcCorrente ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND
|
||||
Celle.IdxCella = PosizioneUdcCorrente.IdxCella INNER JOIN
|
||||
Blocchi ON Celle.IdxBlocco = Blocchi.IdxBlocco INNER JOIN
|
||||
AnagMag ON Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND
|
||||
Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS INNER JOIN
|
||||
ElencoCartellini ON PosizioneUdcCorrente.UDC = ElencoCartellini.UDC LEFT OUTER JOIN
|
||||
AnagStatiProdotto ON ElencoCartellini.CodStato = AnagStatiProdotto.CodStato AND ElencoCartellini.CodStato = AnagStatiProdotto.CodStato
|
||||
WHERE (Celle.IdxBlocco = @IdxBlocco)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
--
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UdcDetailGetByIdxBloccoCodMagLog
|
||||
*
|
||||
* ottiene l'elenco degli UDC con dettaglio posizioni OCCUPATE associati ad un dato blocco di magazzino ed ad un dato STATO LOGICO
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.15
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_UdcDetailGetByIdxBloccoCodMagLog
|
||||
(
|
||||
@IdxBlocco INT,
|
||||
@CodMagLog INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT ElencoCartellini.UDC, ElencoCartellini.RagSociale, ElencoCartellini.Particolare, ElencoCartellini.DescParticolare,
|
||||
ElencoCartellini.DisegnoGrezzo, ElencoCartellini.Esponente, ElencoCartellini.DescImpianto, ElencoCartellini.DataFus,
|
||||
ElencoCartellini.TurnoFus, ElencoCartellini.CodImballo, ElencoCartellini.Qta, AnagStatiProdotto.DescStato,
|
||||
ElencoCartellini.ModDate, ISNULL(Blocchi.CodMag, N'') AS CodMag, ISNULL(Blocchi.CodBlocco, N'') AS CodBlocco,
|
||||
ISNULL(Celle.CodCella, N'') AS CodCella, ISNULL(dbo.Celle.IdxCella, 0) AS IdxCella,
|
||||
ISNULL(Celle.X, 0) AS X, ISNULL(Celle.Y, 0) AS Y, ISNULL(Celle.Z, 0) AS Z, ElencoCartellini.IdxPosizione
|
||||
FROM Celle INNER JOIN
|
||||
PosizioneUdcCorrente ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND
|
||||
Celle.IdxCella = PosizioneUdcCorrente.IdxCella INNER JOIN
|
||||
Blocchi ON Celle.IdxBlocco = Blocchi.IdxBlocco INNER JOIN
|
||||
AnagMag ON Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND
|
||||
Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS INNER JOIN
|
||||
ElencoCartellini ON PosizioneUdcCorrente.UDC = ElencoCartellini.UDC LEFT OUTER JOIN
|
||||
AnagStatiProdotto ON ElencoCartellini.CodStato = AnagStatiProdotto.CodStato AND ElencoCartellini.CodStato = AnagStatiProdotto.CodStato
|
||||
WHERE (Celle.IdxBlocco = @IdxBlocco) AND ElencoCartellini.IdxPosizione = @CodMagLog
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
--
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UdcDetailGetByIdxCella
|
||||
*
|
||||
* ottiene l'elenco degli UDC con dettaglio per una data cella
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.20
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_UdcDetailGetByIdxCella
|
||||
(
|
||||
@IdxCella INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT ElencoCartellini.UDC, ElencoCartellini.RagSociale, ElencoCartellini.Particolare, ElencoCartellini.DescParticolare,
|
||||
ElencoCartellini.DisegnoGrezzo, ElencoCartellini.Esponente, ElencoCartellini.DescImpianto, ElencoCartellini.DataFus,
|
||||
ElencoCartellini.TurnoFus, ElencoCartellini.CodImballo, ElencoCartellini.Qta, AnagStatiProdotto.DescStato,
|
||||
ElencoCartellini.ModDate, ISNULL(Blocchi.CodMag, N'') AS CodMag, ISNULL(Blocchi.CodBlocco, N'') AS CodBlocco,
|
||||
ISNULL(Celle.CodCella, N'') AS CodCella, ISNULL(dbo.Celle.IdxCella, 0) AS IdxCella,
|
||||
ISNULL(Celle.X, 0) AS X, ISNULL(Celle.Y, 0) AS Y, ISNULL(Celle.Z, 0) AS Z, ElencoCartellini.IdxPosizione
|
||||
FROM Celle INNER JOIN
|
||||
PosizioneUdcCorrente ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND
|
||||
Celle.IdxCella = PosizioneUdcCorrente.IdxCella INNER JOIN
|
||||
Blocchi ON Celle.IdxBlocco = Blocchi.IdxBlocco INNER JOIN
|
||||
AnagMag ON Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND
|
||||
Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS INNER JOIN
|
||||
ElencoCartellini ON PosizioneUdcCorrente.UDC = ElencoCartellini.UDC LEFT OUTER JOIN
|
||||
AnagStatiProdotto ON ElencoCartellini.CodStato = AnagStatiProdotto.CodStato AND ElencoCartellini.CodStato = AnagStatiProdotto.CodStato
|
||||
WHERE (Celle.IdxCella = @IdxCella)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(250, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,292 @@
|
||||
--- nuovi eventi x gestione triggers variazioni quantità magazzino AS
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.AnagTipoEvento
|
||||
VALUES (N'UDC_DEL', N'Eliminato un UDC (per movimento AS400)')
|
||||
INSERT INTO dbo.AnagTipoEvento
|
||||
VALUES (N'UDC_MOV', N'Movimentazione contabile tra magazzini UDC')
|
||||
INSERT INTO dbo.AnagTipoEvento
|
||||
VALUES (N'UDC_NEW', N'Creato un nuovo UDC (per movimento AS400)')
|
||||
INSERT INTO dbo.AnagTipoEvento
|
||||
VALUES (N'UDC_NOQTY', N'Rettifica qta UDC creato se già in AS')
|
||||
INSERT INTO dbo.AnagTipoEvento
|
||||
VALUES (N'UDC_POS', N'Spostamento posizilne logica UDC')
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
-- tab x gestioen batch AS400
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
create table AS400_BatchMovimenti(
|
||||
DataIns datetime not null,
|
||||
CodEvento nvarchar(10) not null,
|
||||
Particolare nvarchar(15) not null,
|
||||
CodMagAS nvarchar(50) not null,
|
||||
Quantita decimal(10,2) not null,
|
||||
DataBatch datetime,
|
||||
DataVerifica datetime,
|
||||
|
||||
constraint PK_AS400_BatchMovimenti primary key(DataIns,CodEvento,Particolare,CodMagAS)
|
||||
)
|
||||
go
|
||||
|
||||
alter table AS400_BatchMovimenti add
|
||||
constraint FK_AS400_BatchMovimenti_AnagTipoEvento foreign key(CodEvento) references AnagTipoEvento(CodEvento) on update cascade
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'dataora inserimento in coda caricamento', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataIns'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'NON MODIFICARE: nel codice si usano questi campi x chiamate...', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'CodEvento'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'dataora di caricamento batch verso AS', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataBatch'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', N'dataora in cui è stato verificato il caricamento su AS', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataVerifica'
|
||||
go
|
||||
|
||||
create table AS400_MagCont(
|
||||
CodMagAS nvarchar(50) not null constraint PK_AS400_MagCont primary key,
|
||||
Descrizione nvarchar(50),
|
||||
Attivo bit
|
||||
)
|
||||
go
|
||||
|
||||
alter table AS400_BatchMovimenti add
|
||||
constraint FK_AS400_BatchMovimenti_AS400_MagCont foreign key(CodMagAS) references AS400_MagCont(CodMagAS) on update cascade
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.AS400_MagCont
|
||||
VALUES (N'54', N'Finiti', 1)
|
||||
INSERT INTO dbo.AS400_MagCont
|
||||
VALUES (N'56', N'Materia Prima', 1)
|
||||
INSERT INTO dbo.AS400_MagCont
|
||||
VALUES (N'80', N'Fusi', 1)
|
||||
INSERT INTO dbo.AS400_MagCont
|
||||
VALUES (N'84', N'WIP', 1)
|
||||
INSERT INTO dbo.AS400_MagCont
|
||||
VALUES (N'88', N'Rientro da terzista', 1)
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
-- triggers!
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-09-20
|
||||
-- Description: trigger x inserimento movimenti
|
||||
-- nella coda di trasferimento batch
|
||||
-- verso AS400 x UPDATE UDC
|
||||
-- =============================================
|
||||
create TRIGGER trg_updMovAS
|
||||
ON ElencoCartellini
|
||||
AFTER UPDATE
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- setup variabili e verbosità
|
||||
SET NOCOUNT ON;
|
||||
DECLARE @partOk AS BIT
|
||||
DECLARE @IdxPosFrom AS INT
|
||||
DECLARE @IdxPosTo AS INT
|
||||
DECLARE @magFrom AS NVARCHAR(50)
|
||||
DECLARE @magTo AS NVARCHAR(50)
|
||||
DECLARE @qta AS DECIMAL(10,2)
|
||||
|
||||
-- controllo che CI SIA il particolare (altrimenti non eseguo)
|
||||
SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM deleted)
|
||||
|
||||
IF(@partOk = 1)
|
||||
SET @qta = (SELECT Qta FROM inserted)
|
||||
-- se c'è stata modifica di quantità inizio a rettificare quella
|
||||
IF UPDATE(Qta)
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOD', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), @qta-Qta
|
||||
FROM deleted
|
||||
)
|
||||
END
|
||||
|
||||
-- controllo poi se sia cambiato il magazzino, altrimenti non lo inserisco
|
||||
IF UPDATE(IdxPosizione)
|
||||
BEGIN
|
||||
-- Prendo le posizioni di magazzino precedente e nuova
|
||||
SET @IdxPosFrom = (SELECT IdxPosizione FROM deleted)
|
||||
SET @IdxPosTo = (SELECT IdxPosizione FROM inserted)
|
||||
-- Le trasformo nelle equivalenti stringhe del codMag SE attive
|
||||
SET @magFrom = (SELECT ISNULL(CodMagAS,'---') FROM AS400_MagCont WHERE Attivo = 1 AND CodMagAs = CAST(@IdxPosFrom AS NVARCHAR(50)))
|
||||
SET @magTo = (SELECT ISNULL(CodMagAS,'---') FROM AS400_MagCont WHERE Attivo = 1 AND CodMagAs = CAST(@IdxPosTo AS NVARCHAR(50)))
|
||||
|
||||
-- inserisco un movimento di deposito verso mag nuovo (SE attivo)
|
||||
IF (@magFrom <> '---')
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOV', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), -@qta
|
||||
FROM deleted
|
||||
)
|
||||
END
|
||||
-- inserisco un movimento di prelievo verso mag vecchio (SE attivo)
|
||||
IF (@magTo <> '---')
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOV', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), @qta
|
||||
FROM inserted
|
||||
)
|
||||
END
|
||||
END
|
||||
|
||||
END
|
||||
go
|
||||
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-09-20
|
||||
-- Description: trigger x inserimento movimenti
|
||||
-- nella coda di trasferimento batch
|
||||
-- verso AS400 x DELETE UDC
|
||||
-- =============================================
|
||||
create TRIGGER trg_DelMovAS
|
||||
ON ElencoCartellini
|
||||
AFTER DELETE
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- setup variabili e verbosità
|
||||
SET NOCOUNT ON;
|
||||
DECLARE @partOk AS BIT
|
||||
|
||||
-- controllo che CI SIA il particoalre (altrimenti non eseguo)
|
||||
SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM deleted)
|
||||
|
||||
IF(@partOk = 1)
|
||||
BEGIN
|
||||
-- metto in storico la posizione attuale dell'UDC (SE esiste) CANCELLATO
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_DEL', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), -Qta
|
||||
FROM deleted
|
||||
)
|
||||
END
|
||||
|
||||
END
|
||||
go
|
||||
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-09-20
|
||||
-- Description: trigger x inserimento movimenti
|
||||
-- nella coda di trasferimento batch
|
||||
-- verso AS400 x INSERT UDC
|
||||
-- =============================================
|
||||
create TRIGGER trg_InsMovAS
|
||||
ON ElencoCartellini
|
||||
AFTER INSERT
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- setup variabili e verbosità
|
||||
SET NOCOUNT ON;
|
||||
DECLARE @partOk AS BIT
|
||||
|
||||
-- controllo che CI SIA il particoalre (altrimenti non eseguo)
|
||||
SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM inserted)
|
||||
|
||||
IF(@partOk = 1)
|
||||
BEGIN
|
||||
-- metto in storico la posizione attuale dell'UDC (SE esiste) CANCELLATO
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_NEW', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), Qta
|
||||
FROM inserted
|
||||
)
|
||||
END
|
||||
|
||||
END
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_rettMovAs400
|
||||
*
|
||||
* inserisce nella tabella per i trasferimenti batch verso magazzino AS una quantità di rettifica (con segno - )per UDC eventualmente già scaricati a sistema
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.20
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_rettMovAs400
|
||||
(
|
||||
@Particolare NVARCHAR(50),
|
||||
@CodMagAS NVARCHAR(50),
|
||||
@Qta DECIMAL(10,2)
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN
|
||||
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
|
||||
VALUES (GETDATE(), 'UDC_NOQTY', @Particolare, @CodMagAS, -@Qta)
|
||||
|
||||
END
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(255, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,698 @@
|
||||
--- alter degli schema AS400 --> RawData (caricamento dati grezzi)
|
||||
|
||||
create schema RawData authorization db_accessadmin
|
||||
go
|
||||
|
||||
-- creo schema x gestione richieste batch
|
||||
create schema BatchQueue authorization db_accessadmin
|
||||
go
|
||||
|
||||
|
||||
-- lascio in schema As400 i dati attuali, creo tab nuove RAW
|
||||
create table RawData.XOGIX00F(
|
||||
XRPQLN numeric(6,0) not null constraint DF_XOGIX00F_XRPQLN default (0),
|
||||
XRPQLD numeric(8,0) not null constraint DF_XOGIX00F_XRPQLD default (0),
|
||||
XNRETI char(10) not null constraint DF_XOGIX00F_XNRETI default (''),
|
||||
XCDFOR char(6) not null constraint DF_XOGIX00F_XCDFOR default (''),
|
||||
XCDTER char(6) not null constraint DF_XOGIX00F_XCDTER default (''),
|
||||
XCDPAR char(15) not null constraint DF_XOGIX00F_XCDPAR default (''),
|
||||
XDTPRO numeric(8,0) not null constraint DF_XOGIX00F_XDTPRO default (0),
|
||||
XTRPRO char(5) not null constraint DF_XOGIX00F_XTRPRO default (''),
|
||||
XQTPRO numeric(5,0) not null constraint DF_XOGIX00F_XQTPRO default (0),
|
||||
XDESMT char(3) not null constraint DF_XOGIX00F_XDESMT default (''),
|
||||
XMATSC char(1) not null constraint DF_XOGIX00F_XMATSC default (''),
|
||||
XBENQL char(1) not null
|
||||
)
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- travaso dati da tab As400 a RawData
|
||||
INSERT INTO RawData.XOGIX00F
|
||||
SELECT *
|
||||
FROM As400.t_XOGIX00F
|
||||
GO
|
||||
|
||||
-- aggiungo tab rilpro
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
create table RilPro.RapQual(
|
||||
nRapQual numeric(6,0) not null,
|
||||
DataRapQual numeric(8,0) not null,
|
||||
ProgUDC nvarchar(10) not null constraint PK_RapQual primary key,
|
||||
CodFor nvarchar(6) not null,
|
||||
DestTerz nvarchar(6) not null,
|
||||
CodLega nvarchar(15) not null,
|
||||
DataPrelFus numeric(8,0) not null,
|
||||
TurnoPrelFus nvarchar(5) not null,
|
||||
Qta numeric(5,0) not null,
|
||||
DestLega nvarchar(3) not null,
|
||||
LegaScaric nvarchar(1) not null,
|
||||
BenesQual nvarchar(1) not null,
|
||||
UDC nvarchar(13)
|
||||
)
|
||||
go
|
||||
|
||||
create index i_numRap on RilPro.RapQual(nRapQual)
|
||||
go
|
||||
|
||||
create index i_dataRap on RilPro.RapQual(DataRapQual)
|
||||
go
|
||||
|
||||
create index i_numDataRap on RilPro.RapQual(nRapQual,DataRapQual)
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
-- aggiungo stored di travaso!
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
create schema BatchQueue authorization db_accessadmin
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_batch_RapQual_S01
|
||||
*
|
||||
* Esegue lo step 1 (caricamento dati RAW da AS400) per la tab dei rapporti di qualità
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.23
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE BatchQueue.stp_batch_RapQual_S01
|
||||
(
|
||||
@minNumRapQual INT
|
||||
)
|
||||
AS
|
||||
-- BOZZA DA COMPLETARE A CURA MAZZUCCONI!!!
|
||||
|
||||
DECLARE @SQL AS NVARCHAR(1000)
|
||||
|
||||
-- svuoto tab raw attuale
|
||||
/*
|
||||
DELETE FROM RawData.XOGIX00F
|
||||
*/
|
||||
|
||||
|
||||
-- INSERISCO DA AS400
|
||||
/*
|
||||
INSERT INTO RawData.XOGIX00F
|
||||
(
|
||||
SET @SQL =
|
||||
N'SELECT
|
||||
XRPQLN
|
||||
,XRPQLD
|
||||
,XNRETI
|
||||
,XCDFOR
|
||||
,XCDTER
|
||||
,XCDPAR
|
||||
,XDTPRO
|
||||
,XTRPRO
|
||||
,XQTPRO
|
||||
,XDESMT
|
||||
,XMATSC
|
||||
,XBENQL
|
||||
FROM OPENQUERY( P65220DC, ''SELECT * FROM MAZZT_DTV3.XOGIX00F WHERE XRPQLN >= '
|
||||
SET @SQL = @SQL + @minNumRapQual + ''' )'
|
||||
|
||||
EXEC dbo.sp_executesql @SQL
|
||||
)
|
||||
*/
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_batch_RapQual_S01
|
||||
*
|
||||
* Esegue lo step 2 (travaso dati RAW in RilPro) per la tab dei rapporti di qualità
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.23
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE BatchQueue.stp_batch_RapQual_S02
|
||||
AS
|
||||
-- eseguo UPSERT x tutti i dati disponibili in tab Raw...
|
||||
|
||||
-- se il dato esiste faccio UPDATE!!!
|
||||
UPDATE RilPro.RapQual
|
||||
SET CodFor = u.XCDFOR,
|
||||
DestTerz = u.XCDTER,
|
||||
CodLega = u.XCDPAR,
|
||||
DataPrelFus = u.XDTPRO,
|
||||
TurnoPrelFus= u.XTRPRO,
|
||||
Qta = u.XQTPRO,
|
||||
DestLega = u.XDESMT,
|
||||
LegaScaric = u.XMATSC,
|
||||
BenesQual = u.XBENQL
|
||||
FROM RilPro.RapQual rq
|
||||
INNER JOIN RawData.XOGIX00F u ON u.XNRETI = rq.ProgUDC; -- AND u.XRPQLN = rq.nRapQual AND u.XRPQLD = rq.DataRapQual; -- se XNRETI è univoco ...
|
||||
|
||||
|
||||
-- creo tab temporanea x i dati inesistenti..
|
||||
WITH cteInsert AS
|
||||
(SELECT x.*
|
||||
FROM RawData.XOGIX00F x LEFT OUTER JOIN RilPro.RapQual rq
|
||||
ON x.XNRETI = rq.ProgUDC -- AND u.XRPQLN = rq.nRapQual AND u.XRPQLD = rq.DataRapQual; -- se XNRETI è univoco ...
|
||||
WHERE rq.ProgUDC IS NULL )
|
||||
|
||||
-- se il dato non c'è faccio INSERT!!!
|
||||
INSERT INTO RilPro.RapQual(nRapQual, DataRapQual, ProgUDC, CodFor, DestTerz, CodLega, DataPrelFus, TurnoPrelFus, Qta, DestLega, LegaScaric, BenesQual)
|
||||
SELECT XRPQLN AS nRapQual,
|
||||
XRPQLD AS DataRapQual,
|
||||
XNRETI AS ProgUDC,
|
||||
XCDFOR AS CodFor,
|
||||
XCDTER AS DestTerz,
|
||||
XCDPAR AS CodLega,
|
||||
XDTPRO AS DataPrelFus,
|
||||
XTRPRO AS TurnoPrelFus,
|
||||
XQTPRO AS Qta,
|
||||
XDESMT AS DestLega,
|
||||
XMATSC AS LegaScaric,
|
||||
XBENQL AS BenesQual
|
||||
FROM cteInsert
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
- nuove functions
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* function componiUdc
|
||||
*
|
||||
* compone il cod UDC a partire da
|
||||
* - CodCS (codice company sito, 2 char)
|
||||
* - Flusso (codice flusso-bilancia 2 char)
|
||||
* - @Anno (anno, 2 char)
|
||||
* - @numUdc (progr annuale, 2 char)
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.23
|
||||
*
|
||||
****************************************/
|
||||
create FUNCTION componiUdc
|
||||
(
|
||||
@CodCS NVARCHAR(2),
|
||||
@Flusso NVARCHAR(2),
|
||||
@Anno NVARCHAR(2),
|
||||
@numUdc INT
|
||||
)
|
||||
RETURNS NVARCHAR(13)
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
DECLARE @answ AS NVARCHAR(50)
|
||||
|
||||
SET @answ = 'U' + @CodCS + @Flusso + @Anno + dbo.f_padLeft(CAST(@numUdc AS VARCHAR(6)), 6, '0')
|
||||
|
||||
RETURN @answ
|
||||
END
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* function getUdcComp
|
||||
*
|
||||
* effettua la "compattazione" dell'UDC, andando a prendere un sottoinsieme dei dati iniziali (UAAxxxx dove AA = anno...)
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.23
|
||||
*
|
||||
****************************************/
|
||||
create FUNCTION getUdcComp
|
||||
(
|
||||
@fullUDC NVARCHAR(50),
|
||||
@maxLen INTEGER
|
||||
)
|
||||
RETURNS NVARCHAR(20)
|
||||
AS
|
||||
BEGIN
|
||||
-- calcolo lunghezza originale
|
||||
DECLARE @fullLen AS INT
|
||||
SET @fullLen = LEN(@fullUDC)
|
||||
|
||||
-- dichiaro stringa out (max 20 char)
|
||||
DECLARE @answ NVARCHAR(20)
|
||||
|
||||
-- recupero parte finale (ultimi @maxLen caratteri...)
|
||||
|
||||
|
||||
-- compongo codice
|
||||
SET @answ = 'U' + RIGHT(LEFT(@fullUDC, 7), 2) + RIGHT(@fullUDC,@maxLen-3) -- tolgo 3 char: U + anno...
|
||||
|
||||
RETURN @answ
|
||||
END
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- altre stored
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_rappQualAssociaUdc
|
||||
*
|
||||
* Associa l'UDC (creato) ad un rapp qualità di AS esistente SOLO SE UDC è NULL
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.23
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_rappQualAssociaUdc
|
||||
(
|
||||
@ProgUDC NVARCHAR(10),
|
||||
@UDC NVARCHAR(13)
|
||||
)
|
||||
AS
|
||||
UPDATE RilPro.RapQual
|
||||
SET UDC = @UDC
|
||||
WHERE (ProgUDC = @ProgUDC) AND (UDC IS NULL)
|
||||
|
||||
-- restituisce la riga aggiornata
|
||||
SELECT *
|
||||
FROM RilPro.RapQual
|
||||
WHERE ProgUDC = @ProgUDC
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_rappQualGetByNumRapQual
|
||||
*
|
||||
* Ottiene l'elenco dei record di rapp qualità di AS dato il numero del rapporto di qualità che NON HANNO UDC
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.23
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_rappQualGetByNumRapQual
|
||||
(
|
||||
@nRapQual INT
|
||||
)
|
||||
AS
|
||||
-- restituisce le righe richieste
|
||||
SELECT *
|
||||
FROM RilPro.RapQual
|
||||
WHERE (nRapQual = @nRapQual) AND (UDC IS NULL)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- update stored
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UDC_insNew
|
||||
*
|
||||
* crea un nuovo record nella TabStatoOdpUdc e restituisce il codice UDC appena creato
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.04.28
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_UDC_insNew
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@Flusso VARCHAR(2),
|
||||
@Anno VARCHAR(2),
|
||||
@Tara FLOAT,
|
||||
@CodImballo AS VARCHAR(50),
|
||||
@CodTipoDichiaraz CHAR(1),
|
||||
@CodOperatore AS VARCHAR(50),
|
||||
@CodEvento VARCHAR(10)
|
||||
)
|
||||
AS
|
||||
|
||||
-- DECLARE iniziali
|
||||
DECLARE @UDC AS VARCHAR(20)
|
||||
DECLARE @numFlu AS INT
|
||||
DECLARE @numUdc AS INT
|
||||
DECLARE @nextUdc AS INT
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Flusso
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- controllo se esiste il flusso (bilancia)...
|
||||
SET @numFlu = (
|
||||
SELECT count(*)
|
||||
FROM AnagBilance
|
||||
WHERE CodBilancia = @Flusso
|
||||
)
|
||||
-- ...sennò lo creo...
|
||||
IF(@numFlu = 0)
|
||||
BEGIN
|
||||
-- se c'è inserisco in tab
|
||||
INSERT INTO AnagBilance(CodBilancia, DescrImpianto, CodCS)
|
||||
VALUES (@Flusso, @Flusso, @CodCS)
|
||||
END
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- UDC
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- controllo se ci sia già un UDC per company / flusso anno
|
||||
BEGIN TRAN
|
||||
-- cerco nella tab contatori UDC l'ultimo valido
|
||||
SET @numUdc = (
|
||||
SELECT count(*)
|
||||
FROM ContatoriUdc
|
||||
WHERE CodCS = @CodCS
|
||||
AND Flusso = @Flusso
|
||||
AND Anno = @Anno
|
||||
)
|
||||
-- controllo se record c'è...
|
||||
IF(@numUdc > 0)
|
||||
BEGIN
|
||||
-- se c'è incremento di 1 in tab
|
||||
UPDATE ContatoriUdc
|
||||
SET LastIdx = LastIdx + 1
|
||||
WHERE CodCS = @CodCS
|
||||
AND Flusso = @Flusso
|
||||
AND Anno = @Anno
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
-- lo creo!
|
||||
INSERT INTO ContatoriUdc(CodCS, Flusso, Anno, LastIdx)
|
||||
VALUES (@CodCS, @Flusso, @Anno, 1)
|
||||
END
|
||||
-- aggiorno numero UDC
|
||||
SET @numUdc = (
|
||||
SELECT LastIdx
|
||||
FROM ContatoriUdc
|
||||
WHERE CodCS = @CodCS
|
||||
AND Flusso = @Flusso
|
||||
AND Anno = @Anno
|
||||
)
|
||||
COMMIT TRAN
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Ciclo principale x inserimento nuovo record
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- ottengo il nuovo codice UDC completo
|
||||
--SET @UDC = 'U' + @CodCS + @Flusso + @Anno + dbo.f_padLeft(CAST(@numUdc AS VARCHAR(6)), 6, '0')
|
||||
SET @UDC = dbo.componiUdc(@CodCS, @Flusso, @Anno, @numUdc)
|
||||
|
||||
-- inserisco un nuovo record
|
||||
INSERT INTO ElencoCartellini(CodCS, UDC, Tara, IdxPosizione, Qta, CodImballo, CreateDate, ModDate)
|
||||
VALUES (@CodCS, @UDC, @Tara, 0, 0, @CodImballo, GETDATE(), GETDATE())
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- restituisco la tab dati con l'udc appena inserito
|
||||
------------------------------------------------------------------------------------------------------
|
||||
SELECT *
|
||||
FROM ElencoCartellini
|
||||
WHERE UDC = @UDC
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UDC_insNewFull
|
||||
*
|
||||
* crea un nuovo record nella TabStatoOdpUdc FULL (con pesi, qta...) e restituisce il codice UDC appena creato
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.04.28
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_UDC_insNewFull
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@Flusso VARCHAR(2),
|
||||
@Anno VARCHAR(2),
|
||||
@CodCliente VARCHAR(6),
|
||||
@Particolare VARCHAR(15),
|
||||
@CodImpianto AS VARCHAR(50),
|
||||
@CodStampo VARCHAR(8),
|
||||
@Esponente VARCHAR(6),
|
||||
@Figura VARCHAR(4),
|
||||
@DataFus DATETIME,
|
||||
@TurnoFus INT,
|
||||
@CodImballo VARCHAR(15),
|
||||
@CodSoggetto VARCHAR(17),
|
||||
@Tara FLOAT,
|
||||
@IdxPosizione INT,
|
||||
@CodTipoDichiaraz CHAR(1),
|
||||
@CodEvento VARCHAR(10),
|
||||
@Qta DECIMAL(10,2),
|
||||
@PesoTot FLOAT,
|
||||
@PesoCad FLOAT,
|
||||
@CodStato VARCHAR(50),
|
||||
@UDC_parent VARCHAR(20)
|
||||
)
|
||||
AS
|
||||
|
||||
-- DECLARE iniziali
|
||||
DECLARE @UDC AS VARCHAR(20)
|
||||
DECLARE @RagSociale AS VARCHAR(35)
|
||||
DECLARE @DescParticolare AS VARCHAR(30)
|
||||
DECLARE @DescImpianto AS VARCHAR(50)
|
||||
DECLARE @DisegnoGrezzo AS VARCHAR(30)
|
||||
DECLARE @NumCont AS INT
|
||||
DECLARE @numFlu AS INT
|
||||
DECLARE @numUdc AS INT
|
||||
DECLARE @nextUdc AS INT
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Caricamento Dati da anagrafica
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- cerco la ragione sociale...
|
||||
SET @RagSociale = (
|
||||
SELECT ISNULL(RagSociale, 'ND') AS RagSociale
|
||||
FROM RilPro.AnagClienti
|
||||
WHERE (CodCliente = @CodCliente)
|
||||
)
|
||||
|
||||
-- Cerco descrizione del particolare...
|
||||
SET @DescParticolare = (
|
||||
SELECT ISNULL(DescParticolare, 'ND') AS DescParticolare
|
||||
FROM RilPro.AnagParticolari
|
||||
WHERE (Particolare = @Particolare)
|
||||
)
|
||||
|
||||
-- cerco codice disegno grezzo
|
||||
SET @DisegnoGrezzo = (
|
||||
SELECT ISNULL(DisegnoGrezzo, 'ND') AS DescParticolare
|
||||
FROM RilPro.AnagParticolari
|
||||
WHERE (Particolare = @Particolare)
|
||||
)
|
||||
|
||||
-- cerco descrizione Impianto
|
||||
SET @DescImpianto = (
|
||||
SELECT ISNULL(DescImpianto, 'ND') AS DescImpianto
|
||||
FROM AnagImpianti
|
||||
WHERE (CodImpianto = @CodImpianto)
|
||||
)
|
||||
|
||||
|
||||
|
||||
-- Calcolo contatore intero successivo x il contenitore...
|
||||
SET @NumCont = (
|
||||
SELECT ISNULL(MAX(NumCont), 0) + 1 AS NumCont
|
||||
FROM ElencoCartellini
|
||||
WHERE (Particolare = @Particolare)
|
||||
AND (DataFus = @DataFus)
|
||||
AND (TurnoFus = @TurnoFus)
|
||||
AND (CodImpianto = @CodImpianto)
|
||||
AND (CodStampo = @CodStampo)
|
||||
AND (Figura = @Figura)
|
||||
)
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Flusso
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- controllo se esiste il flusso (bilancia)...
|
||||
SET @numFlu = (
|
||||
SELECT count(*)
|
||||
FROM AnagBilance
|
||||
WHERE CodBilancia = @Flusso
|
||||
)
|
||||
-- ...sennò lo creo...
|
||||
IF(@numFlu = 0)
|
||||
BEGIN
|
||||
-- se c'è inserisco in tab
|
||||
INSERT INTO AnagBilance(CodBilancia, DescrImpianto, CodCS)
|
||||
VALUES (@Flusso, @Flusso, @CodCS)
|
||||
END
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- UDC
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- controllo se ci sia già un UDC per company / flusso anno
|
||||
BEGIN TRAN
|
||||
-- cerco nella tab contatori UDC l'ultimo valido
|
||||
SET @numUdc = (
|
||||
SELECT count(*)
|
||||
FROM ContatoriUdc
|
||||
WHERE CodCS = @CodCS
|
||||
AND Flusso = @Flusso
|
||||
AND Anno = @Anno
|
||||
)
|
||||
-- controllo se record c'è...
|
||||
IF(@numUdc > 0)
|
||||
BEGIN
|
||||
-- se c'è incremento di 1 in tab
|
||||
UPDATE ContatoriUdc
|
||||
SET LastIdx = LastIdx + 1
|
||||
WHERE CodCS = @CodCS
|
||||
AND Flusso = @Flusso
|
||||
AND Anno = @Anno
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
-- lo creo!
|
||||
INSERT INTO ContatoriUdc(CodCS, Flusso, Anno, LastIdx)
|
||||
VALUES (@CodCS, @Flusso, @Anno, 1)
|
||||
END
|
||||
-- aggiorno numero UDC
|
||||
SET @numUdc = (
|
||||
SELECT LastIdx
|
||||
FROM ContatoriUdc
|
||||
WHERE CodCS = @CodCS
|
||||
AND Flusso = @Flusso
|
||||
AND Anno = @Anno
|
||||
)
|
||||
COMMIT TRAN
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Ciclo principale x inserimento nuovo record
|
||||
------------------------------------------------------------------------------------------------------
|
||||
BEGIN TRAN
|
||||
-- ottengo il nuovo codice UDC completo
|
||||
--SET @UDC = 'U' + @CodCS + @Flusso + @Anno + dbo.f_padLeft(CAST(@numUdc AS VARCHAR(6)), 6, '0')
|
||||
SET @UDC = dbo.componiUdc(@CodCS, @Flusso, @Anno, @numUdc)
|
||||
|
||||
|
||||
-- inserisco un nuovo record
|
||||
INSERT INTO ElencoCartellini(UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, CodImpianto, DescImpianto, CodStampo, Figura, DataFus, TurnoFus, CodImballo, CodSoggetto, NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad, CreateDate, ModDate)
|
||||
VALUES (@UDC, @CodCS, @CodCliente, @RagSociale, @Particolare, @DescParticolare, @DisegnoGrezzo, @Esponente, @CodImpianto, @DescImpianto, @CodStampo, @Figura, @DataFus, @TurnoFus, @CodImballo, @CodSoggetto, @NumCont, @Tara, @Qta, @CodStato, @IdxPosizione, @PesoTot, @PesoCad, GETDATE(), GETDATE())
|
||||
|
||||
-- inserisco relazione aprent-child tra UDC vecchio (tara) e nuovo (pesa)
|
||||
INSERT INTO RelazUDC(UDC_parent, UDC_child)
|
||||
VALUES (@UDC_parent, @UDC)
|
||||
COMMIT TRAN
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Salvataggio dati evento in tab StoricoEventi
|
||||
------------------------------------------------------------------------------------------------------
|
||||
INSERT INTO StoricoEventi(DataEv, CodEvento, CodOperatore, CodTipoDichiaraz, CodCS, UDC, Qta, PesoTot, PesoCad, Particolare, CodStato, CodStampo, Figura, FiguraIncisa)
|
||||
VALUES (GETDATE(), @CodEvento, @CodOperatore, @CodTipoDichiaraz, @CodCS, @UDC, @Qta, @PesoTot, @PesoCad, @Particolare, @CodStato, @CodStampo, @Figura, @FiguraIncisa)
|
||||
------------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- restituisco la tab dati con l'udc appena inserito
|
||||
------------------------------------------------------------------------------------------------------
|
||||
SELECT *
|
||||
FROM ElencoCartellini
|
||||
WHERE UDC = @UDC
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
-- aggiungo stato MP
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.AnagStatiProdotto
|
||||
VALUES (N'MP', N'Materia Prima')
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(257, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,132 @@
|
||||
-- svuotamento tabelle e dati test da UDC, posizioni e storici
|
||||
-- eliminazione posizioni storiche
|
||||
delete from PosizioneUdcStorico
|
||||
go
|
||||
|
||||
-- eliminazione posizioni attuali
|
||||
delete from PosizioneUdcCorrente
|
||||
go
|
||||
|
||||
-- eliminazione posizioni storiche
|
||||
delete from PosizioneUdcStorico
|
||||
go
|
||||
|
||||
|
||||
-- elimino da tab batch AS400
|
||||
delete from AS400_BatchMovimenti
|
||||
go
|
||||
|
||||
|
||||
-- elimino storico cartellini
|
||||
delete from StoricoCartellini
|
||||
go
|
||||
|
||||
-- elimino righe liste di prelievo AS
|
||||
delete from RigheListePrelievo_AS
|
||||
go
|
||||
|
||||
-- elimino righe liste di prelievo
|
||||
delete from RigheListePrelievo
|
||||
go
|
||||
|
||||
-- elimino liste di prelievo AS
|
||||
delete from ElencoListePrelievo_as
|
||||
go
|
||||
|
||||
-- elimino liste di prelievo
|
||||
delete from ElencoListePrelievo
|
||||
go
|
||||
|
||||
-- elimino da delibere
|
||||
delete from Delibere
|
||||
go
|
||||
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-09-20
|
||||
-- Description: trigger x inserimento movimenti
|
||||
-- nella coda di trasferimento batch
|
||||
-- verso AS400 x DELETE UDC
|
||||
-- =============================================
|
||||
ALTER TRIGGER dbo.trg_DelMovAS
|
||||
ON dbo.ElencoCartellini
|
||||
AFTER DELETE
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- setup variabili e verbosità
|
||||
SET NOCOUNT ON;
|
||||
DECLARE @partOk AS BIT
|
||||
|
||||
-- rifare: se c'è delete in blocco DEVE andare ad operare 1 riga alla volta...
|
||||
|
||||
/*
|
||||
-- controllo che CI SIA il particolare (altrimenti non eseguo)
|
||||
SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM deleted)
|
||||
|
||||
IF(@partOk = 1)
|
||||
BEGIN
|
||||
-- metto in storico la posizione attuale dell'UDC (SE esiste) CANCELLATO
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_DEL', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), -Qta
|
||||
FROM deleted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
*/
|
||||
END
|
||||
|
||||
|
||||
-- elimino cartellini correnti
|
||||
delete from ElencoCartellini
|
||||
go
|
||||
|
||||
-- rimetto trigger
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-09-20
|
||||
-- Description: trigger x inserimento movimenti
|
||||
-- nella coda di trasferimento batch
|
||||
-- verso AS400 x DELETE UDC
|
||||
-- =============================================
|
||||
ALTER TRIGGER dbo.trg_DelMovAS
|
||||
ON dbo.ElencoCartellini
|
||||
AFTER DELETE
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- setup variabili e verbosità
|
||||
SET NOCOUNT ON;
|
||||
-- inserisco movimenti AS
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_DEL', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), -Qta
|
||||
FROM deleted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1) AND ((CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END) = 1)
|
||||
)
|
||||
|
||||
END
|
||||
go
|
||||
|
||||
|
||||
-- elimino storico cartellini
|
||||
DELETE FROM StoricoCartellini
|
||||
go
|
||||
|
||||
-- indico tutte celle vuote!
|
||||
update Celle
|
||||
set Piena = 0
|
||||
GO
|
||||
|
||||
-- resetto contatori!
|
||||
delete from ContatoriListePrelievo
|
||||
go
|
||||
|
||||
delete from ContatoriUdc
|
||||
go
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(258, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,694 @@
|
||||
-- update tab transizione eventi
|
||||
|
||||
update AnagTipoDelibere
|
||||
set CodEvento='DelWipPost'
|
||||
where CodTipoDelibera='DelibWipPost'
|
||||
go
|
||||
|
||||
-- aggiunta valori nuovi in AnagTipoEvento e TabTranPosizEventi
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.AnagTipoEvento
|
||||
VALUES (N'UDC_CONS', N'Consumo UDC')
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.AnagPosizioni
|
||||
VALUES (-84, N'AM - WIP consumati')
|
||||
INSERT INTO dbo.AnagPosizioni
|
||||
VALUES (-56, N'AM - MP consumati')
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.TabTranPosizEventi
|
||||
VALUES (N'UDC_CONS', 56, -56)
|
||||
INSERT INTO dbo.TabTranPosizEventi
|
||||
VALUES (N'UDC_CONS', 84, -84)
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
--- update tabelle varie: anag mag!
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table AnagMag add
|
||||
Nascosto bit constraint DF_AnagMag_Nascosto default (0)
|
||||
go
|
||||
|
||||
update AnagMag set Nascosto=0
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverview
|
||||
*
|
||||
* elenco di overview sullo stato dei magazzini (dettaglio a "maglie larghe")
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.02
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_magazzinoOverview
|
||||
(
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco,
|
||||
TipoCella.Capienza * Blocchi.NumX * Blocchi.NumY * Blocchi.NumZ AS TotCelle,
|
||||
TipoCella.Capienza * COUNT(DISTINCT Celle.IdxCella) AS CelleAttive,
|
||||
COUNT(PosizioneUdcCorrente.UDC) AS CelleOccupate,
|
||||
TipoCella.Capienza * COUNT(DISTINCT Celle.IdxCella) - COUNT(PosizioneUdcCorrente.UDC) AS CelleLibere,
|
||||
ISNULL(MIN(PosizioneUdcCorrente.DataRif), GETDATE()) AS Oldest, ISNULL(MAX(PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest
|
||||
FROM TipoCella INNER JOIN
|
||||
AnagMag INNER JOIN
|
||||
Blocchi ON AnagMag.CodMag = Blocchi.CodMag AND AnagMag.CodCS = Blocchi.CodCS ON TipoCella.CodMag = AnagMag.CodMag AND
|
||||
TipoCella.CodCS = AnagMag.CodCS LEFT OUTER JOIN
|
||||
Celle ON TipoCella.IdxTipoCella = Celle.IdxTipoCella AND Blocchi.IdxBlocco = Celle.IdxBlocco LEFT OUTER JOIN
|
||||
PosizioneUdcCorrente ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella
|
||||
WHERE (Celle.Attiva = 1) AND (AnagMag.CodCS = @CodCS) AND (ISNULL(AnagMag.Nascosto, 0) = 0)
|
||||
GROUP BY AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, Blocchi.NumX, Blocchi.NumY, Blocchi.NumZ,
|
||||
TipoCella.Capienza
|
||||
ORDER BY AnagMag.CodMag, Blocchi.CodBlocco
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverview
|
||||
*
|
||||
* elenco di overview sullo stato dei magazzini LOGICI (dettaglio a "maglie larghe")
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.15
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_magazzinoLogicoOverview
|
||||
(
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT ElencoCartellini.CodCS, AnagPosizioni.IdxPosizione AS CodMagLogico, AnagPosizioni.DescPosizione AS DescMagLogico, Blocchi.IdxBlocco, AnagMag.CodMag,
|
||||
Blocchi.CodBlocco, COUNT(ElencoCartellini.UDC) AS CelleOccupate, ISNULL(MIN(PosizioneUdcCorrente.DataRif), GETDATE()) AS Oldest,
|
||||
ISNULL(MAX(PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest
|
||||
FROM Celle INNER JOIN
|
||||
Blocchi INNER JOIN
|
||||
AnagMag ON Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS ON Celle.IdxBlocco = Blocchi.IdxBlocco INNER JOIN
|
||||
ElencoCartellini INNER JOIN
|
||||
PosizioneUdcCorrente ON ElencoCartellini.UDC = PosizioneUdcCorrente.UDC INNER JOIN
|
||||
AnagPosizioni ON ElencoCartellini.IdxPosizione = AnagPosizioni.IdxPosizione ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella
|
||||
WHERE (ElencoCartellini.CodCS = @CodCS) AND (ISNULL(AnagMag.Nascosto, 0) = 0)
|
||||
GROUP BY ElencoCartellini.CodCS, AnagPosizioni.IdxPosizione, AnagPosizioni.DescPosizione, Blocchi.IdxBlocco, Blocchi.CodBlocco, AnagMag.CodMag
|
||||
ORDER BY CodMagLogico, Blocchi.CodBlocco
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
-- update triggers cartellini
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-09-20
|
||||
-- Description: trigger x inserimento movimenti
|
||||
-- nella coda di trasferimento batch
|
||||
-- verso AS400 x UPDATE UDC
|
||||
-- =============================================
|
||||
alter TRIGGER trg_updMovAS
|
||||
ON ElencoCartellini
|
||||
AFTER UPDATE
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- setup variabili e verbosità
|
||||
SET NOCOUNT ON;
|
||||
DECLARE @partOk AS BIT
|
||||
DECLARE @IdxPosFrom AS INT
|
||||
DECLARE @IdxPosTo AS INT
|
||||
DECLARE @magFrom AS NVARCHAR(50)
|
||||
DECLARE @magTo AS NVARCHAR(50)
|
||||
DECLARE @qta AS DECIMAL(10,2)
|
||||
|
||||
-- controllo che CI SIA il particolare (altrimenti non eseguo)
|
||||
SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM deleted)
|
||||
|
||||
IF(@partOk = 1)
|
||||
SET @qta = (SELECT Qta FROM inserted)
|
||||
-- se c'è stata modifica di quantità inizio a rettificare quella
|
||||
IF UPDATE(Qta)
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOD', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), @qta-Qta
|
||||
FROM deleted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
|
||||
-- controllo poi se sia cambiato il magazzino, altrimenti non lo inserisco
|
||||
IF UPDATE(IdxPosizione)
|
||||
BEGIN
|
||||
-- Prendo le posizioni di magazzino precedente e nuova
|
||||
SET @IdxPosFrom = (SELECT IdxPosizione FROM deleted)
|
||||
SET @IdxPosTo = (SELECT IdxPosizione FROM inserted)
|
||||
-- Le trasformo nelle equivalenti stringhe del codMag SE attive
|
||||
SET @magFrom = (SELECT ISNULL(CodMagAS,'---') FROM AS400_MagCont WHERE Attivo = 1 AND CodMagAs = CAST(@IdxPosFrom AS NVARCHAR(50)))
|
||||
SET @magTo = (SELECT ISNULL(CodMagAS,'---') FROM AS400_MagCont WHERE Attivo = 1 AND CodMagAs = CAST(@IdxPosTo AS NVARCHAR(50)))
|
||||
|
||||
-- inserisco un movimento di deposito verso mag nuovo (SE attivo)
|
||||
IF (@magFrom <> '---')
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOV', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), -@qta
|
||||
FROM deleted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
-- inserisco un movimento di prelievo verso mag vecchio (SE attivo)
|
||||
IF (@magTo <> '---')
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOV', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), @qta
|
||||
FROM inserted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
END
|
||||
|
||||
END
|
||||
go
|
||||
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-09-20
|
||||
-- Description: trigger x inserimento movimenti
|
||||
-- nella coda di trasferimento batch
|
||||
-- verso AS400 x DELETE UDC
|
||||
-- =============================================
|
||||
alter TRIGGER trg_DelMovAS
|
||||
ON ElencoCartellini
|
||||
AFTER DELETE
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- setup variabili e verbosità
|
||||
SET NOCOUNT ON;
|
||||
-- inserisco movimenti AS
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_DEL', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), -Qta
|
||||
FROM deleted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1) AND ((CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END) = 1)
|
||||
)
|
||||
|
||||
END
|
||||
go
|
||||
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-09-20
|
||||
-- Description: trigger x inserimento movimenti
|
||||
-- nella coda di trasferimento batch
|
||||
-- verso AS400 x INSERT UDC
|
||||
-- =============================================
|
||||
alter TRIGGER trg_InsMovAS
|
||||
ON ElencoCartellini
|
||||
AFTER INSERT
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- setup variabili e verbosità
|
||||
SET NOCOUNT ON;
|
||||
DECLARE @partOk AS BIT
|
||||
|
||||
-- controllo che CI SIA il particoalre (altrimenti non eseguo)
|
||||
SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM inserted)
|
||||
|
||||
IF(@partOk = 1)
|
||||
BEGIN
|
||||
-- metto in storico la posizione attuale dell'UDC (SE esiste) CANCELLATO
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_NEW', Particolare, CAST(IdxPosizione AS NVARCHAR(50)), Qta
|
||||
FROM inserted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
|
||||
END
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
-- fix dei CodSoggetto
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table StoricoCartellini alter column
|
||||
CodSoggetto nchar(17)
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
-- aggiungo vista
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
create VIEW v_posizioniDelibere
|
||||
AS
|
||||
SELECT DISTINCT tpe.IdxPosizione, atd.CodTipoDelibera
|
||||
FROM dbo.TabTranPosizEventi AS tpe INNER JOIN
|
||||
dbo.AnagTipoEvento AS ate ON tpe.CodEvento = ate.CodEvento INNER JOIN
|
||||
dbo.AnagTipoDelibere AS atd ON ate.CodEvento = atd.CodEvento
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "tpe"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 38
|
||||
Bottom = 118
|
||||
Right = 208
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "ate"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 246
|
||||
Bottom = 101
|
||||
Right = 416
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "atd"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 454
|
||||
Bottom = 118
|
||||
Right = 632
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 9
|
||||
Width = 284
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
End
|
||||
End
|
||||
Begin CriteriaPane =
|
||||
Begin ColumnWidths = 11
|
||||
Column = 1440
|
||||
Alias = 900
|
||||
Table = 1170
|
||||
Output = 720
|
||||
Append = 1400
|
||||
NewValue = 1170
|
||||
SortType = 1350
|
||||
SortOrder = 1410
|
||||
GroupBy = 1350
|
||||
Filter = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
End
|
||||
End
|
||||
End
|
||||
', 'SCHEMA', 'dbo', 'VIEW', 'v_posizioniDelibere'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPaneCount', 1, 'SCHEMA', 'dbo', 'VIEW', 'v_posizioniDelibere'
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
alter VIEW v_UdcDetail
|
||||
AS
|
||||
SELECT dbo.ElencoCartellini.UDC, ISNULL(dbo.ElencoCartellini.RagSociale, N'') AS RagSociale, ISNULL(dbo.ElencoCartellini.Particolare, N'') AS Particolare,
|
||||
ISNULL(dbo.ElencoCartellini.DescParticolare, N'') AS DescParticolare, ISNULL(dbo.ElencoCartellini.DisegnoGrezzo, N'') AS DisegnoGrezzo,
|
||||
ISNULL(dbo.ElencoCartellini.Esponente, N'') AS Esponente, ISNULL(dbo.ElencoCartellini.DescImpianto, N'') AS DescImpianto, ISNULL(dbo.ElencoCartellini.DataFus,
|
||||
N'') AS DataFus, ISNULL(dbo.ElencoCartellini.TurnoFus, 0) AS TurnoFus, dbo.ElencoCartellini.CodImballo, dbo.ElencoCartellini.Qta,
|
||||
ISNULL(dbo.AnagStatiProdotto.DescStato, N'') AS DescStato, dbo.ElencoCartellini.ModDate, ISNULL(dbo.Blocchi.CodMag, N'') AS CodMag,
|
||||
ISNULL(dbo.Blocchi.CodBlocco, N'') AS CodBlocco, ISNULL(dbo.Celle.CodCella, N'') AS CodCella, ISNULL(dbo.Celle.IdxCella, 0) AS IdxCella, ISNULL(dbo.Celle.X, 0)
|
||||
AS X, ISNULL(dbo.Celle.Y, 0) AS Y, ISNULL(dbo.Celle.Z, 0) AS Z, dbo.ElencoCartellini.IdxPosizione
|
||||
FROM dbo.AnagStatiProdotto RIGHT OUTER JOIN
|
||||
dbo.ElencoCartellini ON dbo.AnagStatiProdotto.CodStato = dbo.ElencoCartellini.CodStato AND
|
||||
dbo.AnagStatiProdotto.CodStato = dbo.ElencoCartellini.CodStato LEFT OUTER JOIN
|
||||
dbo.Celle INNER JOIN
|
||||
dbo.PosizioneUdcCorrente ON dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella AND dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella AND
|
||||
dbo.Celle.IdxCella = dbo.PosizioneUdcCorrente.IdxCella INNER JOIN
|
||||
dbo.Blocchi ON dbo.Celle.IdxBlocco = dbo.Blocchi.IdxBlocco INNER JOIN
|
||||
dbo.AnagMag ON dbo.Blocchi.CodMag = dbo.AnagMag.CodMag AND dbo.Blocchi.CodCS = dbo.AnagMag.CodCS AND
|
||||
dbo.Blocchi.CodMag = dbo.AnagMag.CodMag AND dbo.Blocchi.CodCS = dbo.AnagMag.CodCS AND dbo.Blocchi.CodMag = dbo.AnagMag.CodMag AND
|
||||
dbo.Blocchi.CodCS = dbo.AnagMag.CodCS ON dbo.ElencoCartellini.UDC = dbo.PosizioneUdcCorrente.UDC
|
||||
go
|
||||
|
||||
exec sp_updateextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "AnagStatiProdotto"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 38
|
||||
Bottom = 101
|
||||
Right = 208
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "ElencoCartellini"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 246
|
||||
Bottom = 309
|
||||
Right = 416
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 11
|
||||
End
|
||||
Begin Table = "Celle"
|
||||
Begin Extent =
|
||||
Top = 27
|
||||
Left = 818
|
||||
Bottom = 156
|
||||
Right = 988
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "PosizioneUdcCorrente"
|
||||
Begin Extent =
|
||||
Top = 71
|
||||
Left = 548
|
||||
Bottom = 200
|
||||
Right = 718
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "Blocchi"
|
||||
Begin Extent =
|
||||
Top = 70
|
||||
Left = 1080
|
||||
Bottom = 199
|
||||
Right = 1250
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "AnagMag"
|
||||
Begin Extent =
|
||||
Top = 188
|
||||
Left = 799
|
||||
Bottom = 334
|
||||
Right = 969
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 22
|
||||
Width = 284
|
||||
Width = 15', 'SCHEMA', 'dbo', 'VIEW', 'v_UdcDetail'
|
||||
go
|
||||
|
||||
exec sp_updateextendedproperty 'MS_DiagramPane2', '00
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
End
|
||||
End
|
||||
Begin CriteriaPane =
|
||||
Begin ColumnWidths = 11
|
||||
Column = 1440
|
||||
Alias = 900
|
||||
Table = 1170
|
||||
Output = 720
|
||||
Append = 1400
|
||||
NewValue = 1170
|
||||
SortType = 1350
|
||||
SortOrder = 1410
|
||||
GroupBy = 1350
|
||||
Filter = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
End
|
||||
End
|
||||
End
|
||||
', 'SCHEMA', 'dbo', 'VIEW', 'v_UdcDetail'
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(259, GETDATE())
|
||||
GO
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,435 @@
|
||||
-- update
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* function dateToAsFormat
|
||||
*
|
||||
* converte le date da DATETIME al formato AS 8 cifre AAAAMMGG
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.29
|
||||
*
|
||||
****************************************/
|
||||
create FUNCTION dateToAsFormat
|
||||
(
|
||||
@data DATETIME
|
||||
)
|
||||
RETURNS NVARCHAR(8)
|
||||
AS
|
||||
BEGIN
|
||||
RETURN CONVERT(NVARCHAR(8), @data, 112)
|
||||
END
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table PosizioneUdcStorico drop
|
||||
constraint FK_PosizioneUdcStorico_ElencoCartellini
|
||||
go
|
||||
|
||||
exec sp_rename 'PK_PosizioneUdcStorico_1', 'tmp__PK_PosizioneUdcStorico_1', 'OBJECT'
|
||||
go
|
||||
|
||||
exec sp_rename 'PosizioneUdcStorico', 'tmp__PosizioneUdcStorico_0', 'OBJECT'
|
||||
go
|
||||
|
||||
create table PosizioneUdcStorico(
|
||||
UDC nvarchar(50) not null,
|
||||
IdxCella int not null,
|
||||
DataInizio datetime not null,
|
||||
CodCS nchar(2) not null,
|
||||
DataFine datetime,
|
||||
|
||||
constraint PK_PosizioneUdcStorico_1 primary key(UDC,IdxCella,DataInizio)
|
||||
)
|
||||
go
|
||||
|
||||
alter table PosizioneUdcStorico add
|
||||
constraint FK_PosizioneUdcStorico_ElencoCartellini foreign key(UDC) references ElencoCartellini(UDC) on update cascade
|
||||
go
|
||||
|
||||
insert into PosizioneUdcStorico(UDC,IdxCella,DataInizio,CodCS,DataFine) select UDC,IdxCella,DataInizio,CodCS,DataFine from tmp__PosizioneUdcStorico_0
|
||||
go
|
||||
|
||||
drop table tmp__PosizioneUdcStorico_0
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
create index [<Name of Missing Index, sysname,>] on RilPro.RapQual(DataRapQual)
|
||||
include(nRapQual,CodFor,CodLega,Qta,BenesQual,UDC)
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
create VIEW v_RapQualSunto
|
||||
AS
|
||||
SELECT TOP (100) PERCENT CAST(nRapQual AS NVARCHAR(20)) AS nRapQual, DataRapQual, CodFor, CodLega, SUM(Qta) AS Qta, BenesQual, COUNT(*) AS UdcTot,
|
||||
COUNT(UDC) AS UdcAssoc
|
||||
FROM RilPro.RapQual
|
||||
GROUP BY nRapQual, DataRapQual, CodFor, CodLega, BenesQual
|
||||
ORDER BY nRapQual
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "RapQual (RilPro)"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 38
|
||||
Bottom = 314
|
||||
Right = 208
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 9
|
||||
Width = 284
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
End
|
||||
End
|
||||
Begin CriteriaPane =
|
||||
Begin ColumnWidths = 12
|
||||
Column = 1440
|
||||
Alias = 1305
|
||||
Table = 1170
|
||||
Output = 720
|
||||
Append = 1400
|
||||
NewValue = 1170
|
||||
SortType = 1350
|
||||
SortOrder = 1410
|
||||
GroupBy = 1350
|
||||
Filter = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
End
|
||||
End
|
||||
End
|
||||
', 'SCHEMA', 'dbo', 'VIEW', 'v_RapQualSunto'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPaneCount', 1, 'SCHEMA', 'dbo', 'VIEW', 'v_RapQualSunto'
|
||||
go
|
||||
|
||||
alter VIEW v_selMagLogico
|
||||
AS
|
||||
SELECT DISTINCT TOP (100) PERCENT CAST(IdxPosizione AS NVARCHAR(20)) AS value, 'Mag. ' + CAST(IdxPosizione AS NVARCHAR(20)) AS label, CodCS AS conditio
|
||||
FROM dbo.ElencoCartellini
|
||||
WHERE (IdxPosizione > 0)
|
||||
ORDER BY label
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_batch_RapQual_S01
|
||||
*
|
||||
* Esegue lo step 1 (caricamento dati RAW da AS400) per la tab dei rapporti di qualità
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.23
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE BatchQueue.stp_batch_RapQual_S01
|
||||
(
|
||||
@minData DATETIME
|
||||
)
|
||||
AS
|
||||
-- BOZZA DA COMPLETARE A CURA MAZZUCCONI!!!
|
||||
|
||||
DECLARE @SQL AS NVARCHAR(1000)
|
||||
DECLARE @dataAs400 AS VARCHAR(8)
|
||||
|
||||
SET @dataAs400 = (SELECT dbo.dateToAsFormat(@minData))
|
||||
|
||||
-- svuoto tab raw attuale
|
||||
/*
|
||||
DELETE FROM RawData.XOGIX00F
|
||||
*/
|
||||
|
||||
|
||||
-- INSERISCO DA AS400
|
||||
/*
|
||||
INSERT INTO RawData.XOGIX00F
|
||||
(
|
||||
SET @SQL =
|
||||
N'SELECT
|
||||
XRPQLN
|
||||
,XRPQLD
|
||||
,XNRETI
|
||||
,XCDFOR
|
||||
,XCDTER
|
||||
,XCDPAR
|
||||
,XDTPRO
|
||||
,XTRPRO
|
||||
,XQTPRO
|
||||
,XDESMT
|
||||
,XMATSC
|
||||
,XBENQL
|
||||
FROM OPENQUERY( P65220DC, ''SELECT * FROM MAZZT_DTV3.XOGIX00F WHERE XRPQLD >= '
|
||||
SET @SQL = @SQL + @dataAs400 + ''' )'
|
||||
|
||||
EXEC dbo.sp_executesql @SQL
|
||||
)
|
||||
*/
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_rappQualSuntoGetByDataRange
|
||||
*
|
||||
* Ottiene l'elenco dei record di rapp qualità di AS dato il range delle date
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.29
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_rappQualSuntoGetByDataRange
|
||||
(
|
||||
@dataFrom DATETIME,
|
||||
@dataTo DATETIME
|
||||
)
|
||||
AS
|
||||
-- restituisce le righe richieste
|
||||
SELECT *
|
||||
FROM v_RapQualSunto
|
||||
WHERE (DataRapQual > dbo.dateToAsFormat(@dataFrom)) AND (DataRapQual < dbo.dateToAsFormat(@dataTo))
|
||||
ORDER BY nRapQual
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_rappQualSuntoGetByNumRap
|
||||
*
|
||||
* Ottiene il record di rapp qualità di AS dato il numero del rapporto di qualità
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.29
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_rappQualSuntoGetByNumRap
|
||||
(
|
||||
@nRapQual NVARCHAR(20)
|
||||
)
|
||||
AS
|
||||
-- restituisce le righe richieste
|
||||
SELECT *
|
||||
FROM v_RapQualSunto
|
||||
WHERE (nRapQual = @nRapQual)
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_spostaUdc
|
||||
*
|
||||
* sposta un UDC, salvandone la posizione precedente (se esiste) nella tab storica
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.11
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_spostaUdc
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@UDC VARCHAR(50),
|
||||
@IdxCellaTo INT
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN TRAN
|
||||
|
||||
-- DICHIARAZIONI iniziali variabili
|
||||
DECLARE @IdxCellaFrom INT
|
||||
DECLARE @capienza INT
|
||||
DECLARE @numUdc INT
|
||||
|
||||
-- controllo cella di partenza
|
||||
SET @IdxCellaFrom = (SELECT IdxCella FROM PosizioneUdcCorrente WHERE UDC = @UDC)
|
||||
-- controllo se la cella di dest vada indicata come piena
|
||||
SET @capienza = (
|
||||
SELECT tc.Capienza
|
||||
FROM TipoCella TC INNER JOIN Celle c ON TC.IdxTipoCella=c.IdxTipoCella
|
||||
WHERE c.IdxCella = @IdxCellaFrom
|
||||
)
|
||||
SET @numUdc = (SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE IdxCella = @IdxCellaFrom)
|
||||
-- se capienza raggiunta aggiorno...
|
||||
IF(@numUdc -1 < @capienza)
|
||||
BEGIN
|
||||
EXEC stp_celle_updPiena @IdxCellaFrom, 0
|
||||
END
|
||||
|
||||
-- cancello posizione occupata
|
||||
DELETE
|
||||
FROM PosizioneUdcCorrente
|
||||
WHERE UDC = @UDC
|
||||
|
||||
-- creo una nuova posizione per l'UDC
|
||||
INSERT INTO PosizioneUdcCorrente(UDC, IdxCella, CodCS, DataRif)
|
||||
VALUES(@UDC, @IdxCellaTo, @CodCS, GETDATE())
|
||||
|
||||
-- controllo se la cella di dest vada indicata come piena
|
||||
SET @capienza = (
|
||||
SELECT tc.Capienza
|
||||
FROM TipoCella TC INNER JOIN Celle c ON TC.IdxTipoCella=c.IdxTipoCella
|
||||
WHERE c.IdxCella = @IdxCellaTo
|
||||
)
|
||||
SET @numUdc = (SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE IdxCella = @IdxCellaTo)
|
||||
-- se capienza raggiunta aggiorno...
|
||||
IF(@numUdc >= @capienza)
|
||||
BEGIN
|
||||
EXEC stp_celle_updPiena @IdxCellaTo, 1
|
||||
END
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(265, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,425 @@
|
||||
-- svuoto tab x procedere...
|
||||
delete from AS400_BatchMovimenti
|
||||
GO
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table AS400_BatchMovimenti drop
|
||||
constraint FK_AS400_BatchMovimenti_AS400_MagCont ,
|
||||
constraint FK_AS400_BatchMovimenti_AnagTipoEvento
|
||||
go
|
||||
|
||||
exec sp_rename 'PK_AS400_BatchMovimenti', 'tmp__PK_AS400_BatchMovimenti', 'OBJECT'
|
||||
go
|
||||
|
||||
exec sp_rename 'AS400_BatchMovimenti', 'tmp__AS400_BatchMovimenti_1', 'OBJECT'
|
||||
go
|
||||
|
||||
create table AS400_BatchMovimenti(
|
||||
DataIns datetime not null,
|
||||
CodEvento nvarchar(10) not null,
|
||||
Particolare nvarchar(15) not null,
|
||||
UDC nvarchar(50) not null,
|
||||
CodMagAS nvarchar(50) not null,
|
||||
Quantita decimal(10,2) not null,
|
||||
DataBatch datetime,
|
||||
DataVerifica datetime,
|
||||
|
||||
constraint PK_AS400_BatchMovimenti primary key(DataIns,CodEvento,Particolare,UDC,CodMagAS)
|
||||
)
|
||||
go
|
||||
|
||||
alter table AS400_BatchMovimenti add
|
||||
constraint FK_AS400_BatchMovimenti_AnagTipoEvento foreign key(CodEvento) references AnagTipoEvento(CodEvento) on update cascade,
|
||||
constraint FK_AS400_BatchMovimenti_AS400_MagCont foreign key(CodMagAS) references AS400_MagCont(CodMagAS) on update cascade
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'dataora inserimento in coda caricamento', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataIns'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'NON MODIFICARE: nel codice si usano questi campi x chiamate...', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'CodEvento'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'dataora di caricamento batch verso AS', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataBatch'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', N'dataora in cui è stato verificato il caricamento su AS', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataVerifica'
|
||||
go
|
||||
|
||||
insert into AS400_BatchMovimenti(DataIns,CodEvento,Particolare,UDC,CodMagAS,Quantita,DataBatch,DataVerifica) select DataIns,CodEvento,Particolare,N'',CodMagAS,Quantita,DataBatch,DataVerifica from tmp__AS400_BatchMovimenti_1
|
||||
go
|
||||
|
||||
drop table tmp__AS400_BatchMovimenti_1
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-09-20
|
||||
-- Description: trigger x inserimento movimenti
|
||||
-- nella coda di trasferimento batch
|
||||
-- verso AS400 x UPDATE UDC
|
||||
-- =============================================
|
||||
alter TRIGGER trg_updMovAS
|
||||
ON ElencoCartellini
|
||||
AFTER UPDATE
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- setup variabili e verbosità
|
||||
SET NOCOUNT ON;
|
||||
DECLARE @partOk AS BIT
|
||||
DECLARE @IdxPosFrom AS INT
|
||||
DECLARE @IdxPosTo AS INT
|
||||
DECLARE @magFrom AS NVARCHAR(50)
|
||||
DECLARE @magTo AS NVARCHAR(50)
|
||||
DECLARE @qta AS DECIMAL(10,2)
|
||||
|
||||
-- controllo che CI SIA il particolare (altrimenti non eseguo)
|
||||
SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM deleted)
|
||||
|
||||
IF(@partOk = 1)
|
||||
SET @qta = (SELECT Qta FROM inserted)
|
||||
-- se c'è stata modifica di quantità inizio a rettificare quella
|
||||
IF UPDATE(Qta)
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOD', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), @qta-Qta
|
||||
FROM deleted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
|
||||
-- controllo poi se sia cambiato il magazzino, altrimenti non lo inserisco
|
||||
IF UPDATE(IdxPosizione)
|
||||
BEGIN
|
||||
-- Prendo le posizioni di magazzino precedente e nuova
|
||||
SET @IdxPosFrom = (SELECT IdxPosizione FROM deleted)
|
||||
SET @IdxPosTo = (SELECT IdxPosizione FROM inserted)
|
||||
-- Le trasformo nelle equivalenti stringhe del codMag SE attive
|
||||
SET @magFrom = (SELECT ISNULL(CodMagAS,'---') FROM AS400_MagCont WHERE Attivo = 1 AND CodMagAs = CAST(@IdxPosFrom AS NVARCHAR(50)))
|
||||
SET @magTo = (SELECT ISNULL(CodMagAS,'---') FROM AS400_MagCont WHERE Attivo = 1 AND CodMagAs = CAST(@IdxPosTo AS NVARCHAR(50)))
|
||||
|
||||
-- inserisco un movimento di deposito verso mag nuovo (SE attivo)
|
||||
IF (@magFrom <> '---')
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOV', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), -@qta
|
||||
FROM deleted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
-- inserisco un movimento di prelievo verso mag vecchio (SE attivo)
|
||||
IF (@magTo <> '---')
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOV', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), @qta
|
||||
FROM inserted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
END
|
||||
|
||||
END
|
||||
go
|
||||
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-09-20
|
||||
-- Description: trigger x inserimento movimenti
|
||||
-- nella coda di trasferimento batch
|
||||
-- verso AS400 x INSERT UDC
|
||||
-- =============================================
|
||||
alter TRIGGER trg_InsMovAS
|
||||
ON ElencoCartellini
|
||||
AFTER INSERT
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- setup variabili e verbosità
|
||||
SET NOCOUNT ON;
|
||||
DECLARE @partOk AS BIT
|
||||
|
||||
-- controllo che CI SIA il particoalre (altrimenti non eseguo)
|
||||
SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM inserted)
|
||||
|
||||
IF(@partOk = 1)
|
||||
BEGIN
|
||||
-- metto in storico la posizione attuale dell'UDC (SE esiste) CANCELLATO
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_NEW', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), Qta
|
||||
FROM inserted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
|
||||
END
|
||||
go
|
||||
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-09-20
|
||||
-- Description: trigger x inserimento movimenti
|
||||
-- nella coda di trasferimento batch
|
||||
-- verso AS400 x DELETE UDC
|
||||
-- =============================================
|
||||
alter TRIGGER trg_DelMovAS
|
||||
ON ElencoCartellini
|
||||
AFTER DELETE
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- setup variabili e verbosità
|
||||
SET NOCOUNT ON;
|
||||
-- inserisco movimenti AS
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_DEL', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), -Qta
|
||||
FROM deleted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1) AND ((CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END) = 1)
|
||||
)
|
||||
|
||||
END
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_batch_RapQual_S01
|
||||
*
|
||||
* Esegue lo step 1 (caricamento dati RAW da AS400) per la tab dei rapporti di qualità
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.23
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE BatchQueue.stp_batch_RapQual_S01
|
||||
(
|
||||
@minData DATETIME
|
||||
)
|
||||
AS
|
||||
-- BOZZA DA COMPLETARE A CURA MAZZUCCONI!!!
|
||||
|
||||
DECLARE @SQL AS NVARCHAR(1000)
|
||||
DECLARE @dataAs400 AS VARCHAR(8)
|
||||
|
||||
SET @dataAs400 = (SELECT dbo.dateToAsFormat(@minData))
|
||||
|
||||
-- svuoto tab raw attuale
|
||||
/*
|
||||
DELETE FROM RawData.XOGIX00F
|
||||
*/
|
||||
|
||||
|
||||
-- INSERISCO DA AS400
|
||||
/*
|
||||
INSERT INTO RawData.XOGIX00F
|
||||
(
|
||||
SET @SQL =
|
||||
N'SELECT
|
||||
XRPQLN
|
||||
,XRPQLD
|
||||
,XNRETI
|
||||
,XCDFOR
|
||||
,XCDTER
|
||||
,XCDPAR
|
||||
,XDTPRO
|
||||
,XTRPRO
|
||||
,XQTPRO
|
||||
,XDESMT
|
||||
,XMATSC
|
||||
,XBENQL
|
||||
FROM OPENQUERY( P65220DC, ''SELECT * FROM MAZZT_DTV3.XOGIX00F WHERE XRPQLD >= '
|
||||
SET @SQL = @SQL + @dataAs400 + ''' )'
|
||||
|
||||
EXEC dbo.sp_executesql @SQL
|
||||
)
|
||||
*/
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_rappQualSuntoGetByDataRange
|
||||
*
|
||||
* Ottiene l'elenco dei record di rapp qualità di AS dato il range delle date
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.29
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_rappQualSuntoGetByDataRange
|
||||
(
|
||||
@dataFrom DATETIME,
|
||||
@dataTo DATETIME
|
||||
)
|
||||
AS
|
||||
-- restituisce le righe richieste
|
||||
SELECT *
|
||||
FROM v_RapQualSunto
|
||||
WHERE (DataRapQual > dbo.dateToAsFormat(@dataFrom)) AND (DataRapQual < dbo.dateToAsFormat(@dataTo))
|
||||
ORDER BY nRapQual
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_rappQualSuntoGetByNumRap
|
||||
*
|
||||
* Ottiene il record di rapp qualità di AS dato il numero del rapporto di qualità
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.29
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_rappQualSuntoGetByNumRap
|
||||
(
|
||||
@nRapQual NVARCHAR(20)
|
||||
)
|
||||
AS
|
||||
-- restituisce le righe richieste
|
||||
SELECT *
|
||||
FROM v_RapQualSunto
|
||||
WHERE (nRapQual = @nRapQual)
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_spostaUdc
|
||||
*
|
||||
* sposta un UDC, salvandone la posizione precedente (se esiste) nella tab storica
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.11
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_spostaUdc
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@UDC VARCHAR(50),
|
||||
@IdxCellaTo INT
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN TRAN
|
||||
|
||||
-- DICHIARAZIONI iniziali variabili
|
||||
DECLARE @IdxCellaFrom INT
|
||||
DECLARE @capienza INT
|
||||
DECLARE @numUdc INT
|
||||
|
||||
-- controllo cella di partenza
|
||||
SET @IdxCellaFrom = (SELECT IdxCella FROM PosizioneUdcCorrente WHERE UDC = @UDC)
|
||||
-- controllo se la cella di dest vada indicata come piena
|
||||
SET @capienza = (
|
||||
SELECT tc.Capienza
|
||||
FROM TipoCella TC INNER JOIN Celle c ON TC.IdxTipoCella=c.IdxTipoCella
|
||||
WHERE c.IdxCella = @IdxCellaFrom
|
||||
)
|
||||
SET @numUdc = (SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE IdxCella = @IdxCellaFrom)
|
||||
-- se capienza raggiunta aggiorno...
|
||||
IF(@numUdc -1 < @capienza)
|
||||
BEGIN
|
||||
EXEC stp_celle_updPiena @IdxCellaFrom, 0
|
||||
END
|
||||
|
||||
-- cancello posizione occupata
|
||||
DELETE
|
||||
FROM PosizioneUdcCorrente
|
||||
WHERE UDC = @UDC
|
||||
|
||||
-- creo una nuova posizione per l'UDC
|
||||
INSERT INTO PosizioneUdcCorrente(UDC, IdxCella, CodCS, DataRif)
|
||||
VALUES(@UDC, @IdxCellaTo, @CodCS, GETDATE())
|
||||
|
||||
-- controllo se la cella di dest vada indicata come piena
|
||||
SET @capienza = (
|
||||
SELECT tc.Capienza
|
||||
FROM TipoCella TC INNER JOIN Celle c ON TC.IdxTipoCella=c.IdxTipoCella
|
||||
WHERE c.IdxCella = @IdxCellaTo
|
||||
)
|
||||
SET @numUdc = (SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE IdxCella = @IdxCellaTo)
|
||||
-- se capienza raggiunta aggiorno...
|
||||
IF(@numUdc >= @capienza)
|
||||
BEGIN
|
||||
EXEC stp_celle_updPiena @IdxCellaTo, 1
|
||||
END
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(270, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,443 @@
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
drop index [<Name of Missing Index, sysname,>] on RilPro.RapQual
|
||||
go
|
||||
|
||||
alter table RilPro.RapQual alter column
|
||||
UDC nvarchar(50)
|
||||
go
|
||||
|
||||
create index [<Name of Missing Index, sysname,>] on RilPro.RapQual(DataRapQual)
|
||||
include(nRapQual,CodFor,CodLega,Qta,BenesQual,UDC)
|
||||
go
|
||||
|
||||
create index i_dataPrelievo on RilPro.RapQual(DataPrelFus)
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_prtCartMatPrimaByUDC
|
||||
*
|
||||
* ottiene il record del Cartellino Materia Prima dato l'UDC richiesto x la sstampa
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_prtCartMatPrimaByUDC
|
||||
(
|
||||
@UDC VARCHAR(50)
|
||||
)
|
||||
AS
|
||||
SELECT
|
||||
RQ.nRapQual,
|
||||
RQ.DataRapQual,
|
||||
RQ.ProgUDC,
|
||||
RQ.CodFor,
|
||||
RQ.DestTerz,
|
||||
RQ.CodLega,
|
||||
RQ.DataPrelFus,
|
||||
RQ.TurnoPrelFus,
|
||||
RQ.Qta,
|
||||
RQ.DestLega,
|
||||
RQ.LegaScaric,
|
||||
RQ.BenesQual,
|
||||
RQ.UDC,
|
||||
Fo.DescFornitore,
|
||||
Fo.DescFornitore2,
|
||||
Le.CodLega AS CodLega2,
|
||||
Le.DescLega,
|
||||
Le.DescLega2
|
||||
FROM GMW.RilPro.RapQual AS RQ
|
||||
INNER JOIN ReportAs400.RilPro.AnagFornitori AS Fo
|
||||
ON RQ.CodFor = Fo.CodFornitore
|
||||
INNER JOIN ReportAs400.RilPro.AnagLeghe Le
|
||||
ON RQ.CodLega = 'L' + Le.CodLega
|
||||
WHERE RQ.UDC = RTRIM(@UDC) -- 'UB31000000001'
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_rappQualConsumabili
|
||||
*
|
||||
* Ottiene l'elenco dei record di rapp qualità (e quindi degli UDC) di AS non ancora consumati per range di data di approvazione
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.05
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_rappQualConsumabili
|
||||
(
|
||||
@dataFrom DATETIME,
|
||||
@dataTo DATETIME
|
||||
)
|
||||
|
||||
AS
|
||||
-- restituisce le righe richieste
|
||||
SELECT *
|
||||
FROM RilPro.RapQual
|
||||
WHERE ((DataPrelFus IS NULL) OR (DataPrelFus = 0)) AND -- condizione sul NON aver fatto ancora il prelievo
|
||||
((DataRapQual > dbo.dateToAsFormat(@dataFrom)) AND (DataRapQual < dbo.dateToAsFormat(@dataTo))) -- cond data RQ
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_rappQualSuntoGetByDataRange
|
||||
*
|
||||
* Ottiene l'elenco dei record di rapp qualità di AS dato il range delle date
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.29
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_rappQualSuntoGetByDataRange
|
||||
(
|
||||
@dataFrom DATETIME,
|
||||
@dataTo DATETIME
|
||||
)
|
||||
AS
|
||||
-- restituisce le righe richieste
|
||||
SELECT *
|
||||
FROM v_RapQualSunto
|
||||
WHERE (DataRapQual > dbo.dateToAsFormat(@dataFrom)) AND (DataRapQual < dbo.dateToAsFormat(@dataTo))
|
||||
ORDER BY nRapQual
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_rappQualSuntoGetByNumRap
|
||||
*
|
||||
* Ottiene il record di rapp qualità di AS dato il numero del rapporto di qualità
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.29
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_rappQualSuntoGetByNumRap
|
||||
(
|
||||
@nRapQual NVARCHAR(20)
|
||||
)
|
||||
AS
|
||||
-- restituisce le righe richieste
|
||||
SELECT *
|
||||
FROM v_RapQualSunto
|
||||
WHERE (nRapQual = @nRapQual)
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_spostaUdc
|
||||
*
|
||||
* sposta un UDC, salvandone la posizione precedente (se esiste) nella tab storica
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.11
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_spostaUdc
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@UDC VARCHAR(50),
|
||||
@IdxCellaTo INT
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN TRAN
|
||||
|
||||
-- DICHIARAZIONI iniziali variabili
|
||||
DECLARE @IdxCellaFrom INT
|
||||
DECLARE @capienza INT
|
||||
DECLARE @numUdc INT
|
||||
|
||||
-- controllo cella di partenza
|
||||
SET @IdxCellaFrom = (SELECT IdxCella FROM PosizioneUdcCorrente WHERE UDC = @UDC)
|
||||
-- controllo se la cella di dest vada indicata come piena
|
||||
SET @capienza = (
|
||||
SELECT tc.Capienza
|
||||
FROM TipoCella TC INNER JOIN Celle c ON TC.IdxTipoCella=c.IdxTipoCella
|
||||
WHERE c.IdxCella = @IdxCellaFrom
|
||||
)
|
||||
SET @numUdc = (SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE IdxCella = @IdxCellaFrom)
|
||||
-- se capienza raggiunta aggiorno...
|
||||
IF(@numUdc -1 < @capienza)
|
||||
BEGIN
|
||||
EXEC stp_celle_updPiena @IdxCellaFrom, 0
|
||||
END
|
||||
|
||||
-- cancello posizione occupata
|
||||
DELETE
|
||||
FROM PosizioneUdcCorrente
|
||||
WHERE UDC = @UDC
|
||||
|
||||
-- creo una nuova posizione per l'UDC
|
||||
INSERT INTO PosizioneUdcCorrente(UDC, IdxCella, CodCS, DataRif)
|
||||
VALUES(@UDC, @IdxCellaTo, @CodCS, GETDATE())
|
||||
|
||||
-- controllo se la cella di dest vada indicata come piena
|
||||
SET @capienza = (
|
||||
SELECT tc.Capienza
|
||||
FROM TipoCella TC INNER JOIN Celle c ON TC.IdxTipoCella=c.IdxTipoCella
|
||||
WHERE c.IdxCella = @IdxCellaTo
|
||||
)
|
||||
SET @numUdc = (SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE IdxCella = @IdxCellaTo)
|
||||
-- se capienza raggiunta aggiorno...
|
||||
IF(@numUdc >= @capienza)
|
||||
BEGIN
|
||||
EXEC stp_celle_updPiena @IdxCellaTo, 1
|
||||
END
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_batch_RapQual_S01
|
||||
*
|
||||
* Esegue lo step 1 (caricamento dati RAW da AS400) per la tab dei rapporti di qualità
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.23
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE BatchQueue.stp_batch_RapQual_S01
|
||||
(
|
||||
@minData DATETIME
|
||||
)
|
||||
AS
|
||||
-- BOZZA DA COMPLETARE A CURA MAZZUCCONI!!!
|
||||
|
||||
DECLARE @SQL AS NVARCHAR(1000)
|
||||
DECLARE @dataAs400 AS VARCHAR(8)
|
||||
|
||||
SET @dataAs400 = (SELECT dbo.dateToAsFormat(@minData))
|
||||
|
||||
-- svuoto tab raw attuale
|
||||
/*
|
||||
DELETE FROM RawData.XOGIX00F
|
||||
*/
|
||||
|
||||
|
||||
-- INSERISCO DA AS400
|
||||
/*
|
||||
INSERT INTO RawData.XOGIX00F
|
||||
(
|
||||
SET @SQL =
|
||||
N'SELECT
|
||||
XRPQLN
|
||||
,XRPQLD
|
||||
,XNRETI
|
||||
,XCDFOR
|
||||
,XCDTER
|
||||
,XCDPAR
|
||||
,XDTPRO
|
||||
,XTRPRO
|
||||
,XQTPRO
|
||||
,XDESMT
|
||||
,XMATSC
|
||||
,XBENQL
|
||||
FROM OPENQUERY( P65220DC, ''SELECT * FROM MAZZT_DTV3.XOGIX00F WHERE XRPQLD >= '
|
||||
SET @SQL = @SQL + @dataAs400 + ''' )'
|
||||
|
||||
EXEC dbo.sp_executesql @SQL
|
||||
)
|
||||
*/
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
create table RilPro.AnagFornitori(
|
||||
CodFornitore nvarchar(6) not null constraint PK_AnagFornitori primary key,
|
||||
DescFornitore nvarchar(35),
|
||||
DescFornitore2 nvarchar(35)
|
||||
)
|
||||
go
|
||||
|
||||
create table RilPro.AnagLeghe(
|
||||
CodLega nvarchar(12) not null constraint PK_AnagLeghe primary key,
|
||||
CodLega2 nvarchar(12),
|
||||
DescLega nvarchar(25),
|
||||
DescLega2 nvarchar(25)
|
||||
)
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table AS400_BatchMovimenti drop
|
||||
constraint FK_AS400_BatchMovimenti_AS400_MagCont ,
|
||||
constraint FK_AS400_BatchMovimenti_AnagTipoEvento
|
||||
go
|
||||
|
||||
exec sp_rename 'PK_AS400_BatchMovimenti', 'tmp__PK_AS400_BatchMovimenti', 'OBJECT'
|
||||
go
|
||||
|
||||
exec sp_rename 'AS400_BatchMovimenti', 'tmp__AS400_BatchMovimenti_0', 'OBJECT'
|
||||
go
|
||||
|
||||
create table AS400_BatchMovimenti(
|
||||
DataIns datetime not null,
|
||||
CodEvento nvarchar(10) not null,
|
||||
Particolare nvarchar(15) not null,
|
||||
UDC nvarchar(50) not null,
|
||||
CodMagAS nvarchar(50) not null,
|
||||
Quantita decimal(10,2) not null,
|
||||
DataBatch datetime,
|
||||
DataVerifica datetime,
|
||||
|
||||
constraint PK_AS400_BatchMovimenti primary key(DataIns,CodEvento,Particolare,UDC,CodMagAS)
|
||||
)
|
||||
go
|
||||
|
||||
alter table AS400_BatchMovimenti add
|
||||
constraint FK_AS400_BatchMovimenti_AnagTipoEvento foreign key(CodEvento) references AnagTipoEvento(CodEvento) on update cascade,
|
||||
constraint FK_AS400_BatchMovimenti_AS400_MagCont foreign key(CodMagAS) references AS400_MagCont(CodMagAS) on update cascade
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'dataora inserimento in coda caricamento', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataIns'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'NON MODIFICARE: nel codice si usano questi campi x chiamate...', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'CodEvento'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'dataora di caricamento batch verso AS', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataBatch'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', N'dataora in cui è stato verificato il caricamento su AS', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataVerifica'
|
||||
go
|
||||
|
||||
insert into AS400_BatchMovimenti(DataIns,CodEvento,Particolare,UDC,CodMagAS,Quantita,DataBatch,DataVerifica) select DataIns,CodEvento,Particolare,N'',CodMagAS,Quantita,DataBatch,DataVerifica from tmp__AS400_BatchMovimenti_0
|
||||
go
|
||||
|
||||
drop table tmp__AS400_BatchMovimenti_0
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table AS400_BatchMovimenti drop
|
||||
constraint FK_AS400_BatchMovimenti_AS400_MagCont ,
|
||||
constraint FK_AS400_BatchMovimenti_AnagTipoEvento
|
||||
go
|
||||
|
||||
exec sp_rename 'PK_AS400_BatchMovimenti', 'tmp__PK_AS400_BatchMovimenti', 'OBJECT'
|
||||
go
|
||||
|
||||
exec sp_rename 'AS400_BatchMovimenti', 'tmp__AS400_BatchMovimenti_0', 'OBJECT'
|
||||
go
|
||||
|
||||
create table AS400_BatchMovimenti(
|
||||
DataIns datetime not null,
|
||||
CodEvento nvarchar(10) not null,
|
||||
Particolare nvarchar(15) not null,
|
||||
UDC nvarchar(50) not null,
|
||||
CodMagAS nvarchar(50) not null,
|
||||
Quantita decimal(10,2) not null,
|
||||
DataBatch datetime,
|
||||
DataVerifica datetime,
|
||||
|
||||
constraint PK_AS400_BatchMovimenti primary key(DataIns,CodEvento,Particolare,UDC,CodMagAS)
|
||||
)
|
||||
go
|
||||
|
||||
alter table AS400_BatchMovimenti add
|
||||
constraint FK_AS400_BatchMovimenti_AnagTipoEvento foreign key(CodEvento) references AnagTipoEvento(CodEvento) on update cascade,
|
||||
constraint FK_AS400_BatchMovimenti_AS400_MagCont foreign key(CodMagAS) references AS400_MagCont(CodMagAS) on update cascade
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'dataora inserimento in coda caricamento', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataIns'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'NON MODIFICARE: nel codice si usano questi campi x chiamate...', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'CodEvento'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'dataora di caricamento batch verso AS', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataBatch'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', N'dataora in cui è stato verificato il caricamento su AS', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataVerifica'
|
||||
go
|
||||
|
||||
insert into AS400_BatchMovimenti(DataIns,CodEvento,Particolare,UDC,CodMagAS,Quantita,DataBatch,DataVerifica) select DataIns,CodEvento,Particolare,N'',CodMagAS,Quantita,DataBatch,DataVerifica from tmp__AS400_BatchMovimenti_0
|
||||
go
|
||||
|
||||
drop table tmp__AS400_BatchMovimenti_0
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(275, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,268 @@
|
||||
create table AS400_BatchConsumoMP(
|
||||
ProgUDC char(10) not null constraint PK_AS400_BatchPrelievoMP primary key,
|
||||
UDC nvarchar(50) not null,
|
||||
DataPrelFus numeric(8,0) not null,
|
||||
TurnoPrelFus char(5) not null,
|
||||
DestLega char(3),
|
||||
DestTerz char(6),
|
||||
DataInvioAs datetime
|
||||
)
|
||||
go
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-09-20
|
||||
-- Description: trigger x inserimento movimenti
|
||||
-- nella coda di trasferimento batch
|
||||
-- verso AS400 x UPDATE UDC
|
||||
-- =============================================
|
||||
alter TRIGGER trg_updMovAS
|
||||
ON ElencoCartellini
|
||||
AFTER UPDATE
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- setup variabili e verbosità
|
||||
SET NOCOUNT ON;
|
||||
DECLARE @partOk AS BIT
|
||||
DECLARE @IdxPosFrom AS INT
|
||||
DECLARE @IdxPosTo AS INT
|
||||
DECLARE @magFrom AS NVARCHAR(50)
|
||||
DECLARE @magTo AS NVARCHAR(50)
|
||||
DECLARE @qta AS DECIMAL(10,2)
|
||||
DECLARE @qtaOld AS DECIMAL(10,2)
|
||||
|
||||
-- controllo che CI SIA il particolare (altrimenti non eseguo)
|
||||
SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM deleted)
|
||||
|
||||
IF(@partOk = 1)
|
||||
SET @qta = (SELECT Qta FROM inserted)
|
||||
SET @qtaOld = (SELECT Qta FROM deleted)
|
||||
-- se c'è stata modifica di quantità inizio a rettificare quella
|
||||
IF (UPDATE(Qta)) AND(@qta <> @qtaOld)
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOD', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), @qta-Qta
|
||||
FROM deleted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
|
||||
-- controllo poi se sia cambiato il magazzino, altrimenti non lo inserisco
|
||||
IF UPDATE(IdxPosizione)
|
||||
BEGIN
|
||||
-- Prendo le posizioni di magazzino precedente e nuova
|
||||
SET @IdxPosFrom = (SELECT IdxPosizione FROM deleted)
|
||||
SET @IdxPosTo = (SELECT IdxPosizione FROM inserted)
|
||||
-- Le trasformo nelle equivalenti stringhe del codMag SE attive
|
||||
SET @magFrom = (SELECT ISNULL(CodMagAS,'---') FROM AS400_MagCont WHERE Attivo = 1 AND CodMagAs = CAST(@IdxPosFrom AS NVARCHAR(50)))
|
||||
SET @magTo = (SELECT ISNULL(CodMagAS,'---') FROM AS400_MagCont WHERE Attivo = 1 AND CodMagAs = CAST(@IdxPosTo AS NVARCHAR(50)))
|
||||
|
||||
-- inserisco un movimento di deposito verso mag nuovo (SE attivo)
|
||||
IF (@magFrom <> '---')
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOV', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), -@qta
|
||||
FROM deleted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
-- inserisco un movimento di prelievo verso mag vecchio (SE attivo)
|
||||
IF (@magTo <> '---')
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOV', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), @qta
|
||||
FROM inserted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
END
|
||||
|
||||
END
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
create index i_update on As400.t_CQNOC98L(NumDocRNC,TipoInterv,CodArticolo,MatrPezzo)
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
create index i_update on As400.t_MOMA200F(NumSessione,NumMovimento)
|
||||
go
|
||||
|
||||
create index i_update on As400.t_MWMV200F(NomeUtente,CodCausale,CodParticolare,CodMagazzino,QtaMovimento,DataMovimento)
|
||||
go
|
||||
|
||||
create index i_update on As400.t_PACKL00F(CodStabilimento,ProgUDC,CodParticolare,CodContenitore,MatrContenitore)
|
||||
go
|
||||
|
||||
alter table As400.t_XOGIX00F add
|
||||
XRPQLN numeric(6,0) not null constraint DFX_03434E4C default(0),
|
||||
XRPQLD numeric(8,0) not null constraint DFX_03452060 default(0),
|
||||
XNRETI char(10) not null constraint DFX_03434DA4 default(''),
|
||||
XCDFOR char(6) not null constraint DFX_03463944 default(''),
|
||||
XCDTER char(6) not null constraint DFX_03460E6C default(''),
|
||||
XCDPAR char(15) not null constraint DFX_0345A2BC default(''),
|
||||
XDTPRO numeric(8,0) not null constraint DFX_0345CC28 default(0),
|
||||
XTRPRO char(5) not null constraint DFX_03434DDC default(''),
|
||||
XQTPRO numeric(5,0) not null constraint DFX_034583E0 default(0),
|
||||
XDESMT char(3) not null constraint DFX_037522B8 default(''),
|
||||
XMATSC char(1) not null constraint DFX_03453C08 default(''),
|
||||
XBENQL char(1) not null constraint DFX_03E1D3BC default('')
|
||||
go
|
||||
|
||||
alter table As400.t_XOGIX00F drop
|
||||
column nRapQual,
|
||||
column DataRapQual,
|
||||
column ProgUDC,
|
||||
column CodFor,
|
||||
column DestTerz,
|
||||
column CodLega,
|
||||
column DataPrelFus,
|
||||
column TurnoPrelFus,
|
||||
column Qta,
|
||||
column DestLega,
|
||||
column LegaScaric,
|
||||
column BenesQual
|
||||
go
|
||||
|
||||
create index i_update on As400.t_XOGIX00F(XRPQLN,XRPQLD,XNRETI)
|
||||
go
|
||||
|
||||
alter table As400.t_XOGIX00F drop
|
||||
constraint DFX_03E1D3BC,
|
||||
constraint DFX_03453C08,
|
||||
constraint DFX_037522B8,
|
||||
constraint DFX_034583E0,
|
||||
constraint DFX_03434DDC,
|
||||
constraint DFX_0345CC28,
|
||||
constraint DFX_0345A2BC,
|
||||
constraint DFX_03460E6C,
|
||||
constraint DFX_03463944,
|
||||
constraint DFX_03434DA4,
|
||||
constraint DFX_03452060,
|
||||
constraint DFX_03434E4C
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_accodaConsumoUdcMP
|
||||
*
|
||||
* Accoda alla tab Batch il consumo di un UDC
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.10
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_accodaConsumoUdcMP
|
||||
(
|
||||
@UDC NVARCHAR(50),
|
||||
@DataPrelFus DATETIME,
|
||||
@TurnoPrelFus CHAR(5),
|
||||
@DestLega CHAR(3),
|
||||
@DestTerz CHAR(3)
|
||||
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN TRAN
|
||||
|
||||
-- registro movimento da riconciliare
|
||||
INSERT INTO AS400_BatchConsumoMP(ProgUDC, UDC, DataPrelFus, TurnoPrelFus, DestLega, DestTerz)
|
||||
SELECT ProgUdc, UDC, dbo.dateToAsFormat(@DataPrelFus), @TurnoPrelFus, @DestLega, @DestTerz FROM RilPro.RapQual WHERE UDC = @UDC
|
||||
|
||||
-- aggiorno con data e turno di prelievo su tab RilPro (locale)
|
||||
UPDATE RilPro.RapQual
|
||||
SET DataPrelFus = dbo.dateToAsFormat(@DataPrelFus), TurnoPrelFus = @TurnoPrelFus
|
||||
WHERE UDC = @UDC
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_rappQualConsumabili
|
||||
*
|
||||
* Ottiene l'elenco dei record di rapp qualità (e quindi degli UDC) di AS non ancora consumati per range di data di approvazione
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.05
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_rappQualConsumabili
|
||||
(
|
||||
@dataFrom DATETIME,
|
||||
@dataTo DATETIME
|
||||
)
|
||||
|
||||
AS
|
||||
-- restituisce le righe richieste
|
||||
SELECT *
|
||||
FROM RilPro.RapQual
|
||||
WHERE ((DataPrelFus IS NULL) OR (DataPrelFus = 0)) AND -- condizione sul NON aver fatto ancora il prelievo
|
||||
((DataRapQual > dbo.dateToAsFormat(@dataFrom)) AND (DataRapQual < dbo.dateToAsFormat(@dataTo))) -- cond data RQ
|
||||
AND (ISNULL(UDC,'') <>'') -- non nullo UDC, quindi stampati...
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(276, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,253 @@
|
||||
create index i_UDC on AS400_BatchConsumoMP(UDC)
|
||||
go
|
||||
|
||||
|
||||
create index i_UDC on RilPro.RapQual(UDC)
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_consumaMP
|
||||
*
|
||||
* Salva il movimento di consumo dell'UDC di MP indicato
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.12
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE BatchQueue.stp_consumaMP
|
||||
(
|
||||
@XRPQLN INT, --è il num rap qualità
|
||||
@XNRETI NVARCHAR(10), -- è il numUdc prog
|
||||
@XDTPRO INT, -- data 8 cifre aaaammgg
|
||||
@XTRPRO NVARCHAR(5), -- turno
|
||||
@XDESMT NVARCHAR(3), -- destinatario int/terzista
|
||||
@XCDTER NVARCHAR(6) -- cod terzista
|
||||
)
|
||||
AS
|
||||
-- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!!
|
||||
|
||||
DECLARE @SQL AS NVARCHAR(1000)
|
||||
|
||||
-- Faccio chiamata su AS400
|
||||
|
||||
SET @SQL = N' OPENQUERY( P65220DC, ''UPDATE MAZZT_DTV3.XOGIX00F'
|
||||
SET @SQL = @SQL + 'SET XDTPRO = ' + @XDTPRO + ', XTRPRO = ' + @XTRPRO
|
||||
SET @SQL = @SQL + ', XDESMT = ''' + @XDESMT +''', XMATSC=''S'' , XCDTER = ''' + @XCDTER + ''' '
|
||||
SET @SQL = @SQL + 'WHERE XRPQLN =' + @XRPQLN + ' AND XNRETI = ' + @XNRETI + ''' )'
|
||||
|
||||
EXEC dbo.sp_executesql @SQL
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_processaCodaConsumoMP
|
||||
*
|
||||
* Processa la coda dei consumo di UDC di MP e chiaam procedura x salvataggio dato su AS400
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.12
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE BatchQueue.stp_processaCodaConsumoMP
|
||||
AS
|
||||
-- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!!
|
||||
|
||||
-- faccio una query con un cursore x processare tutte le righe da inviare ad AS400..
|
||||
DECLARE @UDC NVARCHAR(50)
|
||||
DECLARE @XRPQLN INT
|
||||
DECLARE @XNRETI NVARCHAR(10)
|
||||
DECLARE @XDTPRO INT
|
||||
DECLARE @XTRPRO NVARCHAR(5)
|
||||
DECLARE @XDESMT NVARCHAR(3)
|
||||
DECLARE @XCDTER NVARCHAR(6)
|
||||
|
||||
DECLARE @SqlCode NVARCHAR(1000)
|
||||
|
||||
DECLARE UdcMpList CURSOR FOR
|
||||
SELECT UDC FROM AS400_BatchConsumoMP WHERE DataInvioAs IS NULL
|
||||
OPEN UdcMpList
|
||||
FETCH NEXT FROM UdcMpList
|
||||
INTO @UDC
|
||||
WHILE @@FETCH_STATUS = 0
|
||||
BEGIN
|
||||
-- controllo ci sia la riga
|
||||
IF (SELECT COUNT(UDC) FROM AS400_BatchConsumoMP WHERE UDC=@UDC) > 0
|
||||
BEGIN
|
||||
-- carico valori che mi servono
|
||||
SELECT @XRPQLN=rq.nRapQual, @XNRETI=rq.ProgUDC, @XDTPRO=bcu.DataPrelFus, @XTRPRO=bcu.TurnoPrelFus,
|
||||
@XDESMT=bcu.DestLega, @XCDTER=bcu.DestTerz
|
||||
FROM AS400_BatchConsumoMP as bcu INNER JOIN RilPro.RapQual as rq ON bcu.UDC = rq.UDC
|
||||
WHERE bcu.UDC=@UDC
|
||||
-- compongo testo x exec
|
||||
SET @SqlCode = N'EXEC BatchQueue.stp_consumaMP ' + CAST(@XRPQLN AS NVARCHAR(50)) + ' ' + @XNRETI + ' ' + CAST(@XDTPRO AS NVARCHAR(8)) + ' ' + LTRIM(RTRIM(@XTRPRO)) + ' ' + LTRIM(RTRIM(@XDESMT)) + ' ' + LTRIM(RTRIM(@XCDTER))
|
||||
-- lo mostro
|
||||
print '%' + LTRIM(RTRIM(@SqlCode)) + '%'
|
||||
|
||||
-- chiamo la stored ed eseguo invio
|
||||
--EXEC dbo.sp_executesql @SqlCode -- decommentare se va bene...
|
||||
FETCH NEXT FROM UdcMpList INTO @UDC
|
||||
END
|
||||
END
|
||||
CLOSE UdcMpList
|
||||
DEALLOCATE UdcMpList
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_processaCodaConsumoMP
|
||||
*
|
||||
* Processa la coda dei consumo di UDC di MP e chiaam procedura x salvataggio dato su AS400
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.12
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE BatchQueue.stp_processaCodaConsumoMP
|
||||
AS
|
||||
-- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!!
|
||||
|
||||
-- faccio una query con un cursore x processare tutte le righe da inviare ad AS400..
|
||||
DECLARE @UDC NVARCHAR(50)
|
||||
DECLARE @XRPQLN INT
|
||||
DECLARE @XNRETI NVARCHAR(10)
|
||||
DECLARE @XDTPRO INT
|
||||
DECLARE @XTRPRO NVARCHAR(5)
|
||||
DECLARE @XDESMT NVARCHAR(3)
|
||||
DECLARE @XCDTER NVARCHAR(6)
|
||||
|
||||
DECLARE @SqlCode NVARCHAR(1000)
|
||||
|
||||
DECLARE UdcMpList CURSOR FOR
|
||||
SELECT UDC FROM AS400_BatchConsumoMP WHERE DataInvioAs IS NULL
|
||||
OPEN UdcMpList
|
||||
FETCH NEXT FROM UdcMpList
|
||||
INTO @UDC
|
||||
WHILE @@FETCH_STATUS = 0
|
||||
BEGIN
|
||||
-- controllo ci sia la riga
|
||||
IF (SELECT COUNT(UDC) FROM AS400_BatchConsumoMP WHERE UDC=@UDC) > 0
|
||||
BEGIN
|
||||
-- carico valori che mi servono
|
||||
SELECT @XRPQLN=rq.nRapQual, @XNRETI=rq.ProgUDC, @XDTPRO=bcu.DataPrelFus, @XTRPRO=bcu.TurnoPrelFus,
|
||||
@XDESMT=bcu.DestLega, @XCDTER=bcu.DestTerz
|
||||
FROM AS400_BatchConsumoMP as bcu INNER JOIN RilPro.RapQual as rq ON bcu.UDC = rq.UDC
|
||||
WHERE bcu.UDC=@UDC
|
||||
-- compongo testo x exec
|
||||
SET @SqlCode = N'EXEC BatchQueue.stp_consumaMP ' + CAST(@XRPQLN AS NVARCHAR(50)) + ' ' + @XNRETI + ' ' + CAST(@XDTPRO AS NVARCHAR(8)) + ' ' + LTRIM(RTRIM(@XTRPRO)) + ' ' + LTRIM(RTRIM(@XDESMT)) + ' ' + LTRIM(RTRIM(@XCDTER))
|
||||
-- lo mostro
|
||||
print '%' + LTRIM(RTRIM(@SqlCode)) + '%'
|
||||
|
||||
-- chiamo la stored ed eseguo invio
|
||||
--EXEC dbo.sp_executesql @SqlCode -- decommentare se va bene...
|
||||
FETCH NEXT FROM UdcMpList INTO @UDC
|
||||
END
|
||||
END
|
||||
CLOSE UdcMpList
|
||||
DEALLOCATE UdcMpList
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_accodaConsumoUdcMP
|
||||
*
|
||||
* Accoda alla tab Batch il consumo di un UDC
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.10
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_accodaConsumoUdcMP
|
||||
(
|
||||
@UDC NVARCHAR(50),
|
||||
@DataPrelFus DATETIME,
|
||||
@TurnoPrelFus CHAR(5),
|
||||
@DestLega CHAR(3),
|
||||
@DestTerz CHAR(6)
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN TRAN
|
||||
|
||||
-- registro movimento da riconciliare
|
||||
INSERT INTO AS400_BatchConsumoMP(ProgUDC, UDC, DataPrelFus, TurnoPrelFus, DestLega, DestTerz)
|
||||
SELECT ProgUdc, UDC, dbo.dateToAsFormat(@DataPrelFus), @TurnoPrelFus, @DestLega, @DestTerz FROM RilPro.RapQual WHERE UDC = @UDC
|
||||
|
||||
-- aggiorno con data e turno di prelievo su tab RilPro (locale)
|
||||
UPDATE RilPro.RapQual
|
||||
SET DataPrelFus = dbo.dateToAsFormat(@DataPrelFus), TurnoPrelFus = @TurnoPrelFus
|
||||
WHERE UDC = @UDC
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(280, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,827 @@
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
create index i_dataFus on ElencoCartellini(DataFus)
|
||||
go
|
||||
|
||||
create index i_IdxPosizione on ElencoCartellini(IdxPosizione)
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ArtiInProd_ByImpData
|
||||
*
|
||||
* ottiene l'elenco dei particolari in lavorazione in una certa data/ora (già trasformato data+turno in dataora) su un impianto
|
||||
* --> con dettaglio su articoli (da anagrafica)
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.04.29
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_ArtiInProd_ByImpData
|
||||
(
|
||||
@CodImpianto VARCHAR(50),
|
||||
@DataRif DATETIME
|
||||
)
|
||||
AS
|
||||
|
||||
-- iniziamo definendo le varie viste accessorie
|
||||
WITH cteUltStampo AS
|
||||
(SELECT CodStampo, InizioValidita, ProgFigure, FineValidita, NumCommessa, NumFigure, CodCliente, CodArticolo, Particolare
|
||||
FROM RilPro.StampoArticolo AS A
|
||||
WHERE (@DataRif >= InizioValidita AND @DataRif <= ISNULL(FineValidita, DATEADD(year, 2, GETDATE()))) ),
|
||||
cteEspAttivi AS
|
||||
(SELECT s.CodStampo, s.Esponente, s.EspAttivo, s.DataInserim, s.DataValidita
|
||||
FROM RilPro.StampoEsponente AS s INNER JOIN
|
||||
(SELECT CodStampo, MAX(DataValidita) AS DataValidita
|
||||
FROM RilPro.StampoEsponente
|
||||
WHERE (DataValidita <= @DataRif) AND (EspAttivo = 'S')
|
||||
GROUP BY CodStampo) AS s2 ON s.CodStampo = s2.CodStampo AND s.DataValidita = s2.DataValidita),
|
||||
cteLineeAttive AS
|
||||
(SELECT CodImpianto, CodStampo, NumStampate, CONVERT(DATETIME, DataInizio) AS DataInizio, DataFine, TurnoInizio, TurnoFine
|
||||
FROM RilPro.LineaStampi
|
||||
WHERE (@DataRif BETWEEN DataInizio AND ISNULL(DataFine, DATEADD(year, 2, GETDATE())))
|
||||
AND CodImpianto = @CodImpianto)
|
||||
|
||||
-- faccio la select principale
|
||||
SELECT l.CodImpianto, l.CodStampo, l.NumStampate, l.DataInizio, l.TurnoInizio, g.InizioValidita, g.FineValidita, g.NumFigure,
|
||||
dbo.f_padLeft(CAST(g.CodCliente AS varchar(50)), 5, '0') AS CodCliente, ISNULL(cl.RagSociale,'-') AS RagSociale, CAST(g.CodArticolo AS varchar(50)) AS CodArticolo,
|
||||
g.Particolare, pa.DescParticolare, pa.DisegnoGrezzo, pa.CodFamiglia, fa.DescFamiglia, fi.Figura, es.Esponente
|
||||
FROM cteLineeAttive AS l INNER JOIN cteUltStampo AS g ON l.CodStampo = g.CodStampo LEFT OUTER JOIN
|
||||
RilPro.StampoFigure AS fi ON l.CodStampo = fi.CodStampo LEFT OUTER JOIN
|
||||
cteEspAttivi AS es ON g.CodStampo = es.CodStampo LEFT OUTER JOIN
|
||||
RilPro.AnagParticolari AS pa ON g.Particolare = pa.Particolare LEFT OUTER JOIN
|
||||
RilPro.AnagFamiglie AS fa ON pa.CodFamiglia = fa.CodFamiglia LEFT OUTER JOIN
|
||||
RilPro.AnagClienti AS cl ON g.CodCliente = cl.CodCliente
|
||||
ORDER BY l.CodImpianto
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UDC_delibera
|
||||
*
|
||||
* fa la delibera dell'UDC andando a processare la state machien e quindi eventualmente cambiando la sua posizione
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.13
|
||||
*
|
||||
************************************/
|
||||
alter PROCEDURE stp_UDC_delibera
|
||||
(
|
||||
@CodTipoDelibera NVARCHAR(50),
|
||||
@UDC NVARCHAR(50),
|
||||
@CodSoggetto NVARCHAR(17),
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
|
||||
AS
|
||||
|
||||
BEGIN TRAN
|
||||
DECLARE @IdxPosizioneTo AS INT
|
||||
DECLARE @IdxPosizioneFrom AS INT
|
||||
DECLARE @IdxPosizionePre AS NVARCHAR(50)
|
||||
DECLARE @IdxCellaPre AS INT
|
||||
DECLARE @IdxCellaTo AS INT
|
||||
|
||||
-- ricavo cella ATTUALE
|
||||
SET @IdxCellaPre = (SELECT IdxCella FROM PosizioneUdcCorrente WHERE UDC = @UDC)
|
||||
|
||||
-- ricavo posizione ATTUALE
|
||||
SET @IdxPosizionePre = (SELECT TOP 1 b.CodMag FROM Celle c INNER JOIN Blocchi b ON c.IdxBlocco=b.IdxBlocco WHERE c.IdxCella = @IdxCellaPre)
|
||||
|
||||
|
||||
-- registro delibera
|
||||
INSERT INTO DELIBERE
|
||||
VALUES (@CodTipoDelibera, @UDC, GETDATE(), @CodSoggetto)
|
||||
|
||||
-- ricavo nuova posizione
|
||||
SET @IdxPosizioneTo = (SELECT tt.IdxPosizioneTo
|
||||
FROM TabTranPosizEventi tt INNER JOIN AnagTipoDelibere atd ON tt.CodEvento = atd.CodEvento
|
||||
WHERE (atd.CodTipoDelibera = @CodTipoDelibera))
|
||||
|
||||
-- ricavo posizione TEORICA VECCHIA
|
||||
SET @IdxPosizioneFrom = (SELECT tt.IdxPosizione
|
||||
FROM TabTranPosizEventi tt INNER JOIN AnagTipoDelibere atd ON tt.CodEvento = atd.CodEvento
|
||||
WHERE (atd.CodTipoDelibera = @CodTipoDelibera))
|
||||
|
||||
-- calcolo la prima cella della nuova posizione...
|
||||
SET @IdxCellaTo = (
|
||||
SELECT TOP 1 IdxCella FROM Celle
|
||||
WHERE IdxBlocco = (
|
||||
SELECT IdxBlocco FROM Blocchi
|
||||
WHERE CodMag=CAST(@IdxPosizioneTo AS NVARCHAR(50)))
|
||||
)
|
||||
|
||||
-- faccio update posizione
|
||||
UPDATE ElencoCartellini
|
||||
SET IdxPosizione = @IdxPosizioneTo
|
||||
WHERE UDC = @UDC
|
||||
|
||||
-- controllo posizioni act e from teorica: SE e SOLO SE corrispondono faccio spostamento...
|
||||
IF(CAST(@IdxPosizioneFrom AS NVARCHAR(50)) = @IdxPosizionePre)
|
||||
BEGIN
|
||||
-- ora cambio anche la posizione corrente dell'UDC (e tramite trigger storicizza...)
|
||||
EXEC stp_spostaUdc @CodCS, @UDC, @IdxCellaTo
|
||||
END
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UDC_getByFlussoDate
|
||||
*
|
||||
* elenco cartellini creati su una data bilancia in un periodo ti tempo indicato
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.13
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_UDC_getByFlussoDate
|
||||
(
|
||||
|
||||
@CodCS NVARCHAR(2),
|
||||
@Flusso NVARCHAR(2),
|
||||
@DataFrom DATETIME,
|
||||
@DataTo DATETIME
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT *
|
||||
FROM ElencoCartellini
|
||||
WHERE (UDC LIKE 'U' + @CodCS + @Flusso + '%')
|
||||
AND (DataFus >= @DataFrom) AND (DataFus <= @DataTo)
|
||||
ORDER BY UDC DESC
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UDC_getLast_ByDataTurnoLineaParticolare
|
||||
*
|
||||
* elenco cartellini ULTIMI creati su una data bilancia dati data, turno, linea e particolare
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.13
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_UDC_getLast_ByDataTurnoLineaParticolare
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@Particolare VARCHAR(15),
|
||||
@CodImpianto AS VARCHAR(50),
|
||||
@DataFus DATETIME,
|
||||
@TurnoFus INT
|
||||
)
|
||||
AS
|
||||
|
||||
-- carico l'elenco dei dati "attivi" x il filtraggio richiesto
|
||||
WITH cte_contAttivi AS(
|
||||
SELECT CodCS, Particolare, Esponente, CodImpianto,CodStampo, Figura, DataFus, TurnoFus, MAX(NumCont) AS NumCont
|
||||
FROM ElencoCartellini
|
||||
GROUP BY CodCS, Particolare, Esponente, CodImpianto, CodStampo, Figura, DataFus, TurnoFus
|
||||
HAVING (CodImpianto = @CodImpianto) AND (DataFus = @DataFus) AND (TurnoFus= @TurnoFus) AND (Particolare= @Particolare) AND CodCS = @CodCS
|
||||
)
|
||||
|
||||
-- traduco in tab estesa UDC
|
||||
SELECT ec.* FROM ElencoCartellini ec INNER JOIN cte_contAttivi ca
|
||||
ON ec.Particolare = ca.Particolare AND ec.Esponente=ca.Esponente AND ec.CodImpianto=ca.CodImpianto
|
||||
AND ec.CodStampo=ca.CodStampo AND ec.Figura=ca.Figura AND ec.DataFus=ca.DataFus AND ec.TurnoFus=ca.TurnoFus
|
||||
AND ec.NumCont=ca.NumCont AND ec.CodCS=ca.CodCS
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.TabTranPosizEventi
|
||||
VALUES (N'MagPreFus', 84, 84)
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
|
||||
drop table AS400_BatchMovimenti
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
create table AS400_BatchMovimenti(
|
||||
IdxBatch int not null identity constraint PK_AS400_BatchMovimenti primary key,
|
||||
DataIns datetime not null,
|
||||
CodEvento nvarchar(10) not null,
|
||||
Particolare nvarchar(15) not null,
|
||||
UDC nvarchar(50) not null,
|
||||
CodMagAS nvarchar(50) not null,
|
||||
Quantita decimal(10,2) not null,
|
||||
DataBatch datetime,
|
||||
DataVerifica datetime
|
||||
)
|
||||
go
|
||||
|
||||
alter table AS400_BatchMovimenti add
|
||||
constraint FK_AS400_BatchMovimenti_AS400_MagCont foreign key(CodMagAS) references AS400_MagCont(CodMagAS) on update cascade,
|
||||
constraint FK_AS400_BatchMovimenti_AnagTipoEvento foreign key(CodEvento) references AnagTipoEvento(CodEvento) on update cascade
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'dataora inserimento in coda caricamento', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataIns'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'NON MODIFICARE: nel codice si usano questi campi x chiamate...', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'CodEvento'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'dataora di caricamento batch verso AS', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataBatch'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', N'dataora in cui è stato verificato il caricamento su AS', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataVerifica'
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
drop table RigheListePrelievo_AS
|
||||
go
|
||||
|
||||
|
||||
|
||||
create table RigheListePrelievo_AS(
|
||||
IdxRiga int not null identity constraint PK_RigheListePrelievo_AS primary key,
|
||||
CodLista nvarchar(12) not null,
|
||||
UDC nvarchar(50) not null,
|
||||
Qta decimal(10,2) not null,
|
||||
Proposto bit,
|
||||
Prelevato bit
|
||||
)
|
||||
go
|
||||
|
||||
|
||||
drop table ElencoListePrelievo_AS
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
create table ElencoListePrelievo_AS(
|
||||
CodLista nvarchar(12) not null constraint PK_ElencoListePrelievo_AS primary key,
|
||||
CodTipoLista nvarchar(10) not null,
|
||||
CodCS nchar(2) not null,
|
||||
DataCreaz datetime not null,
|
||||
CodCliente nvarchar(6),
|
||||
RagSociale nvarchar(35),
|
||||
CodSoggetto nchar(17) not null,
|
||||
Particolare nvarchar(15) not null,
|
||||
DescParticolare nvarchar(30),
|
||||
DisegnoGrezzo nvarchar(30),
|
||||
Esponente nvarchar(6),
|
||||
Figura nvarchar(4),
|
||||
CodImballo nvarchar(15),
|
||||
QtaTot decimal(10,2) not null,
|
||||
CodStatoLista int not null constraint DF_ElencoListePrelievo_AS_CodStatoLista default (1),
|
||||
Destinatario nvarchar(50),
|
||||
DataBatch datetime,
|
||||
DataVerifica datetime
|
||||
)
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'dataora di caricamento batch verso AS', 'SCHEMA', 'dbo', 'TABLE', 'ElencoListePrelievo_AS', 'COLUMN', 'DataBatch'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', N'dataora in cui è stato verificato il caricamento su AS', 'SCHEMA', 'dbo', 'TABLE', 'ElencoListePrelievo_AS', 'COLUMN', 'DataVerifica'
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
create VIEW v_datiPackingList
|
||||
AS
|
||||
SELECT dbo.RigheListePrelievo_AS.IdxRiga, dbo.ElencoCartellini.UDC, dbo.ElencoListePrelievo_AS.Particolare, dbo.ElencoCartellini.CodImballo,
|
||||
CAST(RIGHT(dbo.RigheListePrelievo_AS.UDC, 6) AS INT) AS matrUdc, CASE WHEN (dbo.ElencoListePrelievo_AS.CodTipoLista = '03-TerWip')
|
||||
THEN 'FO' ELSE 'CL' END AS tipo, dbo.ElencoListePrelievo_AS.Destinatario, dbo.ElencoCartellini.Qta,
|
||||
dbo.ElencoCartellini.PesoTot - dbo.ElencoCartellini.Tara AS PesoNetto, dbo.ElencoCartellini.PesoTot, 'B' AS Stato, GETDATE() AS data,
|
||||
dbo.ElencoListePrelievo_AS.DataBatch
|
||||
FROM dbo.ElencoListePrelievo_AS INNER JOIN
|
||||
dbo.RigheListePrelievo_AS ON dbo.ElencoListePrelievo_AS.CodLista = dbo.RigheListePrelievo_AS.CodLista INNER JOIN
|
||||
dbo.ElencoCartellini ON dbo.RigheListePrelievo_AS.UDC = dbo.ElencoCartellini.UDC
|
||||
WHERE (dbo.ElencoListePrelievo_AS.DataBatch IS NULL)
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "ElencoCartellini"
|
||||
Begin Extent =
|
||||
Top = 14
|
||||
Left = 658
|
||||
Bottom = 376
|
||||
Right = 828
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "ElencoListePrelievo_AS"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 38
|
||||
Bottom = 367
|
||||
Right = 208
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "RigheListePrelievo_AS"
|
||||
Begin Extent =
|
||||
Top = 5
|
||||
Left = 353
|
||||
Bottom = 200
|
||||
Right = 523
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 14
|
||||
Width = 284
|
||||
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_datiPackingList'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPaneCount', 1, 'SCHEMA', 'dbo', 'VIEW', 'v_datiPackingList'
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_consumaMP
|
||||
*
|
||||
* Salva il movimento di consumo dell'UDC di MP indicato
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.12
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE BatchQueue.stp_consumaMP
|
||||
(
|
||||
@XRPQLN INT, --è il num rap qualità
|
||||
@XNRETI NVARCHAR(10), -- è il numUdc prog
|
||||
@XDTPRO INT, -- data 8 cifre aaaammgg
|
||||
@XTRPRO NVARCHAR(5), -- turno
|
||||
@XDESMT NVARCHAR(3), -- destinatario int/terzista
|
||||
@XCDTER NVARCHAR(6) -- cod terzista
|
||||
)
|
||||
AS
|
||||
-- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!!
|
||||
|
||||
DECLARE @SQL AS NVARCHAR(1000)
|
||||
|
||||
-- Faccio chiamata su AS400
|
||||
|
||||
SET @SQL = N' OPENQUERY( P65220DC, ''UPDATE MAZZT_DTV3.XOGIX00F'
|
||||
SET @SQL = @SQL + 'SET XDTPRO = ' + CAST(@XDTPRO AS NVARCHAR(8)) + ', XTRPRO = ' + @XTRPRO
|
||||
SET @SQL = @SQL + ', XDESMT = ''' + @XDESMT +''', XMATSC=''S'' , XCDTER = ''' + @XCDTER + ''' '
|
||||
SET @SQL = @SQL + 'WHERE XRPQLN =' + CAST(@XRPQLN AS NVARCHAR(20)) + ' AND XNRETI = ' + @XNRETI + ''' )'
|
||||
|
||||
EXEC dbo.sp_executesql @SQL
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/*stp_processaCodaMovimMag
|
||||
* STORED stp_processaCodaConsumoMP
|
||||
*
|
||||
* Processa la coda dei movimenti di magazzino e chiama procedura x salvataggio dato su AS400
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.15
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE BatchQueue.stp_processaCodaMovimMag
|
||||
AS
|
||||
-- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!!
|
||||
|
||||
-- campi x cursore e valorizzazione riga a riga
|
||||
DECLARE @IdxRiga INT
|
||||
DECLARE @CodStab CHAR(2)
|
||||
DECLARE @UDC NVARCHAR(15)
|
||||
DECLARE @Particolare NVARCHAR(15)
|
||||
DECLARE @CodImb NVARCHAR(15)
|
||||
DECLARE @Matr INT
|
||||
DECLARE @Tipo NVARCHAR(2)
|
||||
DECLARE @Dest NVARCHAR(10)
|
||||
DECLARE @Qta INT
|
||||
DECLARE @PesoNet NUMERIC(7,3)
|
||||
DECLARE @PesoLor NUMERIC(7,3)
|
||||
DECLARE @Stato CHAR(1)
|
||||
DECLARE @Data NVARCHAR(8)
|
||||
-- variabile x composizioen query
|
||||
DECLARE @SqlCode NVARCHAR(1000)
|
||||
-- faccio una query con un cursore x processare tutte le righe da inviare ad AS400..
|
||||
DECLARE RigaPackList CURSOR FOR
|
||||
SELECT IdxRiga FROM v_datiPackingList
|
||||
|
||||
-- setto il codice stabilimento da inviare ad AS... VERIFICARE!!!
|
||||
SET @CodStab = '05'
|
||||
|
||||
-- inizio cursore!
|
||||
OPEN RigaPackList
|
||||
FETCH NEXT FROM RigaPackList
|
||||
INTO @IdxRiga
|
||||
WHILE @@FETCH_STATUS = 0
|
||||
BEGIN
|
||||
-- controllo ci sia la riga
|
||||
IF (SELECT COUNT(IdxRiga) FROM v_datiPackingList WHERE IdxRiga = @IdxRiga) > 0
|
||||
BEGIN
|
||||
-- carico valori che mi servono
|
||||
SELECT @Particolare=pl.Particolare, @UDC=UDC, @CodImb=pl.CodImballo, @Matr = pl.matrUdc, @Tipo=pl.tipo, @Dest=pl.Destinatario,
|
||||
@Qta=ABS(pl.Qta), @PesoNet=pl.PesoNetto, @PesoLor=pl.PesoTot, @Stato=pl.Stato, @Data=dbo.dateToAsFormat(pl.data)
|
||||
FROM v_datiPackingList pl
|
||||
WHERE IdxRiga = @IdxRiga
|
||||
|
||||
-- compongo testo x exec
|
||||
SET @SqlCode = N'EXEC BatchQueue.stp_registraPackList ' + @CodStab + ' ' + @UDC + ' ' + @Particolare + ' ' + @CodImb + ' ' + CAST(@Matr AS NVARCHAR(8)) + ' ' + @Tipo + ' ' + @Dest + ' ' + CAST(@Qta AS NVARCHAR(8)) + ' ' + CAST(@PesoNet AS NVARCHAR(8)) + ' ' + CAST(@PesoLor AS NVARCHAR(8)) + ' ' + @Stato + ' ' + @Data
|
||||
-- lo mostro
|
||||
print '%' + LTRIM(RTRIM(@SqlCode)) + '%'
|
||||
|
||||
-- !!! TESTARE !!!
|
||||
/*
|
||||
-- chiamo la stored ed eseguo invio
|
||||
EXEC dbo.sp_executesql @SqlCode -- decommentare se va bene...
|
||||
|
||||
-- registro la data del movimento BATCH
|
||||
UPDATE AS400_BatchMovimenti SET DataBatch = GETDATE() WHERE IdxRiga = @IdxRiga
|
||||
*/
|
||||
|
||||
FETCH NEXT FROM RigaPackList INTO @IdxRiga
|
||||
END
|
||||
END
|
||||
CLOSE RigaPackList
|
||||
DEALLOCATE RigaPackList
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_registraMovMag
|
||||
*
|
||||
* Salva il movimento di magazzino indicato
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.15
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE BatchQueue.stp_registraMovMag
|
||||
(
|
||||
@NOMUS NVARCHAR(50), -- è il nome utente
|
||||
@CDCAU NVARCHAR(2), -- è la causale del movimento
|
||||
@CDPAR NVARCHAR(15), -- codice particolare
|
||||
@CDMAG NVARCHAR(2), -- codice magazzino
|
||||
@QTMOV INT, -- quantità movimento
|
||||
@DAMOV NVARCHAR(8), -- data 8 cifre aaaammgg
|
||||
@RIFFO NVARCHAR(8) -- cod UDC compresso
|
||||
)
|
||||
AS
|
||||
-- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!!
|
||||
|
||||
DECLARE @SQL AS NVARCHAR(1000)
|
||||
|
||||
-- Faccio chiamata su AS400
|
||||
SET @SQL = N' OPENQUERY( P65220DC, ''INSERT INTO MAZZT_DTV3.MWMV200F VALUES '
|
||||
SET @SQL = @SQL + @NOMUS + ', ' + @CDCAU + ', ' + @CDPAR + ', ' + @CDMAG + ', '
|
||||
SET @SQL = @SQL + CAST(@QTMOV AS NVARCHAR(8)) + ', ' + @DAMOV + ', ' + @RIFFO + ''' )'
|
||||
|
||||
EXEC dbo.sp_executesql @SQL
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_registraPackList
|
||||
*
|
||||
* Salva i dati di packing list indicati
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.15
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE BatchQueue.stp_registraPackList
|
||||
(
|
||||
@PLREPA NVARCHAR(2), -- è il codice reparto/stabilimento (05 pressofusione)
|
||||
@PLCART NVARCHAR(15), -- UDC
|
||||
@PLARTI NVARCHAR(15), -- cod articolo
|
||||
@PLCONT NVARCHAR(15), -- cod contenitore
|
||||
@PLMATR INT, -- matricola contenitore (solo cifre finali INT)
|
||||
@PLTPAN CHAR(2), -- tipo anagrafico CLiente / FOrnitore-terzista
|
||||
@PLCDAN NVARCHAR(6), -- cod terzista / cliente
|
||||
@PLQTA INT, -- quantità
|
||||
@PLPNET NUMERIC(7, 3), -- peso netto
|
||||
@PLPLOR NUMERIC(7, 3), -- peso lordo
|
||||
@PLSTAT CHAR(1), -- stato "P" predisposto per packing list, "B" bolla stampata
|
||||
@PLDTEN INT -- data entrata merce, data di carico dell'UDC 8 cifre aaaammgg
|
||||
)
|
||||
AS
|
||||
-- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!!
|
||||
|
||||
DECLARE @SQL AS NVARCHAR(1000)
|
||||
|
||||
-- Faccio chiamata su AS400
|
||||
SET @SQL = N' OPENQUERY( P65220DC, ''INSERT INTO MAZZT_DTV3.PACKL00F VALUES '
|
||||
SET @SQL = @SQL + @PLREPA + ', ' + @PLCART + ', ' + @PLARTI + ', ' + @PLCONT + ', '
|
||||
SET @SQL = @SQL + CAST(@PLMATR AS NVARCHAR(5)) + ', ' + @PLTPAN + ', ' + @PLCDAN + ', ' + CAST(@PLQTA AS NVARCHAR(10)) + ', '
|
||||
SET @SQL = @SQL + CAST(@PLPNET AS NVARCHAR(10)) + ', ' + CAST(@PLPLOR AS NVARCHAR(10)) + ', ' + @PLSTAT + ', '
|
||||
SET @SQL = @SQL + CAST(@PLDTEN AS NVARCHAR(8)) + ''' )'
|
||||
|
||||
EXEC dbo.sp_executesql @SQL
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverview
|
||||
*
|
||||
* restituisce solo la riga con il num max di celle DI UN DATO magazzino
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.02
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_magazzinoOverviewByMag_maxCelle
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@CodMag VARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
|
||||
WITH cte_celle AS(
|
||||
SELECT b.CodBlocco, c.IdxTipoCella, COUNT(c.IdxCella) * t.Capienza AS numCelle
|
||||
FROM Celle AS c INNER JOIN
|
||||
Blocchi AS b ON c.IdxBlocco = b.IdxBlocco INNER JOIN
|
||||
TipoCella AS t ON c.IdxTipoCella = t.IdxTipoCella
|
||||
WHERE (b.CodCS = @CodCS) AND (b.CodMag = @CodMag)
|
||||
GROUP BY b.CodBlocco, c.IdxTipoCella, t.Capienza
|
||||
)
|
||||
|
||||
|
||||
SELECT TOP (1) AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, b.IdxBlocco, b.CodBlocco,
|
||||
ISNULL(c.numCelle,ISNULL(b.NumX * b.NumY * b.NumZ,1)) AS TotCelle,
|
||||
0 AS CelleAttive, 0 AS CelleOccupate, 0 AS CelleLibere, GETDATE() AS Oldest, GETDATE() AS Newest
|
||||
FROM AnagMag INNER JOIN Blocchi b ON AnagMag.CodMag = b.CodMag AND AnagMag.CodCS = b.CodCS INNER JOIN cte_celle c ON c.CodBlocco = b.CodBlocco
|
||||
WHERE (AnagMag.CodCS = @CodCS) AND AnagMag.CodMag = @CodMag
|
||||
ORDER BY TotCelle DESC
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_ParticolariOverview
|
||||
*
|
||||
* restituisce solo la riga con il num max di celle
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.02
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_magazzinoOverview_maxCelle
|
||||
(
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
WITH cte_celle AS(
|
||||
SELECT b.CodBlocco, c.IdxTipoCella, COUNT(c.IdxCella) * t.Capienza AS numCelle
|
||||
FROM Celle AS c INNER JOIN
|
||||
Blocchi AS b ON c.IdxBlocco = b.IdxBlocco INNER JOIN
|
||||
TipoCella AS t ON c.IdxTipoCella = t.IdxTipoCella
|
||||
WHERE (b.CodCS = @CodCS)
|
||||
GROUP BY b.CodBlocco, c.IdxTipoCella, t.Capienza
|
||||
)
|
||||
|
||||
|
||||
SELECT TOP (1) AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, b.IdxBlocco, b.CodBlocco,
|
||||
ISNULL(c.numCelle,ISNULL(b.NumX * b.NumY * b.NumZ,1)) AS TotCelle,
|
||||
0 AS CelleAttive, 0 AS CelleOccupate, 0 AS CelleLibere, GETDATE() AS Oldest, GETDATE() AS Newest
|
||||
FROM AnagMag INNER JOIN Blocchi b ON AnagMag.CodMag = b.CodMag AND AnagMag.CodCS = b.CodCS INNER JOIN cte_celle c ON c.CodBlocco = b.CodBlocco
|
||||
WHERE (AnagMag.CodCS = @CodCS)
|
||||
ORDER BY TotCelle DESC
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(285, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,198 @@
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
alter VIEW v_selUdcByPart
|
||||
AS
|
||||
SELECT UDC AS value, ISNULL(RTRIM(UDC), '-') + ' - ' + ISNULL(RTRIM(Particolare), '...') + ' (' + ISNULL(RTRIM(DescParticolare), '') + ') ' + ISNULL(RTRIM(DisegnoGrezzo), '-')
|
||||
+ ' pz. ' + ISNULL(CAST(Qta AS varchar), '0') AS label, Particolare AS conditio, IdxPosizione
|
||||
FROM dbo.ElencoCartellini
|
||||
WHERE (NOT (Particolare IS NULL)) AND (IdxPosizione >= 0)
|
||||
go
|
||||
|
||||
exec sp_updateextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "ElencoCartellini"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 38
|
||||
Bottom = 319
|
||||
Right = 208
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 11
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 9
|
||||
Width = 284
|
||||
Width = 1500
|
||||
Width = 8910
|
||||
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_selUdcByPart'
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_getUdcDetailFullCode
|
||||
*
|
||||
* ottiene l'elenco degli UDC con i dati significativi partendo da un codice UDC COMPLETO
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.05.24
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_getUdcDetailFullCode
|
||||
(
|
||||
@UDC VARCHAR(50),
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT ec.UDC, ISNULL(ec.RagSociale, N'nd') AS RagSociale, ISNULL(ec.Particolare, N'nd') AS Particolare,
|
||||
ISNULL(ec.DescParticolare, N'nd') AS DescParticolare, ISNULL(ec.DisegnoGrezzo, N'nd') AS DisegnoGrezzo,
|
||||
ISNULL(ec.Esponente, N'nd') AS Esponente, ISNULL(ec.DescImpianto, N'nd') AS DescImpianto,
|
||||
ISNULL(ec.DataFus, N'') AS DataFus, ISNULL(ec.TurnoFus, 0) AS TurnoFus, ec.CodImballo,
|
||||
ec.Qta, ISNULL(AnagStatiProdotto.DescStato, N'nd') AS DescStato, ec.ModDate,
|
||||
CASE WHEN(ec.IdxPosizione < 0) THEN 'Consum' ELSE ISNULL(Blocchi.CodMag, N'nd') END AS CodMag,
|
||||
ISNULL(Blocchi.CodBlocco, N'nd') AS CodBlocco, ISNULL(Celle.CodCella, N'nd') AS CodCella, ISNULL(dbo.Celle.IdxCella, 0) AS IdxCella,
|
||||
ISNULL(Celle.X, 0) AS X, ISNULL(Celle.Y, 0) AS Y, ISNULL(Celle.Z, 0) AS Z, ec.IdxPosizione
|
||||
FROM AnagStatiProdotto RIGHT OUTER JOIN
|
||||
ElencoCartellini ec ON AnagStatiProdotto.CodStato = ec.CodStato AND AnagStatiProdotto.CodStato = ec.CodStato
|
||||
LEFT OUTER JOIN Celle INNER JOIN PosizioneUdcCorrente ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella
|
||||
AND Celle.IdxCella = PosizioneUdcCorrente.IdxCella AND Celle.IdxCella = PosizioneUdcCorrente.IdxCella
|
||||
INNER JOIN Blocchi ON Celle.IdxBlocco = Blocchi.IdxBlocco INNER JOIN AnagMag ON Blocchi.CodMag = AnagMag.CodMag
|
||||
AND Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag AND Blocchi.CodCS = AnagMag.CodCS AND Blocchi.CodMag = AnagMag.CodMag
|
||||
AND Blocchi.CodCS = AnagMag.CodCS ON ec.UDC = PosizioneUdcCorrente.UDC
|
||||
WHERE (ec.UDC = @UDC) AND (ec.CodCS = @CodCS)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(286, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,78 @@
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table AS400_BatchConsumoMP alter column
|
||||
TurnoPrelFus nvarchar(50) not null
|
||||
go
|
||||
|
||||
alter table AS400_BatchConsumoMP alter column
|
||||
DestLega nvarchar(50)
|
||||
go
|
||||
|
||||
alter table AS400_BatchConsumoMP alter column
|
||||
DestTerz nvarchar(50)
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_accodaConsumoUdcMP
|
||||
*
|
||||
* Accoda alla tab Batch il consumo di un UDC
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.10
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_accodaConsumoUdcMP
|
||||
(
|
||||
@UDC NVARCHAR(50),
|
||||
@DataPrelFus DATETIME,
|
||||
@TurnoPrelFus NVARCHAR(5),
|
||||
@DestLega NVARCHAR(3),
|
||||
@DestTerz NVARCHAR(6)
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN TRAN
|
||||
|
||||
-- registro movimento da riconciliare
|
||||
INSERT INTO AS400_BatchConsumoMP(ProgUDC, UDC, DataPrelFus, TurnoPrelFus, DestLega, DestTerz)
|
||||
SELECT ProgUdc, UDC, dbo.dateToAsFormat(@DataPrelFus), LTRIM(RTRIM(@TurnoPrelFus)), LTRIM(RTRIM(@DestLega)), LTRIM(RTRIM(@DestTerz))
|
||||
FROM RilPro.RapQual WHERE UDC = @UDC
|
||||
|
||||
-- aggiorno con data e turno di prelievo su tab RilPro (locale)
|
||||
UPDATE RilPro.RapQual
|
||||
SET DataPrelFus = dbo.dateToAsFormat(@DataPrelFus), TurnoPrelFus = LTRIM(RTRIM(@TurnoPrelFus))
|
||||
WHERE UDC = @UDC
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(287, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,758 @@
|
||||
-- FIX parte As400
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
alter VIEW v_datiPackingList
|
||||
AS
|
||||
SELECT dbo.ElencoListePrelievo_AS.CodLista, dbo.RigheListePrelievo_AS.IdxRiga, dbo.ElencoCartellini.UDC, dbo.ElencoListePrelievo_AS.Particolare,
|
||||
dbo.ElencoCartellini.CodImballo, CAST(RIGHT(dbo.RigheListePrelievo_AS.UDC, 6) AS INT) AS matrUdc,
|
||||
CASE WHEN (dbo.ElencoListePrelievo_AS.CodTipoLista = '03-TerWip') THEN 'FO' ELSE 'CL' END AS tipo, dbo.ElencoListePrelievo_AS.Destinatario,
|
||||
dbo.ElencoCartellini.Qta, dbo.ElencoCartellini.PesoTot - dbo.ElencoCartellini.Tara AS PesoNetto, dbo.ElencoCartellini.PesoTot, 'B' AS Stato, GETDATE() AS data,
|
||||
dbo.ElencoListePrelievo_AS.DataBatch
|
||||
FROM dbo.ElencoListePrelievo_AS INNER JOIN
|
||||
dbo.RigheListePrelievo_AS ON dbo.ElencoListePrelievo_AS.CodLista = dbo.RigheListePrelievo_AS.CodLista INNER JOIN
|
||||
dbo.ElencoCartellini ON dbo.RigheListePrelievo_AS.UDC = dbo.ElencoCartellini.UDC
|
||||
WHERE (dbo.ElencoListePrelievo_AS.DataBatch IS NULL)
|
||||
go
|
||||
|
||||
exec sp_updateextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "ElencoListePrelievo_AS"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 38
|
||||
Bottom = 367
|
||||
Right = 238
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "RigheListePrelievo_AS"
|
||||
Begin Extent =
|
||||
Top = 5
|
||||
Left = 353
|
||||
Bottom = 200
|
||||
Right = 557
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "ElencoCartellini"
|
||||
Begin Extent =
|
||||
Top = 14
|
||||
Left = 658
|
||||
Bottom = 376
|
||||
Right = 828
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 14
|
||||
Width = 284
|
||||
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_datiPackingList'
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_batch_RapQual_S01
|
||||
*
|
||||
* Esegue lo step 1 (caricamento dati RAW da AS400) per la tab dei rapporti di qualità
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.09.23
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE BatchQueue.stp_batch_RapQual_S01
|
||||
(
|
||||
@minData DATETIME
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT ON;
|
||||
|
||||
-- BOZZA DA TESTARE A CURA MAZZUCCONI!!!
|
||||
/*
|
||||
XRPQLN AS nRapQual
|
||||
XRPQLD AS DataRapQual
|
||||
XNRETI AS ProgUDC
|
||||
XCDFOR AS CodFor
|
||||
XCDTER AS DestTerz
|
||||
XCDPAR AS CodLega
|
||||
XDTPRO AS DataPrelFus
|
||||
XTRPRO AS TurnoPrelFus
|
||||
XQTPRO AS Qta
|
||||
XDESMT AS DestLega
|
||||
XMATSC AS LegaScaric
|
||||
XBENQL AS BenesQual
|
||||
|
||||
WHERE XRPQLN <> 0 -- Se il n. rapporto di qualità è zero non sono cartellini materia prima
|
||||
|
||||
*/
|
||||
|
||||
DECLARE @SQL AS NVARCHAR(4000);
|
||||
DECLARE @SqlOK AS INT;
|
||||
|
||||
DECLARE @dataAs400 AS VARCHAR(8)
|
||||
|
||||
SET @dataAs400 = (SELECT dbo.dateToAsFormat(@minData))
|
||||
|
||||
BEGIN TRY
|
||||
|
||||
-- svuoto tab raw attuale
|
||||
DELETE FROM RawData.XOGIX00F
|
||||
|
||||
-- CREO L'ISTRUZIONE SQL DI INSERT PARAMETRICA
|
||||
SET @SQL =
|
||||
N'INSERT INTO RawData.XOGIX00F
|
||||
SELECT XRPQLN
|
||||
,XRPQLD
|
||||
,XNRETI
|
||||
,XCDFOR
|
||||
,XCDTER
|
||||
,XCDPAR
|
||||
,XDTPRO
|
||||
,XTRPRO
|
||||
,XQTPRO
|
||||
,XDESMT
|
||||
,XMATSC
|
||||
,XBENQL
|
||||
FROM OPENQUERY( P65220DC, ''SELECT * FROM MAZZT_DTV3.XOGIX00F WHERE XRPQLN <> 0 AND XRPQLD >= '
|
||||
|
||||
SET @SQL = @SQL + @dataAs400 + ' '' ) '
|
||||
|
||||
-- SELECT @SQL
|
||||
|
||||
-- Eseguo il comando T-SQL verso AS400 e testo se OK
|
||||
SET @SqlOK = 0;
|
||||
|
||||
-- EXEC @SqlOK = sp_executesql @SQL se faccio così non mi valorizza la variabile se da errore
|
||||
EXEC dbo.sp_executesql @SQL;
|
||||
|
||||
END TRY
|
||||
BEGIN CATCH
|
||||
-- PRINT ERROR_NUMBER()
|
||||
SET @SqlOK = ERROR_NUMBER();
|
||||
|
||||
END CATCH
|
||||
|
||||
-- Memorizzo il comando per verifica T-SQL e l'esito del comando se 0 è OK
|
||||
INSERT INTO RawData.AS400_Comandi
|
||||
SELECT GETDATE(), 'stp_consumaMP', @SQL, @SqlOK;
|
||||
|
||||
-- è possibile sollevare un RAISERROR ??? come si comporta poi il programma?
|
||||
|
||||
-- NON SI FANNO RAISE ERROR E NON SI RESTITUISCE CODICE!!!!!
|
||||
|
||||
--RETURN @SqlOK; -- commentato da Sam
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_consumaMP
|
||||
*
|
||||
* Salva il movimento di consumo dell'UDC di MP indicato
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.12
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE BatchQueue.stp_consumaMP
|
||||
(
|
||||
@XRPQLN INT, -- è il num rap qualità
|
||||
@XNRETI NVARCHAR(10), -- è il numUdc prog AS400
|
||||
@XDTPRO INT, -- data 8 cifre aaaammgg Data Prelievo Fusione
|
||||
@XTRPRO NVARCHAR(5), -- turno prelievo ( solo se interno )
|
||||
@XDESMT NVARCHAR(3), -- destinatario int/terzista ( F01 / T01 )
|
||||
@XCDTER NVARCHAR(6) -- cod terzista ( Anagrafico Depositi )
|
||||
)
|
||||
AS
|
||||
-- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!!
|
||||
-- L'UPDATE FUNZIONA VERSO AS400 DI TEST MAZZT_DTV3 effetiva MAZZ_DATV3
|
||||
|
||||
/* PER TESTARE
|
||||
|
||||
DECLARE @XRPQLN INT, -- è il num rap qualità
|
||||
@XNRETI NVARCHAR(10), -- è il numUdc prog
|
||||
@XDTPRO INT, -- data 8 cifre aaaammgg
|
||||
@XTRPRO NVARCHAR(5), -- turno
|
||||
@XDESMT NVARCHAR(3), -- destinatario int/terzista
|
||||
@XCDTER NVARCHAR(6) -- cod terzista
|
||||
|
||||
SET @XRPQLN = 905793 -- è il num rap qualità
|
||||
SET @XNRETI = 'U100548151' -- è il numUdc prog
|
||||
SET @XDTPRO = 20100723 -- data 8 cifre aaaammgg
|
||||
SET @XTRPRO = 'S' -- turno
|
||||
SET @XDESMT = 'F01' -- destinatario int/terzista
|
||||
SET @XCDTER = '' -- cod terzista
|
||||
*/
|
||||
|
||||
DECLARE @SQL AS NVARCHAR(4000);
|
||||
DECLARE @SqlOK AS INT;
|
||||
|
||||
BEGIN TRY
|
||||
|
||||
-- TEST per generare errore
|
||||
-- SET @XDTPRO = 99999920100723 -- data 8 cifre aaaammgg
|
||||
|
||||
-- Creo l'istruzione SQL e faccio chiamata su AS400
|
||||
-- Forse è meglio controllare prima se già aggiornato e preso in carico da ACG???
|
||||
|
||||
SET @SQL = N'UPDATE OPENQUERY( P65220DC, ''SELECT * FROM MAZZT_DTV3.XOGIX00F '
|
||||
|
||||
SET @SQL = @SQL + 'WHERE XRPQLN = ' + CAST(@XRPQLN AS NVARCHAR(20)) -- Numero Rapporto Qualita
|
||||
SET @SQL = @SQL + ' AND XNRETI = ''''' + @XNRETI + ''''''' ) ' -- Numero UDC AS400
|
||||
|
||||
SET @SQL = @SQL + 'SET XDTPRO = ' + CAST(@XDTPRO AS NVARCHAR(8))
|
||||
SET @SQL = @SQL + ', XTRPRO = ''' + @XTRPRO + ''''
|
||||
SET @SQL = @SQL + ', XDESMT = ''' + @XDESMT + ''''
|
||||
SET @SQL = @SQL + ', XMATSC = ''S''' -- Flag Lega Scaricata
|
||||
SET @SQL = @SQL + ', XCDTER = ''' + @XCDTER + '''';
|
||||
|
||||
-- SELECT @SQL
|
||||
|
||||
-- Eseguo il comando T-SQL verso AS400 e testo se OK
|
||||
SET @SqlOK = 0;
|
||||
|
||||
-- EXEC @SqlOK = sp_executesql @SQL se faccio così non mi valorizza la variabile se da errore
|
||||
EXEC dbo.sp_executesql @SQL;
|
||||
END TRY
|
||||
BEGIN CATCH
|
||||
-- PRINT ERROR_NUMBER()
|
||||
SET @SqlOK = ERROR_NUMBER();
|
||||
|
||||
-- Uso RAISERROR mandare in errore la procedura e x per tornare le info
|
||||
-- sull'errore originale che ha portato l'esecuzione nel blocco CATCH
|
||||
--DECLARE @ErrorMessage NVARCHAR(4000);
|
||||
--DECLARE @ErrorSeverity INT;
|
||||
--DECLARE @ErrorState INT;
|
||||
--SELECT @ErrorMessage = ERROR_MESSAGE(),@ErrorSeverity = ERROR_SEVERITY(),@ErrorState = ERROR_STATE();
|
||||
--RAISERROR (@ErrorMessage,@ErrorSeverity,@ErrorState); -- Se non uso RAISERROR la procedura non mi da errore es. se schedulata
|
||||
END CATCH
|
||||
|
||||
-- Memorizzo il comando per verifica T-SQL e l'esito del comando se 0 è OK
|
||||
INSERT INTO RawData.AS400_Comandi
|
||||
SELECT GETDATE(), 'stp_consumaMP', @SQL, @SqlOK;
|
||||
|
||||
-- è possibile sollevare un RAISERROR ??? come si comporta poi il programma?
|
||||
|
||||
-- NON SI FANNO RAISE ERROR E NON SI RESTITUISCE CODICE!!!!!
|
||||
|
||||
--RETURN @SqlOK; -- commentato da Sam
|
||||
|
||||
|
||||
|
||||
-- MANCA IL TEST SE HO AGGIORNATO EFFETTIVAMENTE o MENO
|
||||
|
||||
/*
|
||||
SELECT XRPQLN, XNRETI , XDTPRO, XTRPRO, XDESMT, XMATSC, XCDTER
|
||||
FROM OPENQUERY( P65220DC, 'SELECT * FROM MAZZT_DTV3.XOGIX00F WHERE XRPQLN = 905793 AND XNRETI = ''U100548151'' ')
|
||||
|
||||
-- Resetto l'UDC
|
||||
UPDATE OPENQUERY( P65220DC, 'SELECT * FROM MAZZT_DTV3.XOGIX00F WHERE XRPQLN = 905793 AND XNRETI = ''U100548151'' ')
|
||||
SET XDTPRO = 0 , XTRPRO = '', XDESMT = '', XMATSC = 'N', XCDTER = ''
|
||||
|
||||
-- Comando OK
|
||||
-- UPDATE OPENQUERY( P65220DC, 'SELECT * FROM MAZZT_DTV3.XOGIX00F WHERE XRPQLN = 905793 AND XNRETI = ''U100548151'' ')
|
||||
-- SET XDTPRO = 20100723 , XTRPRO = 'S', XDESMT = 'F01', XMATSC = 'N', XCDTER = ''
|
||||
*/
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/*****************************************************
|
||||
* STORED sstp_processaCodaMovimMag
|
||||
*
|
||||
* Processa la coda dei movimenti di magazzino e chiama procedura x salvataggio dato su AS400
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.15
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE BatchQueue.stp_processaCodaMovimMag
|
||||
AS
|
||||
|
||||
-- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!!
|
||||
-- campi variabili "globali"
|
||||
DECLARE @IdxBatch INT
|
||||
DECLARE @CodSoggetto NVARCHAR(17)
|
||||
DECLARE @CodMovCarico CHAR(2)
|
||||
DECLARE @CodMovScarico CHAR(2)
|
||||
-- campi x cursore e valorizzazione riga a riga
|
||||
DECLARE @Particolare NVARCHAR(15)
|
||||
DECLARE @Causale NVARCHAR(2)
|
||||
DECLARE @CodMag NVARCHAR(50)
|
||||
DECLARE @Qta INT
|
||||
DECLARE @Data NVARCHAR(8)
|
||||
DECLARE @RIFFO NVARCHAR(8)
|
||||
|
||||
-- faccio una query con un cursore x processare tutte le righe da inviare ad AS400..
|
||||
DECLARE RigaMovMag CURSOR FOR
|
||||
SELECT IdxBatch FROM AS400_BatchMovimenti WHERE DataBatch IS NULL
|
||||
|
||||
-- setto il codice soggetto da inviare ad AS... VERIFICARE!!!
|
||||
SET @CodSoggetto = 'O0000000000099999'
|
||||
|
||||
-- carico i 2 valori di default di carico e scarico da AS400
|
||||
SET @CodMovCarico = (SELECT CauCarico FROM RilPro.AnagCausaliMag)
|
||||
SET @CodMovScarico = (SELECT CauScarico FROM RilPro.AnagCausaliMag)
|
||||
|
||||
-- inizio cursore!
|
||||
OPEN RigaMovMag
|
||||
FETCH NEXT FROM RigaMovMag
|
||||
INTO @IdxBatch
|
||||
WHILE @@FETCH_STATUS = 0
|
||||
BEGIN
|
||||
-- controllo ci sia la riga
|
||||
IF (SELECT COUNT(IdxBatch) FROM AS400_BatchMovimenti WHERE IdxBatch = @IdxBatch) > 0
|
||||
BEGIN
|
||||
-- carico valori che mi servono
|
||||
SELECT @Particolare=bm.Particolare, @Causale=CASE WHEN bm.Quantita>0 THEN @CodMovCarico ELSE @CodMovScarico END,
|
||||
@CodMag=bm.CodMagAS, @Qta = ABS(bm.Quantita), @Data=dbo.dateToAsFormat(GETDATE()), @RIFFO=dbo.getUdcComp(bm.UDC,8)
|
||||
FROM AS400_BatchMovimenti bm
|
||||
WHERE IdxBatch = @IdxBatch
|
||||
|
||||
-- Eseguo la stored che registra il Packing List ???
|
||||
Execute BatchQueue.stp_registraMovMag @CodSoggetto, @Causale, @Particolare, @CodMag, @Qta, @Data, @RIFFO
|
||||
|
||||
-- registro la data del movimento BATCH
|
||||
UPDATE AS400_BatchMovimenti SET DataBatch = GETDATE() WHERE IdxBatch = @IdxBatch
|
||||
|
||||
FETCH NEXT FROM RigaMovMag INTO @IdxBatch
|
||||
END
|
||||
END
|
||||
CLOSE RigaMovMag
|
||||
DEALLOCATE RigaMovMag
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/*
|
||||
* STORED stp_processaCodaMovimPackList
|
||||
*
|
||||
* Processa la coda delle packing list e chiama procedura x salvataggio dato su AS400
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.22
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE BatchQueue.stp_processaCodaMovimPackList
|
||||
AS
|
||||
|
||||
-- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!!
|
||||
|
||||
-- campi x cursore e valorizzazione riga a riga
|
||||
DECLARE @IdxRiga INT
|
||||
DECLARE @CodLista NVARCHAR(12)
|
||||
DECLARE @CodListaPre NVARCHAR(12)
|
||||
DECLARE @CodStab CHAR(2)
|
||||
DECLARE @UDC NVARCHAR(15)
|
||||
DECLARE @Particolare NVARCHAR(15)
|
||||
DECLARE @CodImb NVARCHAR(15)
|
||||
DECLARE @Matr INT
|
||||
DECLARE @Tipo NVARCHAR(2)
|
||||
DECLARE @Dest NVARCHAR(10)
|
||||
DECLARE @Qta INT
|
||||
DECLARE @PesoNet NUMERIC(7,3)
|
||||
DECLARE @PesoLor NUMERIC(7,3)
|
||||
DECLARE @Stato CHAR(1)
|
||||
DECLARE @Data NVARCHAR(8)
|
||||
|
||||
-- faccio una query con un cursore x processare tutte le righe da inviare ad AS400..
|
||||
DECLARE RigaPackList CURSOR FOR
|
||||
SELECT IdxRiga FROM v_datiPackingList ORDER BY CodLista
|
||||
|
||||
-- setto il codice stabilimento da inviare ad AS... VERIFICARE!!!
|
||||
SET @CodStab = '05';
|
||||
|
||||
-- imposto prima codListaPre a vuoto...
|
||||
SET @CodListaPre = '';
|
||||
-- inizio cursore!
|
||||
OPEN RigaPackList
|
||||
FETCH NEXT FROM RigaPackList
|
||||
INTO @IdxRiga
|
||||
WHILE @@FETCH_STATUS = 0
|
||||
BEGIN
|
||||
-- controllo ci sia la riga
|
||||
IF (SELECT COUNT(IdxRiga) FROM v_datiPackingList WHERE IdxRiga = @IdxRiga) > 0
|
||||
BEGIN
|
||||
-- carico valori che mi servono
|
||||
SELECT @Particolare=pl.Particolare, @UDC=UDC, @CodImb=pl.CodImballo, @Matr = pl.matrUdc, @Tipo=pl.tipo, @Dest=pl.Destinatario,
|
||||
@Qta=ABS(pl.Qta), @PesoNet=pl.PesoNetto, @PesoLor=pl.PesoTot, @Stato=pl.Stato, @Data=dbo.dateToAsFormat(pl.data),
|
||||
@CodLista=pl.CodLista
|
||||
FROM v_datiPackingList pl
|
||||
WHERE IdxRiga = @IdxRiga
|
||||
|
||||
-- Eseguo la stored che registra il Packing List ???
|
||||
Execute BatchQueue.stp_registraPackList @CodStab, @UDC, @Particolare , @CodImb , @Matr , @Tipo , @Dest , @Qta , @PesoNet , @PesoLor , @Stato , @Data
|
||||
|
||||
FETCH NEXT FROM RigaPackList INTO @IdxRiga
|
||||
|
||||
-- controllo: se la lissta precedente è diversa dall'attuale la indico come scaricata (precedente)
|
||||
IF(@CodListaPre <> @CodLista)
|
||||
BEGIN
|
||||
UPDATE ElencoListePrelievo_AS SET DataBatch = GETDATE() WHERE CodLista = @CodListaPre
|
||||
-- cambio il cod pre da confrontare
|
||||
SET @CodListaPre = @CodLista
|
||||
END
|
||||
END
|
||||
-- registro la data del movimento BATCH dell'ultima lista processata
|
||||
UPDATE ElencoListePrelievo_AS SET DataBatch = GETDATE() WHERE CodLista = @CodLista
|
||||
|
||||
END
|
||||
CLOSE RigaPackList
|
||||
DEALLOCATE RigaPackList
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_registraMovMag
|
||||
*
|
||||
* Salva il movimento di magazzino indicato
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.15
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE BatchQueue.stp_registraMovMag
|
||||
(
|
||||
@NOMUS NVARCHAR(50), -- è il nome utente
|
||||
@CDCAU NVARCHAR(2), -- è la causale del movimento
|
||||
@CDPAR NVARCHAR(15), -- codice particolare
|
||||
@CDMAG NVARCHAR(2), -- codice magazzino
|
||||
@QTMOV NUMERIC(9,2), -- quantità movimento
|
||||
@DAMOV NVARCHAR(8), -- data 8 cifre aaaammgg Data Movimento
|
||||
@RIFFO NVARCHAR(8) -- cod UDC compresso
|
||||
)
|
||||
AS
|
||||
|
||||
-- QUESTA FUNZIONA!!! DA VERIFICARE I DATI PASSATI VISTO CHE ATTUALMENTE NON FUNZIONA
|
||||
-- LA STORED CHE LA RICHIAMA-POPOLA ?
|
||||
|
||||
-- Movimentazioni Magazzino
|
||||
-- Tabella MWMV200F libreria MAZZT_AZI per test – MAZZ_AZI effettiva
|
||||
|
||||
/* -- Variabili per test senza Stored
|
||||
DECLARE @NOMUS NVARCHAR(50), -- è il nome utente
|
||||
@CDCAU NVARCHAR(2), -- è la causale del movimento
|
||||
@CDPAR NVARCHAR(15), -- codice particolare
|
||||
@CDMAG NVARCHAR(2), -- codice magazzino
|
||||
@QTMOV NUMERIC(9,2), -- quantità movimento ATTENZIONE QUESTA E' SBAGLIATA SULLA STORED
|
||||
@DAMOV NVARCHAR(8), -- data 8 cifre aaaammgg
|
||||
@RIFFO NVARCHAR(8) -- cod UDC compresso
|
||||
|
||||
-- SETTO LE VARIABILI DI PROVA PER TEST
|
||||
SET @NOMUS = N'PIPPO'
|
||||
SET @CDCAU = N'01'
|
||||
SET @CDPAR = N'P00528503817'
|
||||
SET @CDMAG = N'54'
|
||||
SET @QTMOV = 1234567.51
|
||||
SET @DAMOV = N'20100101'
|
||||
SET @RIFFO = N'UDCPROVA'
|
||||
*/
|
||||
|
||||
DECLARE @SqlOK AS INT;
|
||||
|
||||
-- inizio a dire che è andata bene e salvo in tab comandi
|
||||
SET @SqlOk = 1;
|
||||
|
||||
-- Memorizzo il comando per verifica T-SQL
|
||||
INSERT INTO RawData.AS400_Comandi
|
||||
SELECT GETDATE(), 'stp_registraMovMag',
|
||||
'INSERT INTO OPENQUERY MAZZT_AZI.MWMV200F parametri :'
|
||||
+ @NOMUS + ',' + @CDCAU + ',' + @CDPAR + ',' + @CDMAG + ',' + CONVERT(VARCHAR(20) , @QTMOV) + ',' + @DAMOV + ',' + @RIFFO, @SqlOk
|
||||
|
||||
/*
|
||||
INSERT INTO
|
||||
OPENQUERY( P65220DC,
|
||||
'
|
||||
SELECT NOMUS , CDCAU , CDPAR , CDMAG , QTMOV , DAMOV , RIFFO
|
||||
FROM MAZZT_AZI.MWMV200F
|
||||
' )
|
||||
VALUES ( @NOMUS , @CDCAU , @CDPAR , @CDMAG , @QTMOV , @DAMOV , @RIFFO )
|
||||
*/
|
||||
|
||||
|
||||
/* TEST e DELETE
|
||||
SELECT * FROM OPENQUERY( P65220DC, 'SELECT NOMUS ,CDCAU ,CDPAR ,CDMAG ,QTMOV ,DAMOV ,RIFFO FROM MAZZT_AZI.MWMV200F' )
|
||||
|
||||
DELETE
|
||||
OPENQUERY( P65220DC, 'SELECT * FROM MAZZT_AZI.MWMV200F WHERE NOMUS = ''PIPPO'' ')
|
||||
*/
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_registraPackList
|
||||
*
|
||||
* Salva i dati di packing list indicati
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.15
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE BatchQueue.stp_registraPackList
|
||||
(
|
||||
@PLREPA NVARCHAR(2), -- è il codice reparto/stabilimento (05 pressofusione)
|
||||
@PLCART NVARCHAR(15), -- UDC
|
||||
@PLARTI NVARCHAR(15), -- cod articolo
|
||||
@PLCONT NVARCHAR(15), -- cod contenitore
|
||||
@PLMATR INT, -- matricola contenitore (solo cifre finali INT)
|
||||
@PLTPAN CHAR(2), -- tipo anagrafico CLiente / FOrnitore-terzista
|
||||
@PLCDAN NVARCHAR(6), -- cod terzista / cliente
|
||||
@PLQTA INT, -- quantità
|
||||
@PLPNET NUMERIC(7, 3), -- peso netto
|
||||
@PLPLOR NUMERIC(7, 3), -- peso lordo
|
||||
@PLSTAT CHAR(1), -- stato "P" predisposto per packing list, "B" bolla stampata
|
||||
@PLDTEN INT -- data entrata merce, data di carico dell'UDC 8 cifre aaaammgg
|
||||
)
|
||||
AS
|
||||
-- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!!
|
||||
|
||||
--DECLARE @SQL AS NVARCHAR(4000);
|
||||
DECLARE @SqlOK AS INT;
|
||||
|
||||
-- inizio a dire che è andata bene e salvo in tab comandi
|
||||
SET @SqlOk = 1;
|
||||
|
||||
-- Memorizzo il comando per verifica T-SQL
|
||||
INSERT INTO RawData.AS400_Comandi
|
||||
SELECT GETDATE(), 'stp_registraPackList',
|
||||
'INSERT INTO MAZZT_DTV3.PACKL00F parametri :'
|
||||
+ @PLREPA + ', ' + @PLCART + ', ' + @PLARTI + ', ' + @PLCONT + ', ' + CAST(@PLMATR AS NVARCHAR(5)) + ', ' + @PLTPAN + ', ' + @PLCDAN + ', ' + CAST(@PLQTA AS NVARCHAR(10)) + ', ' + CAST(@PLPNET AS NVARCHAR(10)) + ', ' + CAST(@PLPLOR AS NVARCHAR(10)) + ', ' + @PLSTAT + ', ' + CAST(@PLDTEN AS NVARCHAR(8)) , @SqlOk
|
||||
|
||||
/*
|
||||
INSERT INTO
|
||||
OPENQUERY( P65220DC,
|
||||
'
|
||||
SELECT PLREPA , PLCART , PLARTI , PLCONT , PLMATR , PLTPAN , PLCDAN , PLQTA , PLPNET , PLPLOR , PLSTAT , PLDTEN
|
||||
FROM MAZZT_AZI.MWMV200F
|
||||
' )
|
||||
VALUES ( @PLREPA , @PLCART , @PLARTI , @PLCONT , CAST(@PLMATR AS NVARCHAR(5)) , @PLTPAN , @PLCDAN , CAST(@PLQTA AS NVARCHAR(10)) , CAST(@PLPNET AS NVARCHAR(10)) , CAST(@PLPLOR AS NVARCHAR(10)) , @PLSTAT , CAST(@PLDTEN AS NVARCHAR(8)) )
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
-- preparo chiamata su AS400
|
||||
SET @SQL = N' OPENQUERY( P65220DC, ''INSERT INTO MAZZT_DTV3.PACKL00F VALUES '
|
||||
SET @SQL = @SQL + @PLREPA + ', ' + @PLCART + ', ' + @PLARTI + ', ' + @PLCONT + ', '
|
||||
SET @SQL = @SQL + CAST(@PLMATR AS NVARCHAR(5)) + ', ' + @PLTPAN + ', ' + @PLCDAN + ', ' + CAST(@PLQTA AS NVARCHAR(10)) + ', '
|
||||
SET @SQL = @SQL + CAST(@PLPNET AS NVARCHAR(10)) + ', ' + CAST(@PLPLOR AS NVARCHAR(10)) + ', ' + @PLSTAT + ', '
|
||||
SET @SQL = @SQL + CAST(@PLDTEN AS NVARCHAR(8)) + ''' )'
|
||||
|
||||
EXEC dbo.sp_executesql @SQL
|
||||
*/
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(288, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,122 @@
|
||||
alter table StoricoCartellini drop
|
||||
constraint FK_StoricoEventi_AnagTipoEvento ,
|
||||
column CodEvento,
|
||||
constraint DF_StoricoEventi_CodTipoDichiaraz ,
|
||||
constraint FK_StoricoEventi_AnagTipoDichiaraz ,
|
||||
column CodTipoDichiaraz
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-10-27
|
||||
-- Description: trigger x inserimento valori in archivio storico alla cancellazione/modifica del dato
|
||||
-- =============================================
|
||||
create TRIGGER trg_storicoUDC
|
||||
ON ElencoCartellini
|
||||
AFTER DELETE,UPDATE
|
||||
AS
|
||||
BEGIN
|
||||
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||
-- interfering with SELECT statements.
|
||||
SET NOCOUNT ON;
|
||||
|
||||
-- metto in storico la posizione attuale dell'UDC (SE esiste) CANCELLATO
|
||||
INSERT INTO StoricoCartellini(DataEv, UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, CodImpianto,
|
||||
DescImpianto, CodStampo, Figura, DataFus, TurnoFus, CodImballo, CodSoggetto, NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad)
|
||||
(
|
||||
|
||||
SELECT GETDATE(), UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, CodImpianto, DescImpianto,
|
||||
CodStampo, Figura, DataFus, TurnoFus, CodImballo, CodSoggetto, NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad
|
||||
FROM deleted
|
||||
)
|
||||
|
||||
END
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_LP_exportToAs400
|
||||
*
|
||||
* esporta la lista di prelievo (e le relative righe) verso AS400 andando a copaire nelle relative tabelle _AS
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.19
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_LP_exportToAs400
|
||||
(
|
||||
@CodLista NVARCHAR(12)
|
||||
)
|
||||
AS
|
||||
|
||||
-- copio la lista (intestazione)
|
||||
INSERT INTO ElencoListePrelievo_AS(CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSoggetto, Particolare, DescParticolare,
|
||||
DisegnoGrezzo, Esponente, Figura, CodImballo, QtaTot, CodStatoLista, Destinatario)
|
||||
SELECT CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSoggetto, Particolare, DescParticolare,
|
||||
DisegnoGrezzo, Esponente, Figura, CodImballo, QtaTot, CodStatoLista, Destinatario
|
||||
FROM ElencoListePrelievo
|
||||
WHERE (CodLista = @CodLista)
|
||||
|
||||
-- copio le righe lista di dettaglio
|
||||
INSERT INTO RigheListePrelievo_AS(CodLista, UDC, Qta, Proposto, Prelevato)
|
||||
SELECT CodLista, UDC, Qta, Proposto, Prelevato
|
||||
FROM RigheListePrelievo
|
||||
WHERE (CodLista = @CodLista) AND Prelevato = 1
|
||||
|
||||
-- aggiorno le quantità passate ad AS...
|
||||
UPDATE ElencoListePrelievo_AS
|
||||
SET QtaTot = ( SELECT SUM(Qta) AS QtaTot FROM RigheListePrelievo WHERE (CodLista = @CodLista) AND Prelevato = 1 )
|
||||
WHERE (CodLista = @CodLista)
|
||||
|
||||
-- IMPORTANTE: in caso siano rimasti riferimenti ad un UDC scaricato in AS in altre liste di prelievo li tolgo in modo da "ripulirle" ed evitare che lo stesso UDC venga prelevato 2 volte...
|
||||
DELETE RLP
|
||||
FROM RigheListePrelievo RLP
|
||||
INNER JOIN ElencoListePrelievo ELP
|
||||
ON RLP.CodLista = ELP.CodLista
|
||||
WHERE ELP.CodStatoLista < 4 AND RLP.CodLista <> @CodLista AND RLP.UDC IN (
|
||||
SELECT UDC
|
||||
FROM RigheListePrelievo
|
||||
WHERE (CodLista = @CodLista) AND Prelevato = 1
|
||||
)
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(289, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,648 @@
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table AS400_MagCont add
|
||||
CodMagAS_compensaz nvarchar(50) constraint DF_AS400_MagCont_CodMagAS_compensaz default (0)
|
||||
go
|
||||
|
||||
update AS400_MagCont set CodMagAS_compensaz=0
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
-- =============================================
|
||||
-- Author: Samuele E. Locatelli
|
||||
-- Create date: 2009-09-20
|
||||
-- Description: trigger x inserimento movimenti
|
||||
-- nella coda di trasferimento batch
|
||||
-- verso AS400 x UPDATE UDC
|
||||
-- =============================================
|
||||
alter TRIGGER trg_updMovAS
|
||||
ON ElencoCartellini
|
||||
AFTER UPDATE
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- setup variabili e verbosità
|
||||
SET NOCOUNT ON;
|
||||
DECLARE @partOk AS BIT
|
||||
DECLARE @IdxPosFrom AS INT
|
||||
DECLARE @IdxPosTo AS INT
|
||||
DECLARE @magFrom AS NVARCHAR(50)
|
||||
DECLARE @magTo AS NVARCHAR(50)
|
||||
DECLARE @qta AS DECIMAL(10,2)
|
||||
DECLARE @qtaOld AS DECIMAL(10,2)
|
||||
DECLARE @IdxPosizioneComp INT
|
||||
|
||||
-- controllo che CI SIA il particolare (altrimenti non eseguo)
|
||||
SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM deleted)
|
||||
|
||||
IF(@partOk = 1)
|
||||
SET @qta = (SELECT Qta FROM inserted)
|
||||
SET @qtaOld = (SELECT Qta FROM deleted)
|
||||
-- se c'è stata modifica di quantità inizio a rettificare quella
|
||||
IF (UPDATE(Qta)) AND(@qta <> @qtaOld)
|
||||
BEGIN
|
||||
-- registro il VERO movimento
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOD', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), @qta - Qta
|
||||
FROM deleted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
-- controllo: se il magazzino di destinazione richiede una compensazione registro il 2° movimento di compensazione
|
||||
SET @IdxPosFrom = (SELECT IdxPosizione FROM deleted)
|
||||
SET @IdxPosTo = (SELECT IdxPosizione FROM inserted)
|
||||
-- calcolo il mag di compensazione
|
||||
SET @IdxPosizioneComp = (SELECT CAST(ISNULL(CodMagAS_compensaz,0) AS INT) FROM AS400_MagCont WHERE (Attivo = 1) AND (CodMagAS = CAST(@IdxPosFrom AS NVARCHAR(50))))
|
||||
IF (@IdxPosizioneComp > 0)
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_COMP', Particolare, UDC, CAST(@IdxPosizioneComp AS NVARCHAR(50)), Qta - @qta
|
||||
FROM deleted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
END
|
||||
|
||||
-- controllo poi se sia cambiato il magazzino, altrimenti non lo inserisco
|
||||
IF UPDATE(IdxPosizione)
|
||||
BEGIN
|
||||
-- Prendo le posizioni di magazzino precedente e nuova
|
||||
SET @IdxPosFrom = (SELECT IdxPosizione FROM deleted)
|
||||
SET @IdxPosTo = (SELECT IdxPosizione FROM inserted)
|
||||
-- Le trasformo nelle equivalenti stringhe del codMag SE attive
|
||||
SET @magFrom = (SELECT ISNULL(CodMagAS,'---') FROM AS400_MagCont WHERE Attivo = 1 AND CodMagAs = CAST(@IdxPosFrom AS NVARCHAR(50)))
|
||||
SET @magTo = (SELECT ISNULL(CodMagAS,'---') FROM AS400_MagCont WHERE Attivo = 1 AND CodMagAs = CAST(@IdxPosTo AS NVARCHAR(50)))
|
||||
|
||||
-- inserisco un movimento di deposito verso mag nuovo (SE attivo)
|
||||
IF (@magFrom <> '---')
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOV', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), -@qta
|
||||
FROM deleted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
-- inserisco un movimento di prelievo verso mag vecchio (SE attivo)
|
||||
IF (@magTo <> '---')
|
||||
BEGIN
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita)
|
||||
(
|
||||
SELECT GETDATE(), 'UDC_MOV', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), @qta
|
||||
FROM inserted
|
||||
WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1)
|
||||
)
|
||||
END
|
||||
END
|
||||
|
||||
END
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
UPDATE dbo.AS400_MagCont SET
|
||||
CodMagAS_compensaz=N'84'
|
||||
WHERE CodMagAS=N'54'
|
||||
UPDATE dbo.AS400_MagCont SET
|
||||
CodMagAS_compensaz=N'84'
|
||||
WHERE CodMagAS=N'88'
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
create VIEW v_specParticolari
|
||||
AS
|
||||
SELECT DISTINCT TOP (100) PERCENT CodCliente, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, CodStampo, Figura
|
||||
FROM dbo.ElencoCartellini
|
||||
WHERE (NOT (Particolare IS NULL)) AND (NOT (DisegnoGrezzo IS NULL))
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "ElencoCartellini"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 246
|
||||
Bottom = 322
|
||||
Right = 416
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 9
|
||||
Width = 284
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
Width = 1500
|
||||
End
|
||||
End
|
||||
Begin CriteriaPane =
|
||||
Begin ColumnWidths = 11
|
||||
Column = 1440
|
||||
Alias = 900
|
||||
Table = 1170
|
||||
Output = 720
|
||||
Append = 1400
|
||||
NewValue = 1170
|
||||
SortType = 1350
|
||||
SortOrder = 1410
|
||||
GroupBy = 1350
|
||||
Filter = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
Or = 1350
|
||||
End
|
||||
End
|
||||
End
|
||||
', 'SCHEMA', 'dbo', 'VIEW', 'v_specParticolari'
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_DiagramPaneCount', 1, 'SCHEMA', 'dbo', 'VIEW', 'v_specParticolari'
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/*(
|
||||
* STORED stp_ParticolariGetLike
|
||||
*
|
||||
* elenco dei particolari con ricerca LIKE
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.07.07
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_ParticolariGetLike
|
||||
(
|
||||
@searchVal VARCHAR(50),
|
||||
@CodCS VARCHAR(2)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT RilPro.AnagParticolari.*
|
||||
FROM RilPro.AnagParticolari
|
||||
WHERE (RilPro.AnagParticolari.CodCS = @CodCS) AND (RilPro.AnagParticolari.Particolare LIKE '%' + @searchVal + '%')
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_SpecParticolare
|
||||
*
|
||||
* ottiene il dettaglio delle specifiche di un particolare dato il suo codice
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.29
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_SpecParticolare
|
||||
(
|
||||
@Particolare NVARCHAR(15)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT *
|
||||
FROM v_specParticolari
|
||||
WHERE Particolare=@Particolare
|
||||
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UDC_updateQty
|
||||
*
|
||||
* aggiorna un cartellino x la sua quantità
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.06.12
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_UDC_updateQty
|
||||
(
|
||||
@UDC VARCHAR(20),
|
||||
@CodSoggetto VARCHAR(17),
|
||||
@CodTipoDichiaraz CHAR(1),
|
||||
@CodEvento VARCHAR(10),
|
||||
@Qta DECIMAL(10,2)
|
||||
)
|
||||
AS
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Ciclo principale x edit record
|
||||
------------------------------------------------------------------------------------------------------
|
||||
BEGIN TRAN
|
||||
|
||||
/*
|
||||
-- registro in StoricoCartellini
|
||||
INSERT INTO StoricoCartellini(DataEv, CodEvento, CodTipoDichiaraz, UDC, CodCS,CodCliente, RagSociale, Particolare, DescParticolare,
|
||||
DisegnoGrezzo, Esponente, CodImpianto, DescImpianto, CodStampo, Figura, DataFus, TurnoFus, CodImballo, CodSoggetto,
|
||||
NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad)
|
||||
SELECT GETDATE() AS DataEv, @CodEvento AS CodEvento, @CodTipoDichiaraz AS CodTipoDichiaraz, UDC, CodCS,
|
||||
CodCliente, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, CodImpianto, DescImpianto, CodStampo, Figura,
|
||||
DataFus, TurnoFus, CodImballo, @CodSoggetto AS CodSoggetto, NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad
|
||||
FROM ElencoCartellini
|
||||
WHERE (UDC = @UDC)
|
||||
*/
|
||||
|
||||
-- modifico il record
|
||||
UPDATE ElencoCartellini
|
||||
SET Qta = @Qta, ModDate = GETDATE()
|
||||
WHERE UDC = @UDC
|
||||
|
||||
COMMIT TRAN
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- restituisco la tab dati con l'udc appena inserito
|
||||
------------------------------------------------------------------------------------------------------
|
||||
SELECT *
|
||||
FROM ElencoCartellini
|
||||
WHERE UDC = @UDC
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
alter VIEW v_selDestinatariListePrelievo
|
||||
AS
|
||||
SELECT CAST('*' AS NVARCHAR(6)) AS value, CAST('*' AS NVARCHAR(50)) AS label, '01-PreFus' AS conditio
|
||||
UNION
|
||||
SELECT CAST(CodCliente AS NVARCHAR(6)) AS value, CAST(RagSociale AS NVARCHAR(50)) AS label, '02-PreCli' AS conditio
|
||||
FROM RilPro.AnagClienti
|
||||
UNION
|
||||
SELECT CAST(CodTerzista AS NVARCHAR(6)) AS value, CAST(DescTerzista AS NVARCHAR(50)) AS label, '03-TerWip' AS conditio
|
||||
FROM RilPro.AnagDepositi
|
||||
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 = 9
|
||||
Width = 284
|
||||
Width = 1500
|
||||
Width = 3360
|
||||
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_selDestinatariListePrelievo'
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_rettMovAs400
|
||||
*
|
||||
* inserisce nella tabella per i trasferimenti batch verso magazzino AS una quantità di rettifica (con segno - )per UDC eventualmente già scaricati a sistema
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.11.02
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_rettMovAs400
|
||||
(
|
||||
@Particolare NVARCHAR(50),
|
||||
@UDC NVARCHAR(20),
|
||||
@CodMagAS NVARCHAR(50),
|
||||
@Qta DECIMAL(10,2)
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN
|
||||
|
||||
INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita)
|
||||
VALUES (GETDATE(), 'UDC_NOQTY', @Particolare, @UDC, @CodMagAS, -@Qta)
|
||||
|
||||
END
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_selDestListePrelByConditio
|
||||
*
|
||||
* Ottiene i destinatari delle liste di prelievo data la condizione indicata
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.11.02
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE stp_selDestListePrelByConditio
|
||||
(
|
||||
@conditio NVARCHAR(20)
|
||||
)
|
||||
AS
|
||||
|
||||
IF (@conditio='01-PreFus')
|
||||
BEGIN
|
||||
SELECT CAST('*' AS NVARCHAR(6)) AS value, CAST('*' AS NVARCHAR(50)) AS label, '01-PreFus' AS conditio
|
||||
END
|
||||
|
||||
ELSE IF (@conditio='02-PreCli')
|
||||
BEGIN
|
||||
SELECT CAST(CodCliente AS NVARCHAR(6)) AS value, CAST(RagSociale AS NVARCHAR(50)) AS label, '02-PreCli' AS conditio
|
||||
FROM RilPro.AnagClienti
|
||||
ORDER BY label
|
||||
END
|
||||
|
||||
ELSE
|
||||
BEGIN
|
||||
SELECT CAST(CodTerzista AS NVARCHAR(6)) AS value, CAST(DescTerzista AS NVARCHAR(50)) AS label, '03-TerWip' AS conditio
|
||||
FROM RilPro.AnagDepositi
|
||||
ORDER BY label
|
||||
END
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(290, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,299 @@
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
alter table RigheListePrelievo_AS add
|
||||
DataBatch datetime
|
||||
go
|
||||
|
||||
exec sp_addextendedproperty 'MS_Description', 'dataora di caricamento batch verso AS', 'SCHEMA', 'dbo', 'TABLE', 'RigheListePrelievo_AS', 'COLUMN', 'DataBatch'
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/*****************************************
|
||||
* STORED stp_processaCodaMovimPackList
|
||||
*
|
||||
* Processa la coda delle packing list e chiama procedura x salvataggio dato su AS400
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.10.22
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE BatchQueue.stp_processaCodaMovimPackList
|
||||
AS
|
||||
|
||||
-- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!!
|
||||
|
||||
-- campi x cursore e valorizzazione riga a riga
|
||||
DECLARE @IdxRiga INT
|
||||
DECLARE @CodLista NVARCHAR(12)
|
||||
DECLARE @CodListaPre NVARCHAR(12)
|
||||
DECLARE @CodStab CHAR(2)
|
||||
DECLARE @UDC NVARCHAR(15)
|
||||
DECLARE @Particolare NVARCHAR(15)
|
||||
DECLARE @CodImb NVARCHAR(15)
|
||||
DECLARE @Matr INT
|
||||
DECLARE @Tipo NVARCHAR(2)
|
||||
DECLARE @Dest NVARCHAR(10)
|
||||
DECLARE @Qta INT
|
||||
DECLARE @PesoNet NUMERIC(7,3)
|
||||
DECLARE @PesoLor NUMERIC(7,3)
|
||||
DECLARE @Stato CHAR(1)
|
||||
DECLARE @Data NVARCHAR(8)
|
||||
|
||||
DECLARE @ScritturaRigaOK AS INT -- Flag errore su riga ritornato da Stored che va su As400 0 = Ok
|
||||
SET @ScritturaRigaOK = 0;
|
||||
|
||||
DECLARE @ScritturaASOK AS INT -- Flag errore Packing generale su Stored che va su As400 0 = Ok
|
||||
SET @ScritturaASOK = 0;
|
||||
|
||||
-- qui è meglio usare una tabella temporanea o ancor meglio una variabile tabella x pochi
|
||||
-- record per non bloccare le tabelle sottostanti
|
||||
-- query con un cursore x processare tutte le righe di Packing che sono ancora da inviare ad AS400 ( DataBatch IS NULL )
|
||||
DECLARE RigaPackList CURSOR LOCAL FOR
|
||||
SELECT IdxRiga, CodLista FROM v_datiPackingList ORDER BY CodLista
|
||||
|
||||
-- setto il codice stabilimento da inviare ad AS... VERIFICARE!!!
|
||||
SET @CodStab = '05';
|
||||
|
||||
-- imposto prima codListaPre a vuoto...
|
||||
SET @CodListaPre = '';
|
||||
|
||||
-- inizio cursore caricando le righe
|
||||
OPEN RigaPackList
|
||||
FETCH NEXT FROM RigaPackList
|
||||
INTO @IdxRiga , @CodLista
|
||||
|
||||
SET @CodListaPre = @CodLista
|
||||
|
||||
WHILE @@FETCH_STATUS = 0
|
||||
BEGIN
|
||||
-- controllo ci sia almento una riga di Packing ( PER ME NON SERVE )
|
||||
IF (SELECT COUNT(IdxRiga) FROM v_datiPackingList WHERE IdxRiga = @IdxRiga) > 0
|
||||
BEGIN
|
||||
-- carico valori che mi servono
|
||||
SELECT @Particolare=pl.Particolare, @UDC=UDC, @CodImb=pl.CodImballo, @Matr = pl.matrUdc, @Tipo=pl.tipo, @Dest=pl.Destinatario,
|
||||
@Qta=ABS(pl.Qta), @PesoNet=pl.PesoNetto, @PesoLor=pl.PesoTot, @Stato=pl.Stato, @Data=dbo.dateToAsFormat(pl.data),
|
||||
@CodLista=pl.CodLista
|
||||
FROM v_datiPackingList pl
|
||||
WHERE IdxRiga = @IdxRiga
|
||||
|
||||
-- Eseguo la stored che registra la Packing List con le righe sue righe
|
||||
EXECUTE @ScritturaRigaOK = BatchQueue.stp_registraPackList @CodStab, @UDC, @Particolare , @CodImb , @Matr , @Tipo , @Dest , @Qta , @PesoNet , @PesoLor , @Stato , @Data
|
||||
|
||||
-- se scrittura riga è ok allora salvo sulla riga la data di invio... così poi non la rivedo tra quelle da processare...
|
||||
IF @ScritturaRigaOK = 0
|
||||
UPDATE RigheListePrelievo_AS SET DataBatch = GETDATE() WHERE IdxRiga = @IdxRiga;
|
||||
|
||||
|
||||
-- Se scrittura Riga Packing non ok metto Flag Packing list non Ok
|
||||
IF @ScritturaRigaOK <> 0 SET @ScritturaASOK = @ScritturaRigaOK
|
||||
|
||||
FETCH NEXT FROM RigaPackList
|
||||
INTO @IdxRiga , @CodLista
|
||||
|
||||
-- controllo: se la lista precedente è diversa dall'attuale la indico come scaricata (precedente)
|
||||
IF(@CodListaPre <> @CodLista)
|
||||
BEGIN
|
||||
-- ATTENZIONE!!! Qui è da controllare perchè lo faccio una sola volta per la
|
||||
-- lista e non per riga prelievo ... boh non so se ok ... se UDC già presente in As400 errore 7343
|
||||
IF @ScritturaASOK = 0
|
||||
UPDATE ElencoListePrelievo_AS SET DataBatch = GETDATE() WHERE CodLista = @CodListaPre;
|
||||
ELSE
|
||||
SET @ScritturaASOK = 0; -- resetto il flag di controllo
|
||||
|
||||
-- cambio il cod pre da confrontare
|
||||
SET @CodListaPre = @CodLista
|
||||
END
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
-- Aggiorno anche l'ultima lista prelievo
|
||||
-- **** è corretto ??? se poi ricarico tutto il Packing list che succede???
|
||||
-- x gli UDC già in AS400 da errore 7343
|
||||
IF @ScritturaASOK = 0 -- OR @ScritturaASOK = 7343 ???
|
||||
UPDATE ElencoListePrelievo_AS SET DataBatch = GETDATE() WHERE CodLista = @CodLista
|
||||
-- registro la data del movimento BATCH dell'ultima lista processata
|
||||
|
||||
-- se c'è un errore mi rimane aperto il cursore? nn dovrebbe perchè LOCAL
|
||||
CLOSE RigaPackList
|
||||
DEALLOCATE RigaPackList
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
alter VIEW v_datiPackingList
|
||||
AS
|
||||
SELECT dbo.ElencoListePrelievo_AS.CodLista, dbo.RigheListePrelievo_AS.IdxRiga, dbo.ElencoCartellini.UDC, dbo.ElencoListePrelievo_AS.Particolare,
|
||||
dbo.ElencoCartellini.CodImballo, CAST(RIGHT(LTRIM(dbo.RigheListePrelievo_AS.UDC), 6) AS INT) AS matrUdc,
|
||||
CASE WHEN (dbo.ElencoListePrelievo_AS.CodTipoLista = '03-TerWip') THEN 'FO' ELSE 'CL' END AS tipo, dbo.ElencoListePrelievo_AS.Destinatario,
|
||||
dbo.ElencoCartellini.Qta, ROUND(dbo.ElencoCartellini.PesoTot - dbo.ElencoCartellini.Tara, 3) AS PesoNetto, ROUND(dbo.ElencoCartellini.PesoTot, 3) AS PesoTot,
|
||||
'P' AS Stato, GETDATE() AS data, dbo.RigheListePrelievo_AS.DataBatch
|
||||
FROM dbo.ElencoListePrelievo_AS INNER JOIN
|
||||
dbo.RigheListePrelievo_AS ON dbo.ElencoListePrelievo_AS.CodLista = dbo.RigheListePrelievo_AS.CodLista INNER JOIN
|
||||
dbo.ElencoCartellini ON dbo.RigheListePrelievo_AS.UDC = dbo.ElencoCartellini.UDC
|
||||
WHERE (dbo.RigheListePrelievo_AS.DataBatch IS NULL)
|
||||
go
|
||||
|
||||
exec sp_updateextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||||
Begin DesignProperties =
|
||||
Begin PaneConfigurations =
|
||||
Begin PaneConfiguration = 0
|
||||
NumPanes = 4
|
||||
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
|
||||
End
|
||||
Begin PaneConfiguration = 1
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 2
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 3
|
||||
NumPanes = 3
|
||||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 4
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [56] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 5
|
||||
NumPanes = 2
|
||||
Configuration = "(H (2 [66] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 6
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [50] 3))"
|
||||
End
|
||||
Begin PaneConfiguration = 7
|
||||
NumPanes = 1
|
||||
Configuration = "(V (3))"
|
||||
End
|
||||
Begin PaneConfiguration = 8
|
||||
NumPanes = 3
|
||||
Configuration = "(H (1[56] 4[18] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 9
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1 [75] 4))"
|
||||
End
|
||||
Begin PaneConfiguration = 10
|
||||
NumPanes = 2
|
||||
Configuration = "(H (1[66] 2) )"
|
||||
End
|
||||
Begin PaneConfiguration = 11
|
||||
NumPanes = 2
|
||||
Configuration = "(H (4 [60] 2))"
|
||||
End
|
||||
Begin PaneConfiguration = 12
|
||||
NumPanes = 1
|
||||
Configuration = "(H (1) )"
|
||||
End
|
||||
Begin PaneConfiguration = 13
|
||||
NumPanes = 1
|
||||
Configuration = "(V (4))"
|
||||
End
|
||||
Begin PaneConfiguration = 14
|
||||
NumPanes = 1
|
||||
Configuration = "(V (2))"
|
||||
End
|
||||
ActivePaneConfig = 0
|
||||
End
|
||||
Begin DiagramPane =
|
||||
Begin Origin =
|
||||
Top = 0
|
||||
Left = 0
|
||||
End
|
||||
Begin Tables =
|
||||
Begin Table = "ElencoListePrelievo_AS"
|
||||
Begin Extent =
|
||||
Top = 6
|
||||
Left = 38
|
||||
Bottom = 367
|
||||
Right = 238
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "ElencoCartellini"
|
||||
Begin Extent =
|
||||
Top = 14
|
||||
Left = 658
|
||||
Bottom = 376
|
||||
Right = 828
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
Begin Table = "RigheListePrelievo_AS"
|
||||
Begin Extent =
|
||||
Top = 5
|
||||
Left = 353
|
||||
Bottom = 200
|
||||
Right = 557
|
||||
End
|
||||
DisplayFlags = 280
|
||||
TopColumn = 0
|
||||
End
|
||||
End
|
||||
End
|
||||
Begin SQLPane =
|
||||
End
|
||||
Begin DataPane =
|
||||
Begin ParameterDefaults = ""
|
||||
End
|
||||
Begin ColumnWidths = 15
|
||||
Width = 284
|
||||
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_datiPackingList'
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(291, GETDATE())
|
||||
GO
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user