Aggiunta selezione testate schede tecniche
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_TechSheetArt.ascx.cs" Inherits="MP_ADM.WebUserControls.cmp_TechSheetArt" %>
|
||||
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">Ricerca articolo</span>
|
||||
</div>
|
||||
<asp:TextBox runat="server" ID="txtSearchArt" CssClass="form-control" AutoPostBack="True" OnTextChanged="txtSearchArt_TextChanged" placeholder="Codice da cercare [ALT-T]" AccessKey="T" />
|
||||
<div class="input-group-append">
|
||||
<asp:LinkButton runat="server" ID="lbtSearchReset" CssClass="input-group-text btn btn-block" OnClick="lbtSearchReset_Click"><i class="fa fa-times" aria-hidden="true"></i></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<asp:GridView runat="server" ID="grView" AutoGenerateColumns="False" DataKeyNames="IdxST" DataSourceID="ods" CssClass="table table-sm table-striped" AllowPaging="True" AllowSorting="True">
|
||||
<EditRowStyle CssClass="table-info" />
|
||||
<SelectedRowStyle CssClass="table-info" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<EmptyDataTemplate>
|
||||
Nessun record trovato
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="lbtReset" runat="server" OnClick="lbtReset_Click" CssClass="btn btn-sm btn-primary" Visible="true" ToolTip="Reset"><i class="fa fa-refresh"></i></asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtSel" runat="server" CausesValidation="False" CommandName="Select" CssClass="btn btn-sm btn-primary"><i class="fa fa-search" aria-hidden="true"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="IdxST" HeaderText="#" InsertVisible="False" ReadOnly="True" SortExpression="IdxST" />
|
||||
<%--<asp:BoundField DataField="CodTempl" HeaderText="CodTempl" SortExpression="CodTempl" />--%>
|
||||
<asp:BoundField DataField="CodArticolo" HeaderText="Art" SortExpression="CodArticolo" />
|
||||
<asp:BoundField DataField="DescArticolo" HeaderText="Descr." SortExpression="CodArticolo" />
|
||||
<%--<asp:BoundField DataField="MatrOpr" HeaderText="MatrOpr" SortExpression="MatrOpr" />
|
||||
<asp:BoundField DataField="DtMod" HeaderText="DtMod" SortExpression="DtMod" />--%>
|
||||
<asp:BoundField DataField="DescTempl" HeaderText="Tipo" SortExpression="DescTempl" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource runat="server" ID="ods" OldValuesParameterFormatString="original_{0}" SelectMethod="getBySearchArt" TypeName="MapoDb.DS_SheetTechTableAdapters.ST_ActualTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="txtSearchArt" DefaultValue="" Name="SearchCodArt" PropertyName="Text" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MP_ADM.WebUserControls
|
||||
{
|
||||
public partial class cmp_TechSheetArt : BaseUserControl
|
||||
{
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// comando reset
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
resetSelezione();
|
||||
}
|
||||
|
||||
protected void lbtSearchReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
txtSearchArt.Text = "";
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
protected void txtSearchArt_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void resetSelezione()
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
raiseReset();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MP_ADM.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class cmp_TechSheetArt
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtSearchArt.
|
||||
/// </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.TextBox txtSearchArt;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtSearchReset.
|
||||
/// </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.LinkButton lbtSearchReset;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo grView.
|
||||
/// </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.GridView grView;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ods.
|
||||
/// </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.ObjectDataSource ods;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_TechSheetDetail.ascx.cs" Inherits="MP_ADM.WebUserControls.cmp_TechSheetDetail" %>
|
||||
|
||||
Dettaglio singolo articolo
|
||||
@@ -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_ADM.WebUserControls
|
||||
{
|
||||
public partial class cmp_TechSheetDetail : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MP_ADM.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class cmp_TechSheetDetail
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1 +1,12 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_TechSheetMan.ascx.cs" Inherits="MP_ADM.WebUserControls.cmp_TechSheetMan" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_TechSheetArt.ascx" TagPrefix="uc1" TagName="cmp_TechSheetArt" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_TechSheetDetail.ascx" TagPrefix="uc1" TagName="cmp_TechSheetDetail" %>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<uc1:cmp_TechSheetArt runat="server" id="cmp_TechSheetArt" />
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<uc1:cmp_TechSheetDetail runat="server" id="cmp_TechSheetDetail" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -9,9 +9,39 @@ namespace MP_ADM.WebUserControls
|
||||
{
|
||||
public partial class cmp_TechSheetMan : System.Web.UI.UserControl
|
||||
{
|
||||
#region Private Methods
|
||||
|
||||
private void Cmp_TechSheetArt_eh_nuovoValore(object sender, EventArgs e)
|
||||
{
|
||||
cmp_TechSheetDetail.Visible = true;
|
||||
}
|
||||
|
||||
private void Cmp_TechSheetArt_eh_resetSelezione(object sender, EventArgs e)
|
||||
{
|
||||
cmp_TechSheetDetail.Visible = false;
|
||||
}
|
||||
|
||||
private void Cmp_TechSheetArt_eh_selValore(object sender, EventArgs e)
|
||||
{
|
||||
cmp_TechSheetDetail.Visible = true;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
cmp_TechSheetArt.resetSelezione();
|
||||
cmp_TechSheetDetail.Visible = false;
|
||||
}
|
||||
cmp_TechSheetArt.eh_nuovoValore += Cmp_TechSheetArt_eh_nuovoValore;
|
||||
cmp_TechSheetArt.eh_selValore += Cmp_TechSheetArt_eh_selValore;
|
||||
cmp_TechSheetArt.eh_resetSelezione += Cmp_TechSheetArt_eh_resetSelezione;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
+23
-4
@@ -1,16 +1,35 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </auto-generated>
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace MP_ADM.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class cmp_TechSheetMan
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_TechSheetArt.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MP_ADM.WebUserControls.cmp_TechSheetArt cmp_TechSheetArt;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_TechSheetDetail.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MP_ADM.WebUserControls.cmp_TechSheetDetail cmp_TechSheetDetail;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user