fix errore sel permessi

This commit is contained in:
Samuele E. Locatelli
2021-01-07 12:03:01 +01:00
parent ca1939a6bb
commit dccd50a668
10 changed files with 297 additions and 119 deletions
+8
View File
@@ -528,6 +528,7 @@
<Content Include="WebMasterPages\MasterAjax.master" />
<Content Include="WebUserControls\cmp_footer.ascx" />
<Content Include="WebUserControls\cmp_menuTop.ascx" />
<Content Include="WebUserControls\cmp_toggle.ascx" />
<Content Include="WebUserControls\mod_adminClienti.ascx" />
<Content Include="WebUserControls\mod_adminDipendenti.ascx" />
<Content Include="WebUserControls\mod_adminFasi.ascx" />
@@ -874,6 +875,13 @@
<Compile Include="WebUserControls\cmp_menuTop.ascx.designer.cs">
<DependentUpon>cmp_menuTop.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\cmp_toggle.ascx.cs">
<DependentUpon>cmp_toggle.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\cmp_toggle.ascx.designer.cs">
<DependentUpon>cmp_toggle.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_adminClienti.ascx.cs">
<DependentUpon>mod_adminClienti.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
+2 -2
View File
@@ -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;
}
@@ -1,4 +1,8 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_toggle.ascx.cs" Inherits="GPW_Admin.WebUserControls.cmp_toggle" %>
<asp:HiddenField runat="server" ID="hfValue" />
<asp:HiddenField runat="server" ID="hfMessageOff" />
<asp:HiddenField runat="server" ID="hfMessageOn" />
<asp:Label runat="server" ID="lblMessage" />
&nbsp;
<asp:LinkButton runat="server" ID="lbtToggleOn" OnClick="lbtToggleOn_Click" ToolTip="Nascondi TagCloud"><i class="fa fa-2x fa-toggle-on" aria-hidden="true"></i></asp:LinkButton>
<asp:LinkButton runat="server" ID="lbtToggleOff" OnClick="lbtToggleOff_Click" ToolTip="Mostra TagCloud"><i class="fa fa-2x fa-toggle-off" aria-hidden="true"></i></asp:LinkButton>
@@ -50,6 +50,36 @@ namespace GPW_Admin.WebUserControls
}
}
/// <summary>
/// Messaggio toggle Off
/// </summary>
public string messageOff
{
get
{
return hfMessageOff.Value;
}
set
{
hfMessageOff.Value = value;
}
}
/// <summary>
/// Messaggio toggle ON
/// </summary>
public string messageOn
{
get
{
return hfMessageOn.Value;
}
set
{
hfMessageOn.Value = value;
}
}
/// <summary>
/// valore toggle
/// </summary>
@@ -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
+27
View File
@@ -23,6 +23,33 @@ namespace GPW_Admin.WebUserControls
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfValue;
/// <summary>
/// Controllo hfMessageOff.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfMessageOff;
/// <summary>
/// Controllo hfMessageOn.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfMessageOn;
/// <summary>
/// Controllo lblMessage.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblMessage;
/// <summary>
/// Controllo lbtToggleOn.
/// </summary>
@@ -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" %>
<div class="row fontPiccolo2">
<div class="col-12">
filtraggio...
<div class="col-12 text-right mb-1">
<div class="input-group table-secondary">
<div class="input-group-prepend">
<span class="input-group-text">Filtro visualizzazione</span>
</div>
<div class="form-control">
<uc1:cmp_toggle runat="server" ID="cmp_toggle" classOn="text-success" classOff="text-dark" messageOn="Mostra Tutti" messageOff="Mostra Solo Attivi" />
<asp:HiddenField runat="server" ID="hfShowAll" />
</div>
</div>
</div>
<div class="col-12">
<asp:GridView ID="grView" runat="server" AllowSorting="True" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="idxCliente" DataSourceID="ods" CssClass="table table-striped table-sm" OnDataBound="grView_DataBound">
@@ -205,13 +214,9 @@
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OnInserting="recuperaFooter" DeleteMethod="deleteQuery" InsertMethod="insertQuery"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_ApplicazioneTableAdapters.AnagClientiTableAdapter"
OldValuesParameterFormatString="original_{0}" SelectMethod="getBySearch" TypeName="GPW_data.DS_ApplicazioneTableAdapters.AnagClientiTableAdapter"
UpdateMethod="updateQuery"
FilterExpression=" (RagSociale like '%{0}%') OR (indirizzo like '%{0}%') OR (citta like '%{0}%') OR (url like '%{0}%') OR (email like '%{0}%') OR (nota like '%{0}%') "
OnUpdating="ods_Updating">
<FilterParameters>
<asp:SessionParameter SessionField="valoreSearch" Type="String" />
</FilterParameters>
<DeleteParameters>
<asp:Parameter Name="Original_idxCliente" Type="Int32" />
</DeleteParameters>
@@ -227,6 +232,10 @@
<asp:Parameter Name="CF" Type="String" />
<asp:Parameter Name="nota" Type="String" />
</InsertParameters>
<SelectParameters>
<asp:SessionParameter DefaultValue="*" Name="searchVal" SessionField="valoreSearch" Type="String" />
<asp:ControlParameter ControlID="hfShowAll" Name="showAll" PropertyName="Value" Type="Boolean" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="RagSociale" Type="String" />
<asp:Parameter Name="indirizzo" Type="String" />
@@ -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
/// <summary>
/// effettua traduzione del lemma
/// controllo stato licenze!
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
public bool chkLicOk
{
return user_std.UtSn.Traduci(lemma);
}
/// <summary>
/// caricamento
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
grView.PageSize = utils.pageSize;
}
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
/// </summary>
public void resetSelezione()
{
grView.SelectedIndex = -1;
grView.DataBind();
if (eh_resetSelezione != null)
get
{
eh_resetSelezione(this, new EventArgs());
return (licenzeGPW.checkLicenze);
}
}
/// <summary>
/// reset della selezione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
/// <summary>
/// gestione evento richiesta nuovo valore (mostra footer, ...)
/// </summary>
@@ -80,26 +72,32 @@ namespace GPW_Admin.WebUserControls
eh_nuovoValore(this, new EventArgs());
}
}
/// <summary>
/// inserisce nuovo valore da footer
/// reset della selezione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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();
}
/// <summary>
/// annulla inserimento nuovo valore da footer
/// elenco colonne del datagrid
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lblCanc_click(object sender, EventArgs e)
/// <returns></returns>
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;
}
/// <summary>
/// traduce gli header delle colonne
/// </summary>
@@ -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)
/// <summary>
/// elenco colonne del datagrid
/// annulla inserimento nuovo valore da footer
/// </summary>
/// <returns></returns>
protected DataColumnCollection colonneObj()
/// <param name="sender"></param>
/// <param name="e"></param>
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;
}
/// <summary>
/// determina se sia eliminabile il record (=non usato)
/// inserisce nuovo valore da footer
/// </summary>
/// <param name="idxMaker"></param>
/// <returns></returns>
public bool delEnabled(object idxObj)
/// <param name="sender"></param>
/// <param name="e"></param>
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();
}
/// <summary>
/// check licenze in fase di update...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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;
}
/// <summary>
/// controllo stato licenze!
/// caricamento
/// </summary>
public bool chkLicOk
/// <param name="sender"></param>
/// <param name="e"></param>
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;
}
/// <summary>
/// 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
/// <summary>
/// check licenze in fase di update...
/// determina se sia eliminabile il record (=non usato)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e)
/// <param name="idxMaker"></param>
/// <returns></returns>
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;
}
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
/// </summary>
public void resetSelezione()
{
grView.SelectedIndex = -1;
grView.DataBind();
if (eh_resetSelezione != null)
{
eh_resetSelezione(this, new EventArgs());
}
}
#endregion
/// <summary>
/// effettua traduzione del lemma
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
{
return user_std.UtSn.Traduci(lemma);
}
#endregion Public Methods
}
}
@@ -14,6 +14,24 @@ namespace GPW_Admin.WebUserControls
public partial class mod_adminClienti
{
/// <summary>
/// Controllo cmp_toggle.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::GPW_Admin.WebUserControls.cmp_toggle cmp_toggle;
/// <summary>
/// Controllo hfShowAll.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfShowAll;
/// <summary>
/// Controllo grView.
/// </summary>
+49 -19
View File
@@ -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<bool> 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<bool> Attivo, global::System.Nullable<int> 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;
}
+12
View File
@@ -1251,6 +1251,18 @@ SELECT idxCliente, RagSociale, indirizzo, CAP, citta, prov, tel, url, email, pIv
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GPWConnectionString (Settings)" DbObjectName="GPW.dbo.stp_AC_getBySearch" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getBySearch" GetMethodModifier="Public" GetMethodName="getBySearch" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getBySearch" UserSourceName="getBySearch">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_AC_getBySearch</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@searchVal" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@showAll" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GPWConnectionString (Settings)" DbObjectName="GPW.dbo.stp_AC_insert" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="insertQuery" Modifier="Public" Name="insertQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="insertQuery">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">