Bozza gestione filtro con controllo (da completare)
This commit is contained in:
@@ -35,16 +35,23 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
Filtri attivi
|
||||
</div>
|
||||
<div class="col">
|
||||
Articolo
|
||||
<asp:TextBox runat="server" id="txtFiltCodArt" AutoPostBack="True" OnTextChanged="txtFiltCodArt_TextChanged"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col">
|
||||
Macchina
|
||||
<asp:TextBox runat="server" id="txtFiltIdxMacc" AutoPostBack="True" OnTextChanged="txtFiltIdxMacc_TextChanged"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="col">
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
Articolo
|
||||
</div>
|
||||
<asp:TextBox runat="server" ID="txtFiltCodArt" AutoPostBack="True" OnTextChanged="txtFiltCodArt_TextChanged" CssClass="form-control form-control-sm"></asp:TextBox>
|
||||
<div class="input-group-append">
|
||||
reset
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
Macchina
|
||||
<asp:TextBox runat="server" ID="txtFiltIdxMacc" AutoPostBack="True" OnTextChanged="txtFiltIdxMacc_TextChanged"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col">
|
||||
<asp:CheckBox runat="server" ID="chkUnassigned" AutoPostBack="True" OnCheckedChanged="chkUnassigned_CheckedChanged" Text="Solo non assegnate" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -87,8 +94,10 @@
|
||||
<asp:TemplateField HeaderText="CodArticolo" SortExpression="CodArticolo">
|
||||
<ItemTemplate>
|
||||
<div style="float: left;">
|
||||
<b>
|
||||
<asp:Label runat="server" ID="txtCodArticolo" Text='<%# Eval("CodArticolo") %>' /></b>
|
||||
<asp:LinkButton runat="server" ID="lbtSelArt" OnClick="lbtSelArt_Click" CausesValidation="False" CommandArgument='<%# Eval("CodArticolo") %>' CssClass="btn btn-sm btn-outline-dark p-1">
|
||||
<i class="fa fa-search"></i>
|
||||
<b><%# Eval("CodArticolo") %></b>
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div style="float: right; font-size: 0.8em;">
|
||||
<asp:Label runat="server" ID="Label1" Text='<%# Eval("KeyRichiesta") %>' />
|
||||
@@ -100,10 +109,11 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="codMacchina" SortExpression="CodMacchina">
|
||||
<ItemTemplate>
|
||||
<b>
|
||||
<asp:Label runat="server" ID="txtCodMacchina" Text='<%# Eval("CodMacchina") %>' /></b>
|
||||
<br />
|
||||
<asp:Label runat="server" ID="txtNome" Text='<%# Eval("Nome") %>' />
|
||||
<asp:LinkButton runat="server" ID="lbtSelMacc" OnClick="lbtSelMacc_Click" CausesValidation="False" CommandArgument='<%# Eval("IdxMacchina") %>' CssClass="btn btn-sm btn-outline-dark p-1 btn-block">
|
||||
<i class="fa fa-search"></i>
|
||||
<b><%# Eval("Nome") %></b>
|
||||
<div><%# Eval("CodMacchina") %></div>
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="NumPezzi" SortExpression="NumPezzi">
|
||||
|
||||
@@ -9,6 +9,10 @@ namespace MoonProAdmin.WebUserControls
|
||||
{
|
||||
public partial class mod_gestPromODL : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Evento selezione filtro
|
||||
/// </summary>
|
||||
public event EventHandler eh_selFilt;
|
||||
/// <summary>
|
||||
/// Determina se sia solo readonly il controllo...
|
||||
/// </summary>
|
||||
@@ -469,25 +473,49 @@ namespace MoonProAdmin.WebUserControls
|
||||
|
||||
protected void txtFiltCodArt_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
updateTable();
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
protected void txtFiltIdxMacc_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
updateTable();
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
protected void chkUnassigned_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
updateTable();
|
||||
updateGrView();
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiorno Gridview
|
||||
/// </summary>
|
||||
private void updateTable()
|
||||
private void updateGrView()
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selezionato un condominio --> riporto selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSelArt_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lb = (LinkButton)sender;
|
||||
// imposto articolo
|
||||
txtFiltCodArt.Text = lb.CommandArgument;
|
||||
updateGrView();
|
||||
}
|
||||
/// <summary>
|
||||
/// Selezionato un condominio --> riporto selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSelMacc_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lb = (LinkButton)sender;
|
||||
// imposto articolo
|
||||
txtFiltIdxMacc.Text = lb.CommandArgument;
|
||||
updateGrView();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user