diff --git a/WebSCR.v11.suo b/WebSCR.v11.suo
index ab8719c..c0776e5 100644
Binary files a/WebSCR.v11.suo and b/WebSCR.v11.suo differ
diff --git a/WebSCR/Upload/Client.aspx b/WebSCR/Upload/Client.aspx
new file mode 100644
index 0000000..aec5d4f
--- /dev/null
+++ b/WebSCR/Upload/Client.aspx
@@ -0,0 +1,16 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Client.aspx.cs" Inherits="WebSCR.Upload.Client" %>
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WebSCR/Upload/Client.aspx.cs b/WebSCR/Upload/Client.aspx.cs
new file mode 100644
index 0000000..e7f439e
--- /dev/null
+++ b/WebSCR/Upload/Client.aspx.cs
@@ -0,0 +1,116 @@
+using SteamWare;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using WebSCR_data;
+
+namespace WebSCR.Upload
+{
+ public partial class Client : System.Web.UI.Page
+ {
+ ///
+ /// recupera valore querystring
+ ///
+ ///
+ ///
+ protected string qsVal(string nome)
+ {
+ return memLayer.ML.QSS(nome);
+ }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ string answ = "ND";
+ /*
+ * http://webscr.steamware.net/Rigamonti/Upload/Client?CodCliente=C0000&RagSoc=Cognome+Nome&CodFis=ABCDEFGH123456&Tel=035+0000000&Cell333+000000&EnableSMS=1&Email=email.address@dominio.it&Indir=via+dai+piedi&Cap=24999&Localita=Dalmine&Prov=BG&Note=note+se+presenti
+ */
+ // legge i get x processare dati input
+ string CodCliente = "";
+ string RagSoc = "";
+ string CodFis = "";
+ string Tel = "";
+ string Cell = "";
+ bool EnableSMS = false;
+ string Email = "";
+ string Indir = "";
+ string Cap = "";
+ string Localita = "";
+ string Prov = "";
+ string Note = "";
+ try
+ {
+ CodCliente = qsVal("CodCliente");
+ RagSoc = qsVal("RagSoc");
+ CodFis = qsVal("CodFis");
+ Tel = qsVal("Tel");
+ Cell = qsVal("Cell");
+ EnableSMS = memLayer.ML.QSB("EnableSMS");
+ Email = qsVal("Email");
+ Indir = qsVal("Indir");
+ Cap = qsVal("Cap");
+ Localita = qsVal("Localita");
+ Prov = qsVal("Prov");
+ Note = qsVal("Note");
+ if (memLayer.ML.CRI("_logLevel") > 6)
+ {
+ logger.lg.scriviLog(string.Format("Valori letti:{0}CodCliente: {1}{0}RagSoc: {2}{0}CodFis: {3}{0}Tel: {4}{0}Cell: {5}{0}EnableSMS: {6}{0}Email: {7}{0}Indir: {8}{0}Cap: {9}{0}Localita: {10}{0}Prov: {11}{0}Note: {12}", Environment.NewLine, CodCliente, RagSoc, CodFis, Tel, Cell, EnableSMS, Email, Indir, Cap, Localita, Prov, Note), tipoLog.INFO);
+ }
+ }
+ catch
+ { }
+ // provo a fare insert!!!
+ if (CodCliente != null && RagSoc != null)
+ {
+ if (CodCliente != "" && RagSoc != "")
+ {
+ try
+ {
+ // ora processo e salvo il valore del microstato...
+ DtProxy.man.taAC.upsert(CodCliente, RagSoc, CodFis, Tel, Cell, EnableSMS, Email, Indir, Cap, Localita, Prov, Note);
+ answ = "OK"; // registro in risposta che è andato tutto bene...
+ }
+ catch (Exception exc)
+ {
+ if (memLayer.ML.confReadInt("_logLevel") > 5)
+ {
+ string errore = string.Format("Errore: {0}{1}", Environment.NewLine, exc);
+ logger.lg.scriviLog(errore, tipoLog.EXCEPTION);
+ answ = errore;
+ }
+ }
+ }
+ else
+ {
+ // restituisco ultimo COD CLIENTE inserito
+ try
+ {
+ answ = DtProxy.man.taAC.getLast()[0].CodCliente;
+ }
+ catch
+ {
+ answ = "ko";
+ }
+ }
+ }
+ else
+ {
+ // restituisco ultimo COD CLIENTE inserito
+ try
+ {
+ answ = DtProxy.man.taAC.getLast()[0].CodCliente;
+ }
+ catch
+ {
+ answ = "ko";
+ }
+ }
+
+ // ripulisco pagina restituita e tolgo html (solo codice ok/NO)
+ Response.Clear();
+ Response.Write(answ);
+ Context.Response.End();
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebSCR/Upload/Client.aspx.designer.cs b/WebSCR/Upload/Client.aspx.designer.cs
new file mode 100644
index 0000000..64ec5c0
--- /dev/null
+++ b/WebSCR/Upload/Client.aspx.designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace WebSCR.Upload
+{
+
+
+ public partial class Client
+ {
+
+ ///
+ /// form1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+ }
+}
diff --git a/WebSCR/Upload/PingPage.aspx.cs b/WebSCR/Upload/PingPage.aspx.cs
index a8cd42f..001f959 100644
--- a/WebSCR/Upload/PingPage.aspx.cs
+++ b/WebSCR/Upload/PingPage.aspx.cs
@@ -11,7 +11,6 @@ namespace WebSCR.Upload
{
protected void Page_Load(object sender, EventArgs e)
{
-
Response.Clear();
Response.Write("OK");
Context.Response.End();
diff --git a/WebSCR/bin/SteamWare.dll b/WebSCR/bin/SteamWare.dll
index 53e68cb..a81f16f 100644
Binary files a/WebSCR/bin/SteamWare.dll and b/WebSCR/bin/SteamWare.dll differ
diff --git a/WebSCR/bin/WebSCR.dll b/WebSCR/bin/WebSCR.dll
index 0f3ac18..02a14ed 100644
Binary files a/WebSCR/bin/WebSCR.dll and b/WebSCR/bin/WebSCR.dll differ
diff --git a/WebSCR/bin/WebSCR_data.dll b/WebSCR/bin/WebSCR_data.dll
index 05b275a..aa546e0 100644
Binary files a/WebSCR/bin/WebSCR_data.dll and b/WebSCR/bin/WebSCR_data.dll differ
diff --git a/WebSCR/obj/Debug/WebSCR.csprojResolveAssemblyReference.cache b/WebSCR/obj/Debug/WebSCR.csprojResolveAssemblyReference.cache
index 46a3f74..a1ceb03 100644
Binary files a/WebSCR/obj/Debug/WebSCR.csprojResolveAssemblyReference.cache and b/WebSCR/obj/Debug/WebSCR.csprojResolveAssemblyReference.cache differ
diff --git a/WebSCR/obj/Debug/WebSCR.dll b/WebSCR/obj/Debug/WebSCR.dll
index d8c4ccb..02a14ed 100644
Binary files a/WebSCR/obj/Debug/WebSCR.dll and b/WebSCR/obj/Debug/WebSCR.dll differ
diff --git a/WebSCR_data/DS_Applicazione.Designer.cs b/WebSCR_data/DS_Applicazione.Designer.cs
index fd27144..a1281e2 100644
--- a/WebSCR_data/DS_Applicazione.Designer.cs
+++ b/WebSCR_data/DS_Applicazione.Designer.cs
@@ -9293,7 +9293,7 @@ SELECT CodCliente, RagSoc, CodFis, Tel, Cell, EnableSMS, Email, Indir, Cap, Loca
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitCommandCollection() {
- this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2];
+ this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT * FROM dbo.AnagClienti";
@@ -9304,6 +9304,28 @@ SELECT CodCliente, RagSoc, CodFis, Tel, Cell, EnableSMS, Email, Indir, Cap, Loca
this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCliente", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[2].Connection = this.Connection;
+ this._commandCollection[2].CommandText = "dbo.stp_AC_GetLast";
+ this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure;
+ this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[3].Connection = this.Connection;
+ this._commandCollection[3].CommandText = "dbo.stp_AC_upsert";
+ this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure;
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCliente", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RagSoc", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodFis", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Tel", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Cell", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EnableSMS", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Email", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Indir", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Cap", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Localita", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Prov", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -9347,6 +9369,17 @@ SELECT CodCliente, RagSoc, CodFis, Tel, Cell, EnableSMS, Email, Indir, Cap, Loca
return dataTable;
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
+ public virtual DS_Applicazione.AnagClientiDataTable getLast() {
+ this.Adapter.SelectCommand = this.CommandCollection[2];
+ DS_Applicazione.AnagClientiDataTable dataTable = new DS_Applicazione.AnagClientiDataTable();
+ this.Adapter.Fill(dataTable);
+ return dataTable;
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
@@ -9797,6 +9830,100 @@ SELECT CodCliente, RagSoc, CodFis, Tel, Cell, EnableSMS, Email, Indir, Cap, Loca
string Original_Note) {
return this.Update(Original_CodCliente, RagSoc, CodFis, Tel, Cell, EnableSMS, Email, Indir, Cap, Localita, Prov, Note, Original_CodCliente, Original_RagSoc, Original_CodFis, Original_Tel, Original_Cell, Original_EnableSMS, Original_Email, Original_Indir, Original_Cap, Original_Localita, Original_Prov, Original_Note);
}
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public virtual int upsert(string CodCliente, string RagSoc, string CodFis, string Tel, string Cell, global::System.Nullable EnableSMS, string Email, string Indir, string Cap, string Localita, string Prov, string Note) {
+ global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3];
+ if ((CodCliente == null)) {
+ command.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[1].Value = ((string)(CodCliente));
+ }
+ if ((RagSoc == null)) {
+ command.Parameters[2].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[2].Value = ((string)(RagSoc));
+ }
+ if ((CodFis == null)) {
+ command.Parameters[3].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[3].Value = ((string)(CodFis));
+ }
+ if ((Tel == null)) {
+ command.Parameters[4].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[4].Value = ((string)(Tel));
+ }
+ if ((Cell == null)) {
+ command.Parameters[5].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[5].Value = ((string)(Cell));
+ }
+ if ((EnableSMS.HasValue == true)) {
+ command.Parameters[6].Value = ((bool)(EnableSMS.Value));
+ }
+ else {
+ command.Parameters[6].Value = global::System.DBNull.Value;
+ }
+ if ((Email == null)) {
+ command.Parameters[7].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[7].Value = ((string)(Email));
+ }
+ if ((Indir == null)) {
+ command.Parameters[8].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[8].Value = ((string)(Indir));
+ }
+ if ((Cap == null)) {
+ command.Parameters[9].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[9].Value = ((string)(Cap));
+ }
+ if ((Localita == null)) {
+ command.Parameters[10].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[10].Value = ((string)(Localita));
+ }
+ if ((Prov == null)) {
+ command.Parameters[11].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[11].Value = ((string)(Prov));
+ }
+ if ((Note == null)) {
+ command.Parameters[12].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[12].Value = ((string)(Note));
+ }
+ global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
+ if (((command.Connection.State & global::System.Data.ConnectionState.Open)
+ != global::System.Data.ConnectionState.Open)) {
+ command.Connection.Open();
+ }
+ int returnValue;
+ try {
+ returnValue = command.ExecuteNonQuery();
+ }
+ finally {
+ if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+ command.Connection.Close();
+ }
+ }
+ return returnValue;
+ }
}
///
diff --git a/WebSCR_data/DS_Applicazione.xsd b/WebSCR_data/DS_Applicazione.xsd
index 15423c3..eec6a53 100644
--- a/WebSCR_data/DS_Applicazione.xsd
+++ b/WebSCR_data/DS_Applicazione.xsd
@@ -498,6 +498,38 @@ SELECT CodCliente, RagSoc, CodFis, Tel, Cell, EnableSMS, Email, Indir, Cap, Loca
+
+
+
+ dbo.stp_AC_GetLast
+
+
+
+
+
+
+
+
+
+ dbo.stp_AC_upsert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WebSCR_data/bin/Debug/SteamWare.dll b/WebSCR_data/bin/Debug/SteamWare.dll
index cd9147c..a81f16f 100644
Binary files a/WebSCR_data/bin/Debug/SteamWare.dll and b/WebSCR_data/bin/Debug/SteamWare.dll differ
diff --git a/WebSCR_data/bin/Debug/WebSCR_data.dll b/WebSCR_data/bin/Debug/WebSCR_data.dll
index 19d1404..aa546e0 100644
Binary files a/WebSCR_data/bin/Debug/WebSCR_data.dll and b/WebSCR_data/bin/Debug/WebSCR_data.dll differ
diff --git a/WebSCR_data/bin/Release/WebSCR_data.dll b/WebSCR_data/bin/Release/WebSCR_data.dll
index 05b275a..06886fe 100644
Binary files a/WebSCR_data/bin/Release/WebSCR_data.dll and b/WebSCR_data/bin/Release/WebSCR_data.dll differ
diff --git a/WebSCR_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll b/WebSCR_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll
index 2820dd6..e50e2b0 100644
Binary files a/WebSCR_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll and b/WebSCR_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll differ
diff --git a/WebSCR_data/obj/Debug/WebSCR_data.csprojResolveAssemblyReference.cache b/WebSCR_data/obj/Debug/WebSCR_data.csprojResolveAssemblyReference.cache
index a25967c..7db7a9d 100644
Binary files a/WebSCR_data/obj/Debug/WebSCR_data.csprojResolveAssemblyReference.cache and b/WebSCR_data/obj/Debug/WebSCR_data.csprojResolveAssemblyReference.cache differ
diff --git a/WebSCR_data/obj/Debug/WebSCR_data.dll b/WebSCR_data/obj/Debug/WebSCR_data.dll
index 19d1404..aa546e0 100644
Binary files a/WebSCR_data/obj/Debug/WebSCR_data.dll and b/WebSCR_data/obj/Debug/WebSCR_data.dll differ
diff --git a/WebSCR_data/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/WebSCR_data/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
index 188ef19..5572f6c 100644
Binary files a/WebSCR_data/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/WebSCR_data/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/WebSCR_data/obj/Release/TempPE/DS_Applicazione.Designer.cs.dll b/WebSCR_data/obj/Release/TempPE/DS_Applicazione.Designer.cs.dll
index 9949e86..295c321 100644
Binary files a/WebSCR_data/obj/Release/TempPE/DS_Applicazione.Designer.cs.dll and b/WebSCR_data/obj/Release/TempPE/DS_Applicazione.Designer.cs.dll differ
diff --git a/WebSCR_data/obj/Release/WebSCR_data.dll b/WebSCR_data/obj/Release/WebSCR_data.dll
index 05b275a..06886fe 100644
Binary files a/WebSCR_data/obj/Release/WebSCR_data.dll and b/WebSCR_data/obj/Release/WebSCR_data.dll differ