diff --git a/GPW_Admin/GPW_Admin.csproj b/GPW_Admin/GPW_Admin.csproj index 07bee6f..b7647da 100644 --- a/GPW_Admin/GPW_Admin.csproj +++ b/GPW_Admin/GPW_Admin.csproj @@ -528,6 +528,7 @@ + @@ -874,6 +875,13 @@ cmp_menuTop.ascx + + cmp_toggle.ascx + ASPXCodeBehind + + + cmp_toggle.ascx + mod_adminClienti.ascx ASPXCodeBehind diff --git a/GPW_Admin/WebMasterPages/BMP.Master.cs b/GPW_Admin/WebMasterPages/BMP.Master.cs index c6f7ab7..c55df0d 100644 --- a/GPW_Admin/WebMasterPages/BMP.Master.cs +++ b/GPW_Admin/WebMasterPages/BMP.Master.cs @@ -55,8 +55,8 @@ namespace GPW_Admin.WebMasterPages get { string answ = pagCorrente; - ValueType tabPerm = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select($"URL = '{pagCorrente}' OR URL = '{pagCorrente}.aspx'"; - if (tabPerm.Rows.Count > 0) + var tabPerm = (DataLayer_AnagGen.PermessiRow[])user_std.UtSn.permessi.Select($"URL = '{pagCorrente}' OR URL = '{pagCorrente}.aspx'"); + if (tabPerm.Length > 0) { answ = tabPerm[0].NOME; } diff --git a/GPW_Admin/WebUserControls/cmp_toggle.ascx b/GPW_Admin/WebUserControls/cmp_toggle.ascx index 4541773..05a13d6 100644 --- a/GPW_Admin/WebUserControls/cmp_toggle.ascx +++ b/GPW_Admin/WebUserControls/cmp_toggle.ascx @@ -1,4 +1,8 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_toggle.ascx.cs" Inherits="GPW_Admin.WebUserControls.cmp_toggle" %> + + + + \ No newline at end of file diff --git a/GPW_Admin/WebUserControls/cmp_toggle.ascx.cs b/GPW_Admin/WebUserControls/cmp_toggle.ascx.cs index 63e4ac9..3ab4e72 100644 --- a/GPW_Admin/WebUserControls/cmp_toggle.ascx.cs +++ b/GPW_Admin/WebUserControls/cmp_toggle.ascx.cs @@ -50,6 +50,36 @@ namespace GPW_Admin.WebUserControls } } + /// + /// Messaggio toggle Off + /// + public string messageOff + { + get + { + return hfMessageOff.Value; + } + set + { + hfMessageOff.Value = value; + } + } + + /// + /// Messaggio toggle ON + /// + public string messageOn + { + get + { + return hfMessageOn.Value; + } + set + { + hfMessageOn.Value = value; + } + } + /// /// valore toggle /// @@ -115,6 +145,7 @@ namespace GPW_Admin.WebUserControls bool doShow = toggleValue; lbtToggleOn.Visible = doShow; lbtToggleOff.Visible = !doShow; + lblMessage.Text = doShow ? messageOn : messageOff; } #endregion Private Methods diff --git a/GPW_Admin/WebUserControls/cmp_toggle.ascx.designer.cs b/GPW_Admin/WebUserControls/cmp_toggle.ascx.designer.cs index c79b40f..c88df18 100644 --- a/GPW_Admin/WebUserControls/cmp_toggle.ascx.designer.cs +++ b/GPW_Admin/WebUserControls/cmp_toggle.ascx.designer.cs @@ -23,6 +23,33 @@ namespace GPW_Admin.WebUserControls /// protected global::System.Web.UI.WebControls.HiddenField hfValue; + /// + /// Controllo hfMessageOff. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfMessageOff; + + /// + /// Controllo hfMessageOn. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfMessageOn; + + /// + /// Controllo lblMessage. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblMessage; + /// /// Controllo lbtToggleOn. /// diff --git a/GPW_Admin/WebUserControls/mod_adminClienti.ascx b/GPW_Admin/WebUserControls/mod_adminClienti.ascx index 502dbb3..6c48f36 100644 --- a/GPW_Admin/WebUserControls/mod_adminClienti.ascx +++ b/GPW_Admin/WebUserControls/mod_adminClienti.ascx @@ -1,9 +1,18 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_adminClienti.ascx.cs" Inherits="GPW_Admin.WebUserControls.mod_adminClienti" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> +<%@ Register Src="~/WebUserControls/cmp_toggle.ascx" TagPrefix="uc1" TagName="cmp_toggle" %> - - filtraggio... + + + + Filtro visualizzazione + + + + + + @@ -205,13 +214,9 @@ - - - @@ -227,6 +232,10 @@ + + + + diff --git a/GPW_Admin/WebUserControls/mod_adminClienti.ascx.cs b/GPW_Admin/WebUserControls/mod_adminClienti.ascx.cs index b4e3aae..041a22a 100644 --- a/GPW_Admin/WebUserControls/mod_adminClienti.ascx.cs +++ b/GPW_Admin/WebUserControls/mod_adminClienti.ascx.cs @@ -12,54 +12,46 @@ namespace GPW_Admin.WebUserControls { public partial class mod_adminClienti : System.Web.UI.UserControl { - #region area standard (non modificare) + #region Public Events - #region gestione eventi - - public event EventHandler eh_resetSelezione; public event EventHandler eh_nuovoValore; - #endregion + public event EventHandler eh_resetSelezione; + + #endregion Public Events + + #region Public Properties /// - /// effettua traduzione del lemma + /// controllo stato licenze! /// - /// - /// - public string traduci(string lemma) + public bool chkLicOk { - return user_std.UtSn.Traduci(lemma); - } - /// - /// caricamento - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - grView.PageSize = utils.pageSize; - } - /// - /// resetta la selezione dei valori in caso di modifiche su altri controlli - /// - public void resetSelezione() - { - grView.SelectedIndex = -1; - grView.DataBind(); - if (eh_resetSelezione != null) + get { - eh_resetSelezione(this, new EventArgs()); + return (licenzeGPW.checkLicenze); } } - /// - /// reset della selezione - /// - /// - /// - protected void btnReset_Click(object sender, EventArgs e) + + #endregion Public Properties + + #region Private Methods + + private void Cmp_toggle_ehToggle(object sender, EventArgs e) { - resetSelezione(); + hfShowAll.Value = $"{cmp_toggle.toggleValue}"; + doUpdate(); } + + private void doUpdate() + { + grView.DataBind(); + } + + #endregion Private Methods + + #region Protected Methods + /// /// gestione evento richiesta nuovo valore (mostra footer, ...) /// @@ -80,26 +72,32 @@ namespace GPW_Admin.WebUserControls eh_nuovoValore(this, new EventArgs()); } } + /// - /// inserisce nuovo valore da footer + /// reset della selezione /// /// /// - protected void lblIns_click(object sender, EventArgs e) + protected void btnReset_Click(object sender, EventArgs e) { - // click su inserimento, chiamo il metodo insert dell'ObjectDataSource - ods.Insert(); + resetSelezione(); } + /// - /// annulla inserimento nuovo valore da footer + /// elenco colonne del datagrid /// - /// - /// - protected void lblCanc_click(object sender, EventArgs e) + /// + protected DataColumnCollection colonneObj() { - // annullo inserimento: nascondo footer, bind controlli... - grView.FooterRow.Visible = false; + DataColumnCollection colonne = null; + using ( + DS_Applicazione.AnagClientiDataTable tabella = new DS_Applicazione.AnagClientiDataTable()) + { + colonne = tabella.Columns; + } + return colonne; } + /// /// traduce gli header delle colonne /// @@ -110,7 +108,7 @@ namespace GPW_Admin.WebUserControls if (grView.Rows.Count > 0) { LinkButton lb; - // aggiorno gli headers + // aggiorno gli headers foreach (TableCell cella in grView.HeaderRow.Cells) { try @@ -130,57 +128,62 @@ namespace GPW_Admin.WebUserControls } } - #endregion - - #region area CUSTOM (da modificare) - /// - /// elenco colonne del datagrid + /// annulla inserimento nuovo valore da footer /// - /// - protected DataColumnCollection colonneObj() + /// + /// + protected void lblCanc_click(object sender, EventArgs e) { - DataColumnCollection colonne = null; - using ( - DS_Applicazione.AnagClientiDataTable tabella = new DS_Applicazione.AnagClientiDataTable()) - { - colonne = tabella.Columns; - } - return colonne; + // annullo inserimento: nascondo footer, bind controlli... + grView.FooterRow.Visible = false; } + /// - /// determina se sia eliminabile il record (=non usato) + /// inserisce nuovo valore da footer /// - /// - /// - public bool delEnabled(object idxObj) + /// + /// + protected void lblIns_click(object sender, EventArgs e) { - bool answ = true; - // solo se ha diritti scrittura controllo - if (idxObj != null) + // click su inserimento, chiamo il metodo insert dell'ObjectDataSource + ods.Insert(); + } + + /// + /// check licenze in fase di update... + /// + /// + /// + protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e) + { + if (!licenzeGPW.checkLicenze) { - int trovati = 0; - int idxCli = 0; - _ = int.TryParse(idxObj.ToString(), out idxCli); - trovati = DataProxy.DP.taAP.getByIdxCli(idxCli, true, true).Rows.Count; - // controllo se ci sono record correlati... - if (trovati > 0) + if (e != null) { - answ = false; + // annullo insert se licenze sforate... + e.Cancel = true; + grView.EditIndex = -1; + grView.DataBind(); } } - return answ; } + /// - /// controllo stato licenze! + /// caricamento /// - public bool chkLicOk + /// + /// + protected void Page_Load(object sender, EventArgs e) { - get + if (!Page.IsPostBack) { - return (licenzeGPW.checkLicenze); + hfShowAll.Value = $"{cmp_toggle.toggleValue}"; } + grView.PageSize = utils.pageSize; + cmp_toggle.ehToggle += Cmp_toggle_ehToggle; } + /// /// recupera i dati di un nuovo record contenuti nel footer di un gridView; /// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...) @@ -219,12 +222,15 @@ namespace GPW_Admin.WebUserControls case "textBox": e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text; break; + case "dropDownList": e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue; break; + case "checkBox": e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked; break; + default: break; } @@ -239,25 +245,58 @@ namespace GPW_Admin.WebUserControls } } } + + #endregion Protected Methods + + #region Public Methods + /// - /// check licenze in fase di update... + /// determina se sia eliminabile il record (=non usato) /// - /// - /// - protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e) + /// + /// + public bool delEnabled(object idxObj) { - if (!licenzeGPW.checkLicenze) + bool answ = true; + // solo se ha diritti scrittura controllo + if (idxObj != null) { - if (e != null) + int trovati = 0; + int idxCli = 0; + _ = int.TryParse(idxObj.ToString(), out idxCli); + trovati = DataProxy.DP.taAP.getByIdxCli(idxCli, true, true).Rows.Count; + // controllo se ci sono record correlati... + if (trovati > 0) { - // annullo insert se licenze sforate... - e.Cancel = true; - grView.EditIndex = -1; - grView.DataBind(); + answ = false; } } + return answ; + } + + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + grView.SelectedIndex = -1; + grView.DataBind(); + if (eh_resetSelezione != null) + { + eh_resetSelezione(this, new EventArgs()); + } } - #endregion + /// + /// effettua traduzione del lemma + /// + /// + /// + public string traduci(string lemma) + { + return user_std.UtSn.Traduci(lemma); + } + + #endregion Public Methods } } \ No newline at end of file diff --git a/GPW_Admin/WebUserControls/mod_adminClienti.ascx.designer.cs b/GPW_Admin/WebUserControls/mod_adminClienti.ascx.designer.cs index a7c263c..f2b2de2 100644 --- a/GPW_Admin/WebUserControls/mod_adminClienti.ascx.designer.cs +++ b/GPW_Admin/WebUserControls/mod_adminClienti.ascx.designer.cs @@ -14,6 +14,24 @@ namespace GPW_Admin.WebUserControls public partial class mod_adminClienti { + /// + /// Controllo cmp_toggle. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::GPW_Admin.WebUserControls.cmp_toggle cmp_toggle; + + /// + /// Controllo hfShowAll. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfShowAll; + /// /// Controllo grView. /// diff --git a/GPW_Data/DS_Applicazione.Designer.cs b/GPW_Data/DS_Applicazione.Designer.cs index 799045b..0985f47 100644 --- a/GPW_Data/DS_Applicazione.Designer.cs +++ b/GPW_Data/DS_Applicazione.Designer.cs @@ -22867,7 +22867,7 @@ SELECT idxCliente, RagSociale, indirizzo, CAP, citta, prov, tel, url, email, pIv [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[6]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT * \r\nFROM dbo.AnagClienti\r\nORDER BY RagSociale"; @@ -22886,22 +22886,14 @@ SELECT idxCliente, RagSociale, indirizzo, CAP, citta, prov, tel, url, email, pIv this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxCliente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "dbo.stp_AC_insert"; + this._commandCollection[3].CommandText = "dbo.stp_AC_getBySearch"; this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RagSociale", 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("@indirizzo", 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, 5, 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("@citta", 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, 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("@email", 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("@pIva", global::System.Data.SqlDbType.NVarChar, 20, 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("@CF", global::System.Data.SqlDbType.NVarChar, 20, 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("@nota", 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("@searchVal", 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("@showAll", 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_AC_update"; + this._commandCollection[4].CommandText = "dbo.stp_AC_insert"; 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("@RagSociale", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -22910,14 +22902,29 @@ SELECT idxCliente, RagSociale, indirizzo, CAP, citta, prov, tel, url, email, pIv this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@citta", 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("@prov", 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("@tel", 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("@url", 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("@email", 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("@pIva", global::System.Data.SqlDbType.NVarChar, 20, 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("@CF", global::System.Data.SqlDbType.NVarChar, 20, 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("@logoUrl", 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("@nota", 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("@Attivo", 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_idxCliente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[5].Connection = this.Connection; + this._commandCollection[5].CommandText = "dbo.stp_AC_update"; + this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RagSociale", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@indirizzo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CAP", global::System.Data.SqlDbType.NVarChar, 5, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@citta", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@prov", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@tel", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@url", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@email", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@pIva", global::System.Data.SqlDbType.NVarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CF", global::System.Data.SqlDbType.NVarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@logoUrl", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nota", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Attivo", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxCliente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -22961,6 +22968,29 @@ SELECT idxCliente, RagSociale, indirizzo, CAP, citta, prov, tel, url, email, pIv return dataTable; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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 getBySearch(string searchVal, global::System.Nullable showAll) { + this.Adapter.SelectCommand = this.CommandCollection[3]; + if ((searchVal == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(searchVal)); + } + if ((showAll.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((bool)(showAll.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] @@ -23595,7 +23625,7 @@ SELECT idxCliente, RagSociale, indirizzo, CAP, citta, prov, tel, url, email, pIv [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int insertQuery(string RagSociale, string indirizzo, string CAP, string citta, string prov, string tel, string email, string pIva, string CF, string nota) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; if ((RagSociale == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -23678,7 +23708,7 @@ SELECT idxCliente, RagSociale, indirizzo, CAP, citta, prov, tel, url, email, pIv [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, false)] public virtual int updateQuery(string RagSociale, string indirizzo, string CAP, string citta, string prov, string tel, string url, string email, string pIva, string CF, string logoUrl, string nota, global::System.Nullable Attivo, global::System.Nullable Original_idxCliente) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; if ((RagSociale == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } diff --git a/GPW_Data/DS_Applicazione.xsd b/GPW_Data/DS_Applicazione.xsd index 1661366..d01324e 100644 --- a/GPW_Data/DS_Applicazione.xsd +++ b/GPW_Data/DS_Applicazione.xsd @@ -1251,6 +1251,18 @@ SELECT idxCliente, RagSociale, indirizzo, CAP, citta, prov, tel, url, email, pIv + + + + dbo.stp_AC_getBySearch + + + + + + + +