Aggiunto progetto x Carlo RItter x caricare dati in remoto
This commit is contained in:
@@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>DataUploader</RootNamespace>
|
||||
<AssemblyName>DataUploader</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Default.aspx" />
|
||||
<Content Include="DemoPage.aspx" />
|
||||
<Content Include="FullSync.aspx" />
|
||||
<Content Include="SyncDoc.aspx" />
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Default.aspx.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Default.aspx.designer.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DemoPage.aspx.cs">
|
||||
<DependentUpon>DemoPage.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DemoPage.aspx.designer.cs">
|
||||
<DependentUpon>DemoPage.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FullSync.aspx.cs">
|
||||
<DependentUpon>FullSync.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FullSync.aspx.designer.cs">
|
||||
<DependentUpon>FullSync.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GestData.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SyncDoc.aspx.cs">
|
||||
<DependentUpon>SyncDoc.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SyncDoc.aspx.designer.cs">
|
||||
<DependentUpon>SyncDoc.aspx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
<None Include="Web.Release.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>0</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:52172/</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<!-- 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,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<StartPageUrl>
|
||||
</StartPageUrl>
|
||||
<StartAction>CurrentPage</StartAction>
|
||||
<AspNetDebugging>True</AspNetDebugging>
|
||||
<SilverlightDebugging>False</SilverlightDebugging>
|
||||
<NativeDebugging>False</NativeDebugging>
|
||||
<SQLDebugging>False</SQLDebugging>
|
||||
<ExternalProgram>
|
||||
</ExternalProgram>
|
||||
<StartExternalURL>
|
||||
</StartExternalURL>
|
||||
<StartCmdLineArguments>
|
||||
</StartCmdLineArguments>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<EnableENC>False</EnableENC>
|
||||
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
@@ -0,0 +1,31 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DataUploader.Default" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
<h1>WebSCR DataUploader</h1>
|
||||
<i>Pagina di riferimento per progetto upload dati da Sigla++ Trony Rigamonti a WebSCR@steamware</i>
|
||||
<br />
|
||||
<br />
|
||||
Per effettuare test utilizzare la <a href="DemoPage.aspx">Demo Page</a>
|
||||
<br />
|
||||
Per l'uso in produzione / continuativo vanno richiamate
|
||||
<ul>
|
||||
<li>periodicamente la pagina di <b>FullSync</b></li>
|
||||
<li>su richiesta utente la pagina di <b>SyncDoc</b></li>
|
||||
</ul>
|
||||
<i>NB: tutte le configurazioni sono tutte contenute le file web.config</i>
|
||||
<i>NB: il demo punta a db access di esempio e non a DB2</i>
|
||||
<div style="border-top: 1px solid #696969; text-align:right;margin-top:40px;">
|
||||
@2015-<%: DateTime.Now.Year %> Steamware
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace DataUploader
|
||||
{
|
||||
public partial class Default : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+26
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DataUploader
|
||||
{
|
||||
|
||||
|
||||
public partial class Default
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DemoPage.aspx.cs" Inherits="DataUploader.DemoPage" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
<h1>DemoPage</h1>
|
||||
In questa pagina è riassunt la logica di chiamata delle altre pagine ed il funzionamento.
|
||||
<br />
|
||||
<hr />
|
||||
<br />
|
||||
<h2>FullSync</h2>
|
||||
Questa è la pagina da chiamare periodicamente (esecuzione automatica?) in modo da effettuare il sync periodico dei dati da sigla ad online.
|
||||
<br />
|
||||
Il ciclo prevede i seguenti step:
|
||||
<ul>
|
||||
<li>Chiamata a sito remoto x avere codice dell'ultimo doc caricato (NUMERO univoco)</li>
|
||||
<li>Chiamata a server DB2 locale x avere TUTTI i documenti "successivi"</li>
|
||||
<li>Chiamata di invio dati per ogni documento non ancora caricato (e per ogni cliente per update)</li>
|
||||
</ul>
|
||||
il tutto viene fatto tramite la classe helper GestData
|
||||
<br />
|
||||
Demo: <a href="FullSync.aspx">FullSync.aspx</a>
|
||||
<br />
|
||||
<hr />
|
||||
<br />
|
||||
<h2>SyncDoc</h2>
|
||||
Questa è la pagina da chiamare SU RICHIESTA UTENTE in modo da effettuare il sync PUNTUALE dei dati da sigla ad online per uno specifico documento.
|
||||
<br />
|
||||
Il ciclo prevede i seguenti step:
|
||||
<ul>
|
||||
<li>La pagina riceve un parametro del codice documento richiesto (TIPOPROTOC = OC/DC + NUMPROTOC incrementale annuale)</li>
|
||||
<li>Chiamata a server DB2 locale x avere dati del documento</li>
|
||||
<li>Chiamata di invio dati per documento e per il cliente correlato</li>
|
||||
</ul>
|
||||
il tutto viene fatto tramite la classe helper GestData
|
||||
<br />
|
||||
Demo: <a href="SyncDoc.aspx?DOC=OC0001616">SyncDoc.aspx?DOC=OC0001616</a>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace DataUploader
|
||||
{
|
||||
public partial class DemoPage : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+26
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DataUploader
|
||||
{
|
||||
|
||||
|
||||
public partial class DemoPage
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FullSync.aspx.cs" Inherits="DataUploader.FullSync" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
<h1>FullSync</h1>
|
||||
Modalità chiamata:
|
||||
<ul>
|
||||
<li>Senza parametri: effettua tutte le chiamate remote</li>
|
||||
<li>Con aggiunto il parametro "?DemoMode=true" nell'url --> NON viene chiamata (per ogni record) la pagina remota ma viene mostrato l'elenco delle chiamate che SI SAREBBERO EFFETTUATE</li>
|
||||
</ul>
|
||||
<hr />
|
||||
<h2>OUTPUT</h2>
|
||||
<asp:Label runat="server" ID="lblOut" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace DataUploader
|
||||
{
|
||||
public partial class FullSync : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// verifico se vado in modalità demo o meno...
|
||||
bool demoMode = false;
|
||||
try
|
||||
{
|
||||
demoMode = Convert.ToBoolean(Request.QueryString["DemoMode"]);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// recupero ultimo numero doc caricato...
|
||||
int lastNum = 0;
|
||||
try
|
||||
{
|
||||
var client = new WebClient();
|
||||
var content = client.DownloadString(ConfigurationManager.AppSettings["remoteDocUrl"]); // http://webscr.steamware.net/Rigamonti/Upload/Document
|
||||
// converto a int!
|
||||
lastNum = Convert.ToInt32(content);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// recupero i dati da caricare...
|
||||
string[] urlsUpdate = GestData.proc.getNewDocsUrls(lastNum);
|
||||
if (demoMode)
|
||||
{
|
||||
lblOut.Text = string.Format("DEMO MODE!<br/>ultimo NUMERO: {0}", lastNum);
|
||||
for (int i = 0; i < urlsUpdate.Length; i++)
|
||||
{
|
||||
lblOut.Text += string.Format("<br/>{0:000}) {1}", i + 1, urlsUpdate[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblOut.Text = string.Format("Normal MODE!<br/>{0}", lastNum);
|
||||
var client = new WebClient();
|
||||
for (int i = 0; i < urlsUpdate.Length; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
var content = client.DownloadString(urlsUpdate[i]);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+33
@@ -0,0 +1,33 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DataUploader {
|
||||
|
||||
|
||||
public partial class FullSync {
|
||||
|
||||
/// <summary>
|
||||
/// form1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// lblOut control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblOut;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Configuration;
|
||||
|
||||
namespace DataUploader
|
||||
{
|
||||
public class GestData
|
||||
{
|
||||
protected GestData()
|
||||
{
|
||||
setupConnString();
|
||||
}
|
||||
/// <summary>
|
||||
/// configurazione stringa connesisone dati
|
||||
/// </summary>
|
||||
private void setupConnString()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static GestData proc = new GestData();
|
||||
|
||||
/// <summary>
|
||||
/// restituisce un array di stringhe URL da chiamare per caricare i dati documento / cliente
|
||||
/// </summary>
|
||||
/// <param name="numeroFrom">numero ultimo doc caricato (restituirà docs successivi)</param>
|
||||
/// <returns></returns>
|
||||
public string[] getNewDocsUrls(int numeroFrom)
|
||||
{
|
||||
int maxDocsToUpload = Convert.ToInt32(ConfigurationManager.AppSettings["maxDocsToUpload"]);
|
||||
string[] answ = new string[maxDocsToUpload * 2]; // 2 stringhe, una x doc e 1 x cliente x ogni invio...
|
||||
//int i = 0;
|
||||
// effettuo chiamata ODBC e recupero dati
|
||||
|
||||
// per ogni record trovato compongo un record DOCS ed uno CLI
|
||||
|
||||
string[] rDoc = new string[19];
|
||||
string[] rCli = new string[11];
|
||||
for (int i = 0; i < 19; i++)
|
||||
{
|
||||
rDoc[i] = "";
|
||||
}
|
||||
for (int i = 0; i < 11; i++)
|
||||
{
|
||||
rCli[i] = "";
|
||||
}
|
||||
// formatto answ...
|
||||
answ[0] = createUrlDoc(rDoc);
|
||||
answ[1] = createUrlCli(rCli);
|
||||
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce un array di stringhe URL da chiamare per caricare i dati documento / cliente
|
||||
/// </summary>
|
||||
/// <param name="CodDoc">Codice docuemnto richiesto</param>
|
||||
/// <returns></returns>
|
||||
public string[] getDocsUrls(string CodDoc)
|
||||
{
|
||||
string[] answ = new string[2]; // 2 stringhe, una x doc e 1 x cliente x ogni invio...
|
||||
// effettuo chaimata ODBC e recupero dati
|
||||
|
||||
// per ogni record trovato compongo un record DOCS ed uno CLI
|
||||
string[] rDoc = new string[19];
|
||||
string[] rCli = new string[11];
|
||||
|
||||
// formatto answ...
|
||||
answ[0] = createUrlDoc(rDoc);
|
||||
answ[1] = createUrlCli(rCli);
|
||||
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// crea url formattato x upload DOC
|
||||
/// </summary>
|
||||
/// <param name="rDoc"></param>
|
||||
/// <returns></returns>
|
||||
protected string createUrlDoc(string[] rDoc)
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = string.Format(@"{0}?TIPOPROTOC={1}&NUMERO={2}&ESERPROTOC={3}&NUMEPROTOC={4}&DATAPROTOC={5}&ESERRIFERI={6}&NUMERIFERI={7}&TIPORIFERI={8}&DATARIFERI={9}&NUMEDOCRIF={10}&DATADOCRIF={11}&ESERCOLLEG={12}&CLI_FOR={13}&DESTINATAR={14}&RGSOC_DEST={15}&INDIR_DEST={16}&LOCAL_DEST={17}&CAP_DEST={18}&ULT_AGG={19}", ConfigurationManager.AppSettings["remoteDocUrl"], rDoc[0], rDoc[1], rDoc[2], rDoc[3], rDoc[4], rDoc[5], rDoc[6], rDoc[7], rDoc[8], rDoc[9], rDoc[10], rDoc[11], rDoc[12], rDoc[13], rDoc[14], rDoc[15], rDoc[16], rDoc[17], rDoc[18]);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// crea url formattato x upload CLI
|
||||
/// </summary>
|
||||
/// <param name="rCli"></param>
|
||||
/// <returns></returns>
|
||||
protected string createUrlCli(string[] rCli)
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = string.Format("{0}?CodCliente={1}&RagSoc={2}&CodFis={3}&Tel={4}&Cell={5}&EnableSMS=1&Email={6}&Indir={7}&Cap={8}&Localita={9}&Prov={10}&Note={11}", ConfigurationManager.AppSettings["remoteCliUrl"], rCli[0], rCli[1], rCli[2], rCli[3], rCli[4], rCli[5], rCli[6], rCli[7], rCli[8], rCli[9], rCli[10]);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
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("DataUploader")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DataUploader")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[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("adeaea23-a27d-45ed-8fd3-1d60223f72a8")]
|
||||
|
||||
// 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 Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,16 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SyncDoc.aspx.cs" Inherits="DataUploader.SyncDoc" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace DataUploader
|
||||
{
|
||||
public partial class SyncDoc : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+26
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DataUploader
|
||||
{
|
||||
|
||||
|
||||
public partial class SyncDoc
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<!--
|
||||
In the example below, the "SetAttributes" transform will change the value of
|
||||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
||||
finds an attribute "name" that has a value of "MyDB".
|
||||
|
||||
<connectionStrings>
|
||||
<add name="MyDB"
|
||||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
</connectionStrings>
|
||||
-->
|
||||
<system.web>
|
||||
<!--
|
||||
In the example below, the "Replace" transform will replace the entire
|
||||
<customErrors> section of your web.config file.
|
||||
Note that because there is only one customErrors section under the
|
||||
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
||||
|
||||
<customErrors defaultRedirect="GenericError.htm"
|
||||
mode="RemoteOnly" xdt:Transform="Replace">
|
||||
<error statusCode="500" redirect="InternalError.htm"/>
|
||||
</customErrors>
|
||||
-->
|
||||
</system.web>
|
||||
</configuration>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<!--
|
||||
In the example below, the "SetAttributes" transform will change the value of
|
||||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
||||
finds an attribute "name" that has a value of "MyDB".
|
||||
|
||||
<connectionStrings>
|
||||
<add name="MyDB"
|
||||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
</connectionStrings>
|
||||
-->
|
||||
<system.web>
|
||||
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
||||
<!--
|
||||
In the example below, the "Replace" transform will replace the entire
|
||||
<customErrors> section of your web.config file.
|
||||
Note that because there is only one customErrors section under the
|
||||
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
||||
|
||||
<customErrors defaultRedirect="GenericError.htm"
|
||||
mode="RemoteOnly" xdt:Transform="Replace">
|
||||
<error statusCode="500" redirect="InternalError.htm"/>
|
||||
</customErrors>
|
||||
-->
|
||||
</system.web>
|
||||
</configuration>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
For more information on how to configure your ASP.NET application, please visit
|
||||
http://go.microsoft.com/fwlink/?LinkId=169433
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<!--parametri base-->
|
||||
<add key="maxDocsToUpload" value="50" />
|
||||
<add key="remoteDocUrl" value="http://webscr.steamware.net/Rigamonti/Upload/Document" />
|
||||
<add key="remoteCliUrl" value="http://webscr.steamware.net/Rigamonti/Upload/Client" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<compilation debug="true" targetFramework="4.5" />
|
||||
<httpRuntime targetFramework="4.5" />
|
||||
</system.web>
|
||||
|
||||
</configuration>
|
||||
Binary file not shown.
+30
@@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersGen", "VersGen\VersGen.
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebSCR_data", "WebSCR_data\WebSCR_data.csproj", "{D2ED1B6F-171D-4A7F-B0D5-87942451B79D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataUploader", "DataUploader\DataUploader.csproj", "{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
218_SP|Any CPU = 218_SP|Any CPU
|
||||
@@ -139,6 +141,34 @@ Global
|
||||
{D2ED1B6F-171D-4A7F-B0D5-87942451B79D}.Steamware|Any CPU.Build.0 = Release|Any CPU
|
||||
{D2ED1B6F-171D-4A7F-B0D5-87942451B79D}.WinLab|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D2ED1B6F-171D-4A7F-B0D5-87942451B79D}.WinLab|Any CPU.Build.0 = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.218_SP|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.218_SP|Any CPU.Build.0 = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.218_test|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.218_test|Any CPU.Build.0 = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.Alumat|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.Alumat|Any CPU.Build.0 = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.DEMO|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.DEMO|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.deploy|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.deploy|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.EQUA|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.EQUA|Any CPU.Build.0 = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.ETS|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.ETS|Any CPU.Build.0 = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.ETS-218|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.ETS-218|Any CPU.Build.0 = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.IIS02|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.IIS02|Any CPU.Build.0 = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.SomaschiniUSA|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.SomaschiniUSA|Any CPU.Build.0 = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.Steamware|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.Steamware|Any CPU.Build.0 = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.WinLab|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6A63FCE4-8388-4C62-9339-CCCF013C5D8A}.WinLab|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,7 @@
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
Restituisce ULTIMO record inserito (cod cliente masismo) altrimenti accetta dati x nuovo record cliente...
|
||||
Restituisce ULTIMO record inserito (NUMERO) altrimenti accetta dati x nuovo record cliente...
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
@@ -101,7 +101,8 @@ namespace WebSCR.Upload
|
||||
try
|
||||
{
|
||||
DS_Applicazione.DB2_DOCSRow riga = DtProxy.man.taDocs.getLast()[0];
|
||||
answ = string.Format("{0}{1}", riga.TIPOPROTOC, riga.NUMEPROTOC);
|
||||
//answ = string.Format("{0}{1}", riga.TIPOPROTOC, riga.NUMEPROTOC);
|
||||
answ = string.Format("{0}", riga.NUMERO);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<NameOfLastUsedPublishProfile>IIS02</NameOfLastUsedPublishProfile>
|
||||
<NameOfLastUsedPublishProfile>WinLab-Rigamonti</NameOfLastUsedPublishProfile>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user