From 7928d423e50ca9a24cccee829059b131649d846a Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 7 Apr 2022 18:44:50 +0200 Subject: [PATCH 1/6] Bozza pagina cli/for --- MP-MAG/SMART/AnagCliFor.aspx | 11 ++++++++++ MP-MAG/SMART/AnagCliFor.aspx.cs | 17 ++++++++++++++++ MP-MAG/SMART/AnagCliFor.aspx.designer.cs | 26 ++++++++++++++++++++++++ MP-MAG/SMART/DiBa.aspx | 3 +++ MP-MAG/SMART/DiBa.aspx.cs | 17 ++++++++++++++++ MP-MAG/SMART/DiBa.aspx.designer.cs | 17 ++++++++++++++++ 6 files changed, 91 insertions(+) create mode 100644 MP-MAG/SMART/AnagCliFor.aspx create mode 100644 MP-MAG/SMART/AnagCliFor.aspx.cs create mode 100644 MP-MAG/SMART/AnagCliFor.aspx.designer.cs create mode 100644 MP-MAG/SMART/DiBa.aspx create mode 100644 MP-MAG/SMART/DiBa.aspx.cs create mode 100644 MP-MAG/SMART/DiBa.aspx.designer.cs diff --git a/MP-MAG/SMART/AnagCliFor.aspx b/MP-MAG/SMART/AnagCliFor.aspx new file mode 100644 index 00000000..f2cbae14 --- /dev/null +++ b/MP-MAG/SMART/AnagCliFor.aspx @@ -0,0 +1,11 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AnagCliFor.aspx.cs" Inherits="MP_MAG.SMART.AnagCliFor" %> + +<%@ Register Src="~/WebUserControls/cmp_AnagCliFor.ascx" TagPrefix="uc1" TagName="cmp_AnagCliFor" %> + + +
+
+ +
+
+
diff --git a/MP-MAG/SMART/AnagCliFor.aspx.cs b/MP-MAG/SMART/AnagCliFor.aspx.cs new file mode 100644 index 00000000..609987a4 --- /dev/null +++ b/MP-MAG/SMART/AnagCliFor.aspx.cs @@ -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 MP_MAG.SMART +{ + public partial class AnagCliFor : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/MP-MAG/SMART/AnagCliFor.aspx.designer.cs b/MP-MAG/SMART/AnagCliFor.aspx.designer.cs new file mode 100644 index 00000000..b4ed4acf --- /dev/null +++ b/MP-MAG/SMART/AnagCliFor.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 MP_MAG.SMART +{ + + + public partial class AnagCliFor + { + + /// + /// cmp_AnagCliFor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::MP_MAG.WebUserControls.cmp_AnagCliFor cmp_AnagCliFor; + } +} diff --git a/MP-MAG/SMART/DiBa.aspx b/MP-MAG/SMART/DiBa.aspx new file mode 100644 index 00000000..8bac918b --- /dev/null +++ b/MP-MAG/SMART/DiBa.aspx @@ -0,0 +1,3 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DiBa.aspx.cs" Inherits="MP_MAG.SMART.DiBa" %> + + diff --git a/MP-MAG/SMART/DiBa.aspx.cs b/MP-MAG/SMART/DiBa.aspx.cs new file mode 100644 index 00000000..c6da6c9b --- /dev/null +++ b/MP-MAG/SMART/DiBa.aspx.cs @@ -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 MP_MAG.SMART +{ + public partial class DiBa : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/MP-MAG/SMART/DiBa.aspx.designer.cs b/MP-MAG/SMART/DiBa.aspx.designer.cs new file mode 100644 index 00000000..8aea5d55 --- /dev/null +++ b/MP-MAG/SMART/DiBa.aspx.designer.cs @@ -0,0 +1,17 @@ +//------------------------------------------------------------------------------ +// +// 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 MP_MAG.SMART +{ + + + public partial class DiBa + { + } +} From 9cb0f7e079857d41ba5b67616f86b2909f366517 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 7 Apr 2022 18:45:33 +0200 Subject: [PATCH 2/6] Ancora x pagina Cli/For --- MP-MAG/MP-MAG.csproj | 24 ++ MP-MAG/WebUserControls/cmp_AnagCliFor.ascx | 85 ++++++ MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.cs | 26 ++ .../cmp_AnagCliFor.ascx.designer.cs | 62 ++++ MagData/DS_Mag.Designer.cs | 185 ++++++++++-- MagData/DS_Mag.xsd | 281 ++++++++++-------- MagData/DS_Mag.xss | 4 +- 7 files changed, 516 insertions(+), 151 deletions(-) create mode 100644 MP-MAG/WebUserControls/cmp_AnagCliFor.ascx create mode 100644 MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.cs create mode 100644 MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.designer.cs diff --git a/MP-MAG/MP-MAG.csproj b/MP-MAG/MP-MAG.csproj index 6e063d20..7195c92f 100644 --- a/MP-MAG/MP-MAG.csproj +++ b/MP-MAG/MP-MAG.csproj @@ -329,6 +329,13 @@ Site.Master + + AnagCliFor.aspx + ASPXCodeBehind + + + AnagCliFor.aspx + Default.aspx ASPXCodeBehind @@ -336,6 +343,13 @@ Default.aspx + + DiBa.aspx + ASPXCodeBehind + + + DiBa.aspx + EnrollDevice.aspx ASPXCodeBehind @@ -413,6 +427,13 @@ cmp_activeParams.ascx + + cmp_AnagCliFor.ascx + ASPXCodeBehind + + + cmp_AnagCliFor.ascx + cmp_barcode.ascx ASPXCodeBehind @@ -890,7 +911,9 @@ PreserveNewest + + @@ -905,6 +928,7 @@ + diff --git a/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx b/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx new file mode 100644 index 00000000..770a962e --- /dev/null +++ b/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx @@ -0,0 +1,85 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_AnagCliFor.ascx.cs" Inherits="MP_MAG.WebUserControls.cmp_AnagCliFor" %> +<%@ Register Src="~/WebUserControls/cmp_numRow.ascx" TagPrefix="uc1" TagName="cmp_numRow" %> + +
+
+
+
+ +
+
+ +
+
+

Anagrafica Clienti / Fornitori

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
diff --git a/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.cs b/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.cs new file mode 100644 index 00000000..f321b252 --- /dev/null +++ b/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace MP_MAG.WebUserControls +{ + public partial class cmp_AnagCliFor : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + grView.PageSize = cmp_numRow.numRow; + } + cmp_numRow.eh_doRefresh += Cmp_numRow_eh_doRefresh; + } + + private void Cmp_numRow_eh_doRefresh(object sender, EventArgs e) + { + grView.PageSize = cmp_numRow.numRow; + } + } +} \ No newline at end of file diff --git a/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.designer.cs b/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.designer.cs new file mode 100644 index 00000000..9a4abdd9 --- /dev/null +++ b/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// 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 MP_MAG.WebUserControls +{ + + + public partial class cmp_AnagCliFor + { + + /// + /// chkShowCli control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkShowCli; + + /// + /// chkShoFor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkShoFor; + + /// + /// grView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// ods control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// cmp_numRow control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::MP_MAG.WebUserControls.cmp_numRow cmp_numRow; + } +} diff --git a/MagData/DS_Mag.Designer.cs b/MagData/DS_Mag.Designer.cs index 606b6e32..578c39a6 100644 --- a/MagData/DS_Mag.Designer.cs +++ b/MagData/DS_Mag.Designer.cs @@ -3419,6 +3419,10 @@ namespace MagData { private global::System.Data.DataColumn columnNazione; + private global::System.Data.DataColumn columnIsCli; + + private global::System.Data.DataColumn columnIsFor; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public AnagClientiDataTable() { @@ -3508,6 +3512,22 @@ namespace MagData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn IsCliColumn { + get { + return this.columnIsCli; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn IsForColumn { + get { + return this.columnIsFor; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -3545,7 +3565,7 @@ namespace MagData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] - public AnagClientiRow AddAnagClientiRow(string CodCliente, string RagSociale, string Indirizzo, string Localita, string Cap, string Provincia, string Nazione) { + public AnagClientiRow AddAnagClientiRow(string CodCliente, string RagSociale, string Indirizzo, string Localita, string Cap, string Provincia, string Nazione, bool IsCli, bool IsFor) { AnagClientiRow rowAnagClientiRow = ((AnagClientiRow)(this.NewRow())); object[] columnValuesArray = new object[] { CodCliente, @@ -3554,7 +3574,9 @@ namespace MagData { Localita, Cap, Provincia, - Nazione}; + Nazione, + IsCli, + IsFor}; rowAnagClientiRow.ItemArray = columnValuesArray; this.Rows.Add(rowAnagClientiRow); return rowAnagClientiRow; @@ -3591,6 +3613,8 @@ namespace MagData { this.columnCap = base.Columns["Cap"]; this.columnProvincia = base.Columns["Provincia"]; this.columnNazione = base.Columns["Nazione"]; + this.columnIsCli = base.Columns["IsCli"]; + this.columnIsFor = base.Columns["IsFor"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -3610,6 +3634,10 @@ namespace MagData { base.Columns.Add(this.columnProvincia); this.columnNazione = new global::System.Data.DataColumn("Nazione", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnNazione); + this.columnIsCli = new global::System.Data.DataColumn("IsCli", typeof(bool), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnIsCli); + this.columnIsFor = new global::System.Data.DataColumn("IsFor", typeof(bool), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnIsFor); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnCodCliente}, true)); this.columnCodCliente.AllowDBNull = false; @@ -3627,6 +3655,8 @@ namespace MagData { this.columnProvincia.MaxLength = 50; this.columnNazione.AllowDBNull = false; this.columnNazione.MaxLength = 50; + this.columnIsCli.AllowDBNull = false; + this.columnIsFor.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -6325,6 +6355,28 @@ namespace MagData { this[this.tableAnagClienti.NazioneColumn] = value; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool IsCli { + get { + return ((bool)(this[this.tableAnagClienti.IsCliColumn])); + } + set { + this[this.tableAnagClienti.IsCliColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool IsFor { + get { + return ((bool)(this[this.tableAnagClienti.IsForColumn])); + } + set { + this[this.tableAnagClienti.IsForColumn] = value; + } + } } /// @@ -9179,10 +9231,12 @@ namespace MagData.DS_MagTableAdapters { tableMapping.ColumnMappings.Add("Cap", "Cap"); tableMapping.ColumnMappings.Add("Provincia", "Provincia"); tableMapping.ColumnMappings.Add("Nazione", "Nazione"); + tableMapping.ColumnMappings.Add("IsCli", "IsCli"); + tableMapping.ColumnMappings.Add("IsFor", "IsFor"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[AnagClienti] WHERE (([CodCliente] = @Original_CodCliente) AND ([RagSociale] = @Original_RagSociale) AND ([Indirizzo] = @Original_Indirizzo) AND ([Localita] = @Original_Localita) AND ([Cap] = @Original_Cap) AND ([Provincia] = @Original_Provincia) AND ([Nazione] = @Original_Nazione))"; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[AnagClienti] WHERE (([CodCliente] = @Original_CodCliente) AND ([RagSociale] = @Original_RagSociale) AND ([Indirizzo] = @Original_Indirizzo) AND ([Localita] = @Original_Localita) AND ([Cap] = @Original_Cap) AND ([Provincia] = @Original_Provincia) AND ([Nazione] = @Original_Nazione) AND ([IsCli] = @Original_IsCli) AND ([IsFor] = @Original_IsFor))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RagSociale", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RagSociale", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); @@ -9191,10 +9245,12 @@ namespace MagData.DS_MagTableAdapters { this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Cap", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Cap", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Provincia", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Provincia", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Nazione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nazione", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IsCli", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsCli", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IsFor", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsFor", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[AnagClienti] ([CodCliente], [RagSociale], [Indirizzo], [Localita], [Cap], [Provincia], [Nazione]) VALUES (@CodCliente, @RagSociale, @Indirizzo, @Localita, @Cap, @Provincia, @Nazione); -SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM AnagClienti WHERE (CodCliente = @CodCliente)"; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[AnagClienti] ([CodCliente], [RagSociale], [Indirizzo], [Localita], [Cap], [Provincia], [Nazione], [IsCli], [IsFor]) VALUES (@CodCliente, @RagSociale, @Indirizzo, @Localita, @Cap, @Provincia, @Nazione, @IsCli, @IsFor); +SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione, IsCli, IsFor FROM AnagClienti WHERE (CodCliente = @CodCliente)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RagSociale", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RagSociale", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -9203,10 +9259,12 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Cap", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Cap", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Provincia", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Provincia", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Nazione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nazione", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsCli", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsCli", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsFor", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsFor", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[AnagClienti] SET [CodCliente] = @CodCliente, [RagSociale] = @RagSociale, [Indirizzo] = @Indirizzo, [Localita] = @Localita, [Cap] = @Cap, [Provincia] = @Provincia, [Nazione] = @Nazione WHERE (([CodCliente] = @Original_CodCliente) AND ([RagSociale] = @Original_RagSociale) AND ([Indirizzo] = @Original_Indirizzo) AND ([Localita] = @Original_Localita) AND ([Cap] = @Original_Cap) AND ([Provincia] = @Original_Provincia) AND ([Nazione] = @Original_Nazione)); -SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM AnagClienti WHERE (CodCliente = @CodCliente)"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[AnagClienti] SET [CodCliente] = @CodCliente, [RagSociale] = @RagSociale, [Indirizzo] = @Indirizzo, [Localita] = @Localita, [Cap] = @Cap, [Provincia] = @Provincia, [Nazione] = @Nazione, [IsCli] = @IsCli, [IsFor] = @IsFor WHERE (([CodCliente] = @Original_CodCliente) AND ([RagSociale] = @Original_RagSociale) AND ([Indirizzo] = @Original_Indirizzo) AND ([Localita] = @Original_Localita) AND ([Cap] = @Original_Cap) AND ([Provincia] = @Original_Provincia) AND ([Nazione] = @Original_Nazione) AND ([IsCli] = @Original_IsCli) AND ([IsFor] = @Original_IsFor)); +SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione, IsCli, IsFor FROM AnagClienti WHERE (CodCliente = @CodCliente)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RagSociale", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RagSociale", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -9215,6 +9273,8 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Cap", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Cap", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Provincia", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Provincia", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Nazione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nazione", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsCli", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsCli", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsFor", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsFor", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RagSociale", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RagSociale", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Indirizzo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Indirizzo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); @@ -9222,6 +9282,8 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Cap", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Cap", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Provincia", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Provincia", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Nazione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nazione", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IsCli", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsCli", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IsFor", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsFor", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -9234,12 +9296,19 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM " + - "dbo.AnagClienti"; + this._commandCollection[0].CommandText = "SELECT *\r\nFROM dbo.AnagClienti"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "dbo.stp_ACF_getBySearch"; + 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("@searchVal", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showCli", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showFor", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -9266,6 +9335,35 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM return dataTable; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_Mag.AnagClientiDataTable getBySearch(string searchVal, global::System.Nullable showCli, global::System.Nullable showFor) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((searchVal == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(searchVal)); + } + if ((showCli.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((bool)(showCli.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((showFor.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[3].Value = ((bool)(showFor.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; + } + DS_Mag.AnagClientiDataTable dataTable = new DS_Mag.AnagClientiDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] @@ -9299,7 +9397,7 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(string Original_CodCliente, string Original_RagSociale, string Original_Indirizzo, string Original_Localita, string Original_Cap, string Original_Provincia, string Original_Nazione) { + public virtual int Delete(string Original_CodCliente, string Original_RagSociale, string Original_Indirizzo, string Original_Localita, string Original_Cap, string Original_Provincia, string Original_Nazione, bool Original_IsCli, bool Original_IsFor) { if ((Original_CodCliente == null)) { throw new global::System.ArgumentNullException("Original_CodCliente"); } @@ -9342,6 +9440,8 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM else { this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Nazione)); } + this.Adapter.DeleteCommand.Parameters[7].Value = ((bool)(Original_IsCli)); + this.Adapter.DeleteCommand.Parameters[8].Value = ((bool)(Original_IsFor)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -9362,7 +9462,7 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(string CodCliente, string RagSociale, string Indirizzo, string Localita, string Cap, string Provincia, string Nazione) { + public virtual int Insert(string CodCliente, string RagSociale, string Indirizzo, string Localita, string Cap, string Provincia, string Nazione, bool IsCli, bool IsFor) { if ((CodCliente == null)) { throw new global::System.ArgumentNullException("CodCliente"); } @@ -9405,6 +9505,8 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM else { this.Adapter.InsertCommand.Parameters[6].Value = ((string)(Nazione)); } + this.Adapter.InsertCommand.Parameters[7].Value = ((bool)(IsCli)); + this.Adapter.InsertCommand.Parameters[8].Value = ((bool)(IsFor)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -9425,7 +9527,25 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string CodCliente, string RagSociale, string Indirizzo, string Localita, string Cap, string Provincia, string Nazione, string Original_CodCliente, string Original_RagSociale, string Original_Indirizzo, string Original_Localita, string Original_Cap, string Original_Provincia, string Original_Nazione) { + public virtual int Update( + string CodCliente, + string RagSociale, + string Indirizzo, + string Localita, + string Cap, + string Provincia, + string Nazione, + bool IsCli, + bool IsFor, + string Original_CodCliente, + string Original_RagSociale, + string Original_Indirizzo, + string Original_Localita, + string Original_Cap, + string Original_Provincia, + string Original_Nazione, + bool Original_IsCli, + bool Original_IsFor) { if ((CodCliente == null)) { throw new global::System.ArgumentNullException("CodCliente"); } @@ -9468,48 +9588,52 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM else { this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Nazione)); } + this.Adapter.UpdateCommand.Parameters[7].Value = ((bool)(IsCli)); + this.Adapter.UpdateCommand.Parameters[8].Value = ((bool)(IsFor)); if ((Original_CodCliente == null)) { throw new global::System.ArgumentNullException("Original_CodCliente"); } else { - this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_CodCliente)); + this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_CodCliente)); } if ((Original_RagSociale == null)) { throw new global::System.ArgumentNullException("Original_RagSociale"); } else { - this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_RagSociale)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_RagSociale)); } if ((Original_Indirizzo == null)) { throw new global::System.ArgumentNullException("Original_Indirizzo"); } else { - this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_Indirizzo)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_Indirizzo)); } if ((Original_Localita == null)) { throw new global::System.ArgumentNullException("Original_Localita"); } else { - this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_Localita)); + this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_Localita)); } if ((Original_Cap == null)) { throw new global::System.ArgumentNullException("Original_Cap"); } else { - this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_Cap)); + this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_Cap)); } if ((Original_Provincia == null)) { throw new global::System.ArgumentNullException("Original_Provincia"); } else { - this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_Provincia)); + this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_Provincia)); } if ((Original_Nazione == null)) { throw new global::System.ArgumentNullException("Original_Nazione"); } else { - this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_Nazione)); + this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_Nazione)); } + this.Adapter.UpdateCommand.Parameters[16].Value = ((bool)(Original_IsCli)); + this.Adapter.UpdateCommand.Parameters[17].Value = ((bool)(Original_IsFor)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -9530,8 +9654,25 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string RagSociale, string Indirizzo, string Localita, string Cap, string Provincia, string Nazione, string Original_CodCliente, string Original_RagSociale, string Original_Indirizzo, string Original_Localita, string Original_Cap, string Original_Provincia, string Original_Nazione) { - return this.Update(Original_CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione, Original_CodCliente, Original_RagSociale, Original_Indirizzo, Original_Localita, Original_Cap, Original_Provincia, Original_Nazione); + public virtual int Update( + string RagSociale, + string Indirizzo, + string Localita, + string Cap, + string Provincia, + string Nazione, + bool IsCli, + bool IsFor, + string Original_CodCliente, + string Original_RagSociale, + string Original_Indirizzo, + string Original_Localita, + string Original_Cap, + string Original_Provincia, + string Original_Nazione, + bool Original_IsCli, + bool Original_IsFor) { + return this.Update(Original_CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione, IsCli, IsFor, Original_CodCliente, Original_RagSociale, Original_Indirizzo, Original_Localita, Original_Cap, Original_Provincia, Original_Nazione, Original_IsCli, Original_IsFor); } } diff --git a/MagData/DS_Mag.xsd b/MagData/DS_Mag.xsd index 0b474ffd..7e1b1c42 100644 --- a/MagData/DS_Mag.xsd +++ b/MagData/DS_Mag.xsd @@ -541,7 +541,7 @@ FROM dbo.ElencoPost2Queue - DELETE FROM [dbo].[AnagClienti] WHERE (([CodCliente] = @Original_CodCliente) AND ([RagSociale] = @Original_RagSociale) AND ([Indirizzo] = @Original_Indirizzo) AND ([Localita] = @Original_Localita) AND ([Cap] = @Original_Cap) AND ([Provincia] = @Original_Provincia) AND ([Nazione] = @Original_Nazione)) + DELETE FROM [dbo].[AnagClienti] WHERE (([CodCliente] = @Original_CodCliente) AND ([RagSociale] = @Original_RagSociale) AND ([Indirizzo] = @Original_Indirizzo) AND ([Localita] = @Original_Localita) AND ([Cap] = @Original_Cap) AND ([Provincia] = @Original_Provincia) AND ([Nazione] = @Original_Nazione) AND ([IsCli] = @Original_IsCli) AND ([IsFor] = @Original_IsFor)) @@ -550,13 +550,15 @@ FROM dbo.ElencoPost2Queue + + - INSERT INTO [dbo].[AnagClienti] ([CodCliente], [RagSociale], [Indirizzo], [Localita], [Cap], [Provincia], [Nazione]) VALUES (@CodCliente, @RagSociale, @Indirizzo, @Localita, @Cap, @Provincia, @Nazione); -SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM AnagClienti WHERE (CodCliente = @CodCliente) + INSERT INTO [dbo].[AnagClienti] ([CodCliente], [RagSociale], [Indirizzo], [Localita], [Cap], [Provincia], [Nazione], [IsCli], [IsFor]) VALUES (@CodCliente, @RagSociale, @Indirizzo, @Localita, @Cap, @Provincia, @Nazione, @IsCli, @IsFor); +SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione, IsCli, IsFor FROM AnagClienti WHERE (CodCliente = @CodCliente) @@ -565,19 +567,22 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM + + - - SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM dbo.AnagClienti + + SELECT * +FROM dbo.AnagClienti - UPDATE [dbo].[AnagClienti] SET [CodCliente] = @CodCliente, [RagSociale] = @RagSociale, [Indirizzo] = @Indirizzo, [Localita] = @Localita, [Cap] = @Cap, [Provincia] = @Provincia, [Nazione] = @Nazione WHERE (([CodCliente] = @Original_CodCliente) AND ([RagSociale] = @Original_RagSociale) AND ([Indirizzo] = @Original_Indirizzo) AND ([Localita] = @Original_Localita) AND ([Cap] = @Original_Cap) AND ([Provincia] = @Original_Provincia) AND ([Nazione] = @Original_Nazione)); -SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM AnagClienti WHERE (CodCliente = @CodCliente) + UPDATE [dbo].[AnagClienti] SET [CodCliente] = @CodCliente, [RagSociale] = @RagSociale, [Indirizzo] = @Indirizzo, [Localita] = @Localita, [Cap] = @Cap, [Provincia] = @Provincia, [Nazione] = @Nazione, [IsCli] = @IsCli, [IsFor] = @IsFor WHERE (([CodCliente] = @Original_CodCliente) AND ([RagSociale] = @Original_RagSociale) AND ([Indirizzo] = @Original_Indirizzo) AND ([Localita] = @Original_Localita) AND ([Cap] = @Original_Cap) AND ([Provincia] = @Original_Provincia) AND ([Nazione] = @Original_Nazione) AND ([IsCli] = @Original_IsCli) AND ([IsFor] = @Original_IsFor)); +SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione, IsCli, IsFor FROM AnagClienti WHERE (CodCliente = @CodCliente) @@ -586,6 +591,8 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM + + @@ -593,6 +600,8 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM + + @@ -606,8 +615,24 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM + + - + + + + + dbo.stp_ACF_getBySearch + + + + + + + + + + @@ -750,83 +775,83 @@ FROM dbo.v_Macchine - + - + - + - - + + - + - + - + - + - - + + - - - - - - + + + + + + - + - + @@ -836,152 +861,152 @@ FROM dbo.v_Macchine - + - + - + - + - + - - - - + + + + - - - - + + + + - - - + + + - + - + - + - - + + - + - + - + - + - + - + - + - + - + @@ -991,31 +1016,31 @@ FROM dbo.v_Macchine - + - + - + - + - + @@ -1025,64 +1050,64 @@ FROM dbo.v_Macchine - + - - + + - + - - - - - + + + + + - - + + - - - + + + - - - - + + + + - - + + @@ -1092,17 +1117,17 @@ FROM dbo.v_Macchine - + - + - + @@ -1112,40 +1137,40 @@ FROM dbo.v_Macchine - + - + - + - - - - - - + + + + + + - - - - - + + + + + @@ -1155,107 +1180,109 @@ FROM dbo.v_Macchine - + - + - + - + - + - + - + - + + + - + - + - + - + - + - + - + - + - + @@ -1265,67 +1292,67 @@ FROM dbo.v_Macchine - + - + - + - + - + - + - + - + - + - - + + diff --git a/MagData/DS_Mag.xss b/MagData/DS_Mag.xss index bd4e331c..73ea658a 100644 --- a/MagData/DS_Mag.xss +++ b/MagData/DS_Mag.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + @@ -12,7 +12,7 @@ - + From 3404caaa2a3873b670483fc1ab4f67435cd052ca Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 8 Apr 2022 10:27:45 +0200 Subject: [PATCH 3/6] Completata review pagina CliFor x CRUD --- MP-MAG/Content/Site.css | 25 +- MP-MAG/Content/Site.less | 22 +- MP-MAG/Content/Site.min.css | 2 +- MP-MAG/WebUserControls/cmp_AnagCliFor.ascx | 122 +++++++-- MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.cs | 60 ++++- MagData/DS_Mag.Designer.cs | 233 +++++++++++++++++- MagData/DS_Mag.xsd | 50 ++++ MagData/DS_Mag.xss | 14 +- MagData/MagDataLayer.cs | 3 + 9 files changed, 478 insertions(+), 53 deletions(-) diff --git a/MP-MAG/Content/Site.css b/MP-MAG/Content/Site.css index f648b114..5e07acae 100644 --- a/MP-MAG/Content/Site.css +++ b/MP-MAG/Content/Site.css @@ -37,6 +37,23 @@ body { width: 100%; } } +.GridPager a, +.GridPager span { + display: block; + height: 1.5em; + min-width: 1.5em; + text-align: center; + text-decoration: none; +} +.GridPager a { + background-color: #f5f5f5; + color: #969696; +} +.GridPager span { + background-color: #A1DCF2; + color: #000; + font-weight: bold; +} .border-thick { border-width: 3px !important; } @@ -138,7 +155,7 @@ body { min-width: 12rem; min-height: 6rem; display: inline-block; - padding: 1rem 0; + padding: 3rem/3 0; margin: 0 2px 1em; vertical-align: top; text-decoration: none; @@ -151,13 +168,13 @@ body { filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); border: 1px solid #ddd; box-sizing: border-box; - border-radius: 0.75rem; + border-radius: 1.5rem/2; } .shortcuts .shortcut-sm { min-width: 6.75rem; min-height: 4.5rem; display: inline-block; - padding: 0.375rem 0; + padding: 1.5rem/4 0; margin: 0 2px 1em; vertical-align: top; text-decoration: none; @@ -170,7 +187,7 @@ body { filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); border: 1px solid #ddd; box-sizing: border-box; - border-radius: 0.75rem; + border-radius: 1.5rem/2; } .shortcuts .shortcut .shortcut-icon { width: 100%; diff --git a/MP-MAG/Content/Site.less b/MP-MAG/Content/Site.less index 9ce6bc73..01a7752c 100644 --- a/MP-MAG/Content/Site.less +++ b/MP-MAG/Content/Site.less @@ -45,6 +45,26 @@ body { } } +.GridPager a, +.GridPager span { + display: block; + height: 1.5em; + min-width: 1.5em; + text-align: center; + text-decoration: none; +} + +.GridPager a { + background-color: #f5f5f5; + color: #969696; +} + +.GridPager span { + background-color: #A1DCF2; + color: #000; + font-weight: bold; +} + @borderThick: 3px; .border-thick { @@ -266,4 +286,4 @@ body { margin-top: .75em; font-weight: 400; color: #666; -} \ No newline at end of file +} diff --git a/MP-MAG/Content/Site.min.css b/MP-MAG/Content/Site.min.css index c855504d..0319ae63 100644 --- a/MP-MAG/Content/Site.min.css +++ b/MP-MAG/Content/Site.min.css @@ -1 +1 @@ -body{font-family:'Roboto Condensed',sans-serif;padding-top:50px;padding-bottom:20px;}.textCondens{font-family:'Open Sans Condensed',sans-serif;}.textNormal{font-family:'Roboto',sans-serif;}@media screen and (min-width:768px){.jumbotron{margin-top:20px;}.body-content{padding:0;}body{font-family:'Roboto',sans-serif;}}@media(max-width:992px){.container{width:100%;}}.border-thick{border-width:3px !important;}.flashColor{border:3px solid #00f;-webkit-animation-name:blueFlash;-webkit-animation-duration:.5s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.5s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes blueFlash{0%{border-color:#c4dbff;}25%{border-color:#9dc4ff;}50%{border-color:#5ca5ff;}75%{border-color:#1b82ff;}100%{border-color:#005ccc;}}.bigText{font-size:1.3em;}.smallText{font-size:.8em;}.dl-horizontal dt{white-space:normal;}.deleted{text-decoration:line-through;}.padZL{padding-left:.2em;}.padZR{padding-right:.2em;}.padZRL{padding-left:.2em;padding-right:.2em;}.colAlt{color:#c93;}.fontBig{font-size:2em;}.tNote{color:#8a8a8a;font-style:italic;}.tNoWrap{white-space:nowrap;}.navbar{min-height:0;color:#696969;}.pagination{margin:5px 0;}.pageSelDD{width:6em;}.zeroWidth{width:0;}.shortcuts{text-align:center;}.shortcuts .shortcut{min-width:12rem;min-height:6rem;display:inline-block;padding:1rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:.75rem;}.shortcuts .shortcut-sm{min-width:6.75rem;min-height:4.5rem;display:inline-block;padding:.375rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:.75rem;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:3rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:3rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;} \ No newline at end of file +body{font-family:'Roboto Condensed',sans-serif;padding-top:50px;padding-bottom:20px;}.textCondens{font-family:'Open Sans Condensed',sans-serif;}.textNormal{font-family:'Roboto',sans-serif;}@media screen and (min-width:768px){.jumbotron{margin-top:20px;}.body-content{padding:0;}body{font-family:'Roboto',sans-serif;}}@media(max-width:992px){.container{width:100%;}}.GridPager a,.GridPager span{display:block;height:1.5em;min-width:1.5em;text-align:center;text-decoration:none;}.GridPager a{background-color:#f5f5f5;color:#969696;}.GridPager span{background-color:#a1dcf2;color:#000;font-weight:bold;}.border-thick{border-width:3px !important;}.flashColor{border:3px solid #00f;-webkit-animation-name:blueFlash;-webkit-animation-duration:.5s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.5s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes blueFlash{0%{border-color:#c4dbff;}25%{border-color:#9dc4ff;}50%{border-color:#5ca5ff;}75%{border-color:#1b82ff;}100%{border-color:#005ccc;}}.bigText{font-size:1.3em;}.smallText{font-size:.8em;}.dl-horizontal dt{white-space:normal;}.deleted{text-decoration:line-through;}.padZL{padding-left:.2em;}.padZR{padding-right:.2em;}.padZRL{padding-left:.2em;padding-right:.2em;}.colAlt{color:#c93;}.fontBig{font-size:2em;}.tNote{color:#8a8a8a;font-style:italic;}.tNoWrap{white-space:nowrap;}.navbar{min-height:0;color:#696969;}.pagination{margin:5px 0;}.pageSelDD{width:6em;}.zeroWidth{width:0;}.shortcuts{text-align:center;}.shortcuts .shortcut{min-width:12rem;min-height:6rem;display:inline-block;padding:3rem/3 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1.5rem/2;}.shortcuts .shortcut-sm{min-width:6.75rem;min-height:4.5rem;display:inline-block;padding:1.5rem/4 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1.5rem/2;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:3rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:3rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;} \ No newline at end of file diff --git a/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx b/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx index 770a962e..6f036186 100644 --- a/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx +++ b/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx @@ -16,30 +16,106 @@
- + + + + + - - - - - - - + + + + + +
+ +   +
+
+ +
+ +   +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +   +
+
+ + + +
- + - - - - - - - - @@ -58,6 +134,7 @@ + @@ -67,19 +144,10 @@ - - - - - - - -
- diff --git a/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.cs b/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.cs index f321b252..4fb7314d 100644 --- a/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.cs +++ b/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.cs @@ -1,14 +1,43 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; using System.Web.UI; -using System.Web.UI.WebControls; namespace MP_MAG.WebUserControls { - public partial class cmp_AnagCliFor : System.Web.UI.UserControl + public partial class cmp_AnagCliFor : BaseUserControl { + #region Private Methods + + private void Cmp_numRow_eh_doRefresh(object sender, EventArgs e) + { + grView.PageSize = cmp_numRow.numRow; + } + + #endregion Private Methods + + #region Protected Methods + + /// + /// comando reset + /// + /// + /// + protected void lbtReset_Click(object sender, EventArgs e) + { + doReset(); + raiseReset(); + } + + /// + /// Aggiunta nuovo record + /// + /// + /// + protected void lbtAddNew_Click(object sender, EventArgs e) + { + MagDataLayerObj.taACF.insertQuery("__CodiceCliente", "Nuova Ragione Sociale", "Nuovo Indirizzo", "Nuova Località", "00000", "BA", "IT", false, true); + doReset(); + } + protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) @@ -18,9 +47,26 @@ namespace MP_MAG.WebUserControls cmp_numRow.eh_doRefresh += Cmp_numRow_eh_doRefresh; } - private void Cmp_numRow_eh_doRefresh(object sender, EventArgs e) + #endregion Protected Methods + + #region Public Methods + + public void doReset() { - grView.PageSize = cmp_numRow.numRow; + grView.SelectedIndex = -1; + grView.DataBind(); + } + + #endregion Public Methods + + protected void grView_RowDeleted(object sender, System.Web.UI.WebControls.GridViewDeletedEventArgs e) + { + doReset(); + } + + protected void grView_RowEditing(object sender, System.Web.UI.WebControls.GridViewEditEventArgs e) + { + grView.SelectedIndex = e.NewEditIndex; } } } \ No newline at end of file diff --git a/MagData/DS_Mag.Designer.cs b/MagData/DS_Mag.Designer.cs index 578c39a6..8ff13915 100644 --- a/MagData/DS_Mag.Designer.cs +++ b/MagData/DS_Mag.Designer.cs @@ -9296,19 +9296,54 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione, IsC [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM dbo.AnagClienti"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "dbo.stp_ACF_getBySearch"; + this._commandCollection[1].CommandText = "dbo.stp_ACF_deleteQuery"; 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("@searchVal", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showCli", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showFor", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_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_ACF_getBySearch"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@searchVal", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showCli", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showFor", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 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_ACF_insertQuery"; + 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("@RagSociale", global::System.Data.SqlDbType.NVarChar, 500, 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("@Indirizzo", 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("@Localita", 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("@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("@Provincia", 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("@Nazione", 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("@IsCli", 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("@IsFor", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[4].Connection = this.Connection; + this._commandCollection[4].CommandText = "dbo.stp_ACF_updateQuery"; + this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCliente", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RagSociale", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Indirizzo", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Localita", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Cap", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Provincia", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Nazione", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsCli", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsFor", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodCliente", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -9340,7 +9375,7 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione, IsC [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_Mag.AnagClientiDataTable getBySearch(string searchVal, global::System.Nullable showCli, global::System.Nullable showFor) { - this.Adapter.SelectCommand = this.CommandCollection[1]; + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((searchVal == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -9674,6 +9709,192 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione, IsC bool Original_IsFor) { return this.Update(Original_CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione, IsCli, IsFor, Original_CodCliente, Original_RagSociale, Original_Indirizzo, Original_Localita, Original_Cap, Original_Provincia, Original_Nazione, Original_IsCli, Original_IsFor); } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int deleteQuery(string Original_CodCliente) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((Original_CodCliente == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(Original_CodCliente)); + } + 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; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int insertQuery(string CodCliente, string RagSociale, string Indirizzo, string Localita, string Cap, string Provincia, string Nazione, global::System.Nullable IsCli, global::System.Nullable IsFor) { + 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 ((RagSociale == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(RagSociale)); + } + if ((Indirizzo == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(Indirizzo)); + } + if ((Localita == null)) { + command.Parameters[4].Value = global::System.DBNull.Value; + } + else { + command.Parameters[4].Value = ((string)(Localita)); + } + if ((Cap == null)) { + command.Parameters[5].Value = global::System.DBNull.Value; + } + else { + command.Parameters[5].Value = ((string)(Cap)); + } + if ((Provincia == null)) { + command.Parameters[6].Value = global::System.DBNull.Value; + } + else { + command.Parameters[6].Value = ((string)(Provincia)); + } + if ((Nazione == null)) { + command.Parameters[7].Value = global::System.DBNull.Value; + } + else { + command.Parameters[7].Value = ((string)(Nazione)); + } + if ((IsCli.HasValue == true)) { + command.Parameters[8].Value = ((bool)(IsCli.Value)); + } + else { + command.Parameters[8].Value = global::System.DBNull.Value; + } + if ((IsFor.HasValue == true)) { + command.Parameters[9].Value = ((bool)(IsFor.Value)); + } + else { + command.Parameters[9].Value = global::System.DBNull.Value; + } + 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; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int updateQuery(string CodCliente, string RagSociale, string Indirizzo, string Localita, string Cap, string Provincia, string Nazione, global::System.Nullable IsCli, global::System.Nullable IsFor, string Original_CodCliente) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; + if ((CodCliente == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(CodCliente)); + } + if ((RagSociale == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(RagSociale)); + } + if ((Indirizzo == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(Indirizzo)); + } + if ((Localita == null)) { + command.Parameters[4].Value = global::System.DBNull.Value; + } + else { + command.Parameters[4].Value = ((string)(Localita)); + } + if ((Cap == null)) { + command.Parameters[5].Value = global::System.DBNull.Value; + } + else { + command.Parameters[5].Value = ((string)(Cap)); + } + if ((Provincia == null)) { + command.Parameters[6].Value = global::System.DBNull.Value; + } + else { + command.Parameters[6].Value = ((string)(Provincia)); + } + if ((Nazione == null)) { + command.Parameters[7].Value = global::System.DBNull.Value; + } + else { + command.Parameters[7].Value = ((string)(Nazione)); + } + if ((IsCli.HasValue == true)) { + command.Parameters[8].Value = ((bool)(IsCli.Value)); + } + else { + command.Parameters[8].Value = global::System.DBNull.Value; + } + if ((IsFor.HasValue == true)) { + command.Parameters[9].Value = ((bool)(IsFor.Value)); + } + else { + command.Parameters[9].Value = global::System.DBNull.Value; + } + if ((Original_CodCliente == null)) { + command.Parameters[10].Value = global::System.DBNull.Value; + } + else { + command.Parameters[10].Value = ((string)(Original_CodCliente)); + } + 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/MagData/DS_Mag.xsd b/MagData/DS_Mag.xsd index 7e1b1c42..14b879a3 100644 --- a/MagData/DS_Mag.xsd +++ b/MagData/DS_Mag.xsd @@ -619,6 +619,17 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione, IsC + + + + dbo.stp_ACF_deleteQuery + + + + + + + @@ -632,6 +643,45 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione, IsC + + + + dbo.stp_ACF_insertQuery + + + + + + + + + + + + + + + + + + + dbo.stp_ACF_updateQuery + + + + + + + + + + + + + + + + diff --git a/MagData/DS_Mag.xss b/MagData/DS_Mag.xss index 73ea658a..084e2514 100644 --- a/MagData/DS_Mag.xss +++ b/MagData/DS_Mag.xss @@ -6,16 +6,16 @@ --> - - + + - - + + - - + + - + \ No newline at end of file diff --git a/MagData/MagDataLayer.cs b/MagData/MagDataLayer.cs index 351ec6eb..b4e28b1f 100644 --- a/MagData/MagDataLayer.cs +++ b/MagData/MagDataLayer.cs @@ -38,6 +38,7 @@ namespace MagData public static string redReportConf = "MP-CTRACK:MAG:reportConf"; public DS_MagTableAdapters.AnagArtTableAdapter taAA; + public DS_MagTableAdapters.AnagClientiTableAdapter taACF; public DS_MagTableAdapters.AnagArticoli2ClientiTableAdapter taAA2C; public DS_ReportTableAdapters.stp_prt_CartellinoFinitiOdetteTableAdapter taCFOdette; public DS_ReportTableAdapters.stp_prt_CartellinoPedaneTableAdapter taCPed; @@ -325,6 +326,7 @@ namespace MagData taRepPLFull = new DS_ReportTableAdapters.stp_prt_ReportPackListFullTableAdapter(); taAA = new DS_MagTableAdapters.AnagArtTableAdapter(); + taACF = new DS_MagTableAdapters.AnagClientiTableAdapter(); taAA2C = new DS_MagTableAdapters.AnagArticoli2ClientiTableAdapter(); taEA2U = new DS_MagTableAdapters.ElencoAL2UDCTableAdapter(); taEAL = new DS_MagTableAdapters.ElencoALTableAdapter(); @@ -350,6 +352,7 @@ namespace MagData taRepPLFull.Connection.ConnectionString = connString; taAA.Connection.ConnectionString = connString; + taACF.Connection.ConnectionString = connString; taAA2C.Connection.ConnectionString = connString; taEA2U.Connection.ConnectionString = connString; taEAL.Connection.ConnectionString = connString; From c7fbfff64f5ffc25aca5508f294b44fddd146385 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 8 Apr 2022 10:47:41 +0200 Subject: [PATCH 4/6] Bozza sel dettaglio destinazioni cliente --- MP-MAG/MP-MAG.csproj | 8 + MP-MAG/WebUserControls/cmp_AnagCliFor.ascx | 269 ++-- MP-MAG/WebUserControls/cmp_AnagCliFor.ascx.cs | 17 + .../cmp_AnagCliFor.ascx.designer.cs | 27 + MP-MAG/WebUserControls/cmp_destClienti.ascx | 23 + .../WebUserControls/cmp_destClienti.ascx.cs | 29 + .../cmp_destClienti.ascx.designer.cs | 44 + MagData/DS_Mag.Designer.cs | 1268 +++++++++++++++++ MagData/DS_Mag.xsd | 168 +++ 9 files changed, 1723 insertions(+), 130 deletions(-) create mode 100644 MP-MAG/WebUserControls/cmp_destClienti.ascx create mode 100644 MP-MAG/WebUserControls/cmp_destClienti.ascx.cs create mode 100644 MP-MAG/WebUserControls/cmp_destClienti.ascx.designer.cs diff --git a/MP-MAG/MP-MAG.csproj b/MP-MAG/MP-MAG.csproj index 7195c92f..bc8005c3 100644 --- a/MP-MAG/MP-MAG.csproj +++ b/MP-MAG/MP-MAG.csproj @@ -490,6 +490,13 @@ cmp_currODL.ascx + + cmp_destClienti.ascx + ASPXCodeBehind + + + cmp_destClienti.ascx + cmp_dettLotti.ascx ASPXCodeBehind @@ -936,6 +943,7 @@ + diff --git a/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx b/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx index 6f036186..539c83d3 100644 --- a/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx +++ b/MP-MAG/WebUserControls/cmp_AnagCliFor.ascx @@ -1,5 +1,7 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_AnagCliFor.ascx.cs" Inherits="MP_MAG.WebUserControls.cmp_AnagCliFor" %> <%@ Register Src="~/WebUserControls/cmp_numRow.ascx" TagPrefix="uc1" TagName="cmp_numRow" %> +<%@ Register Src="~/WebUserControls/cmp_destClienti.ascx" TagPrefix="uc1" TagName="cmp_destClienti" %> +
@@ -16,136 +18,143 @@
- - - - - - - - - - - -
- -   -
-
- -
- -   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -   -
-
- - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+
+ + + + + + + + + + + +
+ +   +
+
+ +
+ +   +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +   +
+
+ + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+