Completato cloning stati
#fixed 847 git-svn-id: https://keyhammer.ath.cx/svn/XPS/trunk@17 43c8e981-f90d-406c-a89a-24a2c4268d51
This commit is contained in:
@@ -4,14 +4,16 @@
|
||||
<%@ Register Src="mod_selettore_ajax.ascx" TagName="mod_selettore_ajax" TagPrefix="uc1" %>
|
||||
<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
|
||||
<div class="filtro_1">
|
||||
<uc1:mod_filtro id="Mod_filtroMappa" runat="server" changecheckenabled="false" changecheckvisible="false" />
|
||||
<asp:Label runat="server" ID="lblMappe" />
|
||||
<uc1:mod_filtro ID="Mod_filtroMappa" runat="server" changeCheckEnabled="false" changeCheckVisible="false" />
|
||||
<asp:ObjectDataSource ID="odsMappa" runat="server" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="GetData" TypeName="DS_utilityTableAdapters.v_selTipoMappaTableAdapter">
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<div class="filtro_2">
|
||||
<uc1:mod_filtro id="Mod_filtroTipoObj" runat="server" changecheckenabled="false"
|
||||
changecheckvisible="false" />
|
||||
<asp:Label runat="server" ID="lblTipo" />
|
||||
<uc1:mod_filtro ID="Mod_filtroTipoObj" runat="server" changeCheckEnabled="false"
|
||||
changeCheckVisible="false" />
|
||||
<asp:ObjectDataSource ID="odsTipoObj" runat="server" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="GetData" TypeName="DS_utilityTableAdapters.v_selTipoObjTableAdapter">
|
||||
</asp:ObjectDataSource>
|
||||
@@ -129,8 +131,8 @@
|
||||
<asp:Parameter Name="Original_IdxTipoObj" Type="Int32" />
|
||||
</UpdateParameters>
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="Mod_filtroTipoObj" Type="Int32" Name="IdxTipoObj" PropertyName="valore"
|
||||
DefaultValue="0" />
|
||||
<asp:ControlParameter ControlID="Mod_filtroTipoObj" Type="Int32" Name="IdxTipoObj"
|
||||
PropertyName="valore" DefaultValue="0" />
|
||||
<asp:ControlParameter ControlID="Mod_filtroMappa" Type="string" Name="CodMappa" PropertyName="valore"
|
||||
DefaultValue="" />
|
||||
</SelectParameters>
|
||||
@@ -145,4 +147,14 @@
|
||||
</InsertParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini"></asp:Label><br />
|
||||
<asp:Label ID="lblWarning" runat="server" Visible="false" CssClass="erroreMid" />
|
||||
<asp:Label ID="lblWarning" runat="server" Visible="false" CssClass="erroreMid" />
|
||||
<br />
|
||||
<asp:Button ID="btnShowClona" runat="server" OnClick="btnShowClona_Click" />
|
||||
<asp:Panel ID="pnlClona" runat="server" Visible="False" CssClass="clonaUserPerm">
|
||||
<asp:Button ID="btnClonaStati" runat="server" OnClick="btnClonaStati_Click" />
|
||||
<uc1:mod_filtro ID="Mod_filtroTipoObjDest" runat="server" changeCheckEnabled="false"
|
||||
changeCheckVisible="false" />
|
||||
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="GetData" TypeName="DS_utilityTableAdapters.v_selTipoObjTableAdapter">
|
||||
</asp:ObjectDataSource>
|
||||
</asp:Panel>
|
||||
|
||||
@@ -235,7 +235,17 @@ public partial class mod_anagraficaStati : ApplicationUserControl
|
||||
DataColumnCollection colonne = tabella.Columns;
|
||||
return colonne;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// traduco labels
|
||||
/// </summary>
|
||||
protected override void traduciObj()
|
||||
{
|
||||
base.traduciObj();
|
||||
lblMappe.Text = traduci("lblMappe");
|
||||
lblTipo.Text = traduci("lblTipo");
|
||||
btnShowClona.Text = traduci("btnShowClona");
|
||||
btnClonaStati.Text = traduci("btnClonaStati");
|
||||
}
|
||||
/// <summary>
|
||||
/// inizializzazione valori di default
|
||||
/// </summary>
|
||||
@@ -248,6 +258,7 @@ public partial class mod_anagraficaStati : ApplicationUserControl
|
||||
{
|
||||
Mod_filtroMappa.ods = odsMappa;
|
||||
Mod_filtroTipoObj.ods = odsTipoObj;
|
||||
Mod_filtroTipoObjDest.ods = odsTipoObj;
|
||||
}
|
||||
}
|
||||
void Mod_filtro1_eh_selValore(object sender, EventArgs e)
|
||||
@@ -348,6 +359,49 @@ public partial class mod_anagraficaStati : ApplicationUserControl
|
||||
e.InputParameters["CodMappa"] = Mod_filtroMappa.valore;
|
||||
e.InputParameters["IdxTipoObj"] = Mod_filtroTipoObj.valore;
|
||||
}
|
||||
/// <summary>
|
||||
/// mostra pannello cloning
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnShowClona_Click(object sender, EventArgs e)
|
||||
{
|
||||
setClonaVisibility();
|
||||
}
|
||||
|
||||
private void setClonaVisibility()
|
||||
{
|
||||
if (pnlClona.Visible)
|
||||
{
|
||||
btnShowClona.Text = traduci("btnShowClona");
|
||||
}
|
||||
else
|
||||
{
|
||||
btnShowClona.Text = traduci("btnHideClona");
|
||||
}
|
||||
pnlClona.Visible = !pnlClona.Visible;
|
||||
}
|
||||
/// <summary>
|
||||
/// chiamo stored di cloning stati...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnClonaStati_Click(object sender, EventArgs e)
|
||||
{
|
||||
// verifico siano diverse le selezioni...
|
||||
if (Mod_filtroTipoObj.valoreInt != Mod_filtroTipoObjDest.valoreInt)
|
||||
{
|
||||
DS_XPSTableAdapters.SP taSP = new DS_XPSTableAdapters.SP();
|
||||
taSP.sp_clonaStati(Mod_filtroMappa.valore, Mod_filtroTipoObj.valoreInt, Mod_filtroTipoObjDest.valoreInt);
|
||||
lblWarning.Visible = false;
|
||||
// nascondo...
|
||||
setClonaVisibility();
|
||||
}
|
||||
else
|
||||
{
|
||||
lblWarning.Text = traduci("erroreSelDest");
|
||||
lblWarning.Visible = true;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user