Bopzza dettaglio dati scheda tecnica
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
</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">
|
||||
<asp:GridView runat="server" ID="grView" AutoGenerateColumns="False" DataKeyNames="IdxST" DataSourceID="ods" CssClass="table table-sm table-striped" AllowPaging="True" AllowSorting="True" OnSelectedIndexChanged="grView_SelectedIndexChanged">
|
||||
<EditRowStyle CssClass="table-info" />
|
||||
<SelectedRowStyle CssClass="table-info" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
|
||||
@@ -9,8 +9,30 @@ namespace MP_ADM.WebUserControls
|
||||
{
|
||||
public partial class cmp_TechSheetArt : BaseUserControl
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public int IdxStSel
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (grView.SelectedIndex >= 0)
|
||||
{
|
||||
int.TryParse($"{grView.SelectedValue}", out answ);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
raiseSelNew();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// comando reset
|
||||
/// </summary>
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_TechSheetDetail.ascx.cs" Inherits="MP_ADM.WebUserControls.cmp_TechSheetDetail" %>
|
||||
|
||||
Dettaglio singolo articolo
|
||||
<asp:GridView runat="server" ID="grView" DataSourceID="ods" CssClass="table table-sm table-striped" AllowPaging="false" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxST,Label,Oggetto">
|
||||
<EditRowStyle CssClass="table-info" />
|
||||
<SelectedRowStyle CssClass="table-info" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<EmptyDataTemplate>
|
||||
Nessun record trovato
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<%--<asp:BoundField DataField="IdxST" HeaderText="IdxST" ReadOnly="True" SortExpression="IdxST" />--%>
|
||||
|
||||
<%--<asp:BoundField DataField="CodGruppo" HeaderText="CodGruppo" SortExpression="CodGruppo" />--%>
|
||||
<asp:BoundField DataField="DescGruppo" HeaderText="DescGruppo" SortExpression="DescGruppo" />
|
||||
<%--<asp:BoundField DataField="Label" HeaderText="Label" ReadOnly="True" SortExpression="Label" />--%>
|
||||
<asp:BoundField DataField="Note" HeaderText="Note" SortExpression="Note" />
|
||||
<%--<asp:BoundField DataField="CodTipo" HeaderText="CodTipo" SortExpression="CodTipo" />--%>
|
||||
<asp:BoundField DataField="DescTipo" HeaderText="DescTipo" SortExpression="DescTipo" />
|
||||
<asp:BoundField DataField="Num" HeaderText="Num" SortExpression="Num" />
|
||||
<asp:BoundField DataField="Oggetto" HeaderText="Oggetto" ReadOnly="True" SortExpression="Oggetto" />
|
||||
<asp:BoundField DataField="Value" HeaderText="Value" SortExpression="Value" />
|
||||
<asp:BoundField DataField="CheckType" HeaderText="CheckType" SortExpression="CheckType" />
|
||||
<asp:CheckBoxField DataField="Required" HeaderText="Required" SortExpression="Required" />
|
||||
<%--<asp:BoundField DataField="ExtCode" HeaderText="ExtCode" SortExpression="ExtCode" />--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource runat="server" ID="ods" OldValuesParameterFormatString="original_{0}" SelectMethod="getByST" TypeName="MapoDb.DS_SheetTechTableAdapters.ST_ActualRowTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfIdxST" Name="IdxST" PropertyName="Value" Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HiddenField runat="server" ID="hfIdxST" />
|
||||
@@ -7,11 +7,43 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace MP_ADM.WebUserControls
|
||||
{
|
||||
public partial class cmp_TechSheetDetail : System.Web.UI.UserControl
|
||||
public partial class cmp_TechSheetDetail : BaseUserControl
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public int IdxST
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
int.TryParse(hfIdxST.Value, out answ);
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
hfIdxST.Value = $"{value}";
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void doUpdate()
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -13,5 +13,32 @@ namespace MP_ADM.WebUserControls
|
||||
|
||||
public partial class cmp_TechSheetDetail
|
||||
{
|
||||
|
||||
/// <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;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfIdxST.
|
||||
/// </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 hfIdxST;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,21 +9,30 @@ namespace MP_ADM.WebUserControls
|
||||
{
|
||||
public partial class cmp_TechSheetMan : System.Web.UI.UserControl
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
protected int dummyArt = 0;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void Cmp_TechSheetArt_eh_nuovoValore(object sender, EventArgs e)
|
||||
{
|
||||
cmp_TechSheetDetail.Visible = true;
|
||||
cmp_TechSheetDetail.IdxST = dummyArt;
|
||||
//cmp_TechSheetDetail.Visible = false;
|
||||
}
|
||||
|
||||
private void Cmp_TechSheetArt_eh_resetSelezione(object sender, EventArgs e)
|
||||
{
|
||||
cmp_TechSheetDetail.Visible = false;
|
||||
cmp_TechSheetDetail.IdxST = dummyArt;
|
||||
//cmp_TechSheetDetail.Visible = false;
|
||||
}
|
||||
|
||||
private void Cmp_TechSheetArt_eh_selValore(object sender, EventArgs e)
|
||||
{
|
||||
cmp_TechSheetDetail.Visible = true;
|
||||
//cmp_TechSheetDetail.Visible = true;
|
||||
cmp_TechSheetDetail.IdxST = cmp_TechSheetArt.IdxStSel;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
@@ -35,7 +44,8 @@ namespace MP_ADM.WebUserControls
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
cmp_TechSheetArt.resetSelezione();
|
||||
cmp_TechSheetDetail.Visible = false;
|
||||
cmp_TechSheetDetail.IdxST = dummyArt;
|
||||
//cmp_TechSheetDetail.Visible = false;
|
||||
}
|
||||
cmp_TechSheetArt.eh_nuovoValore += Cmp_TechSheetArt_eh_nuovoValore;
|
||||
cmp_TechSheetArt.eh_selValore += Cmp_TechSheetArt_eh_selValore;
|
||||
|
||||
Reference in New Issue
Block a user