modifiche x poter poi gestire visiilità in SMART

This commit is contained in:
Samuele E. Locatelli
2020-08-24 15:22:55 +02:00
parent a0bf95560a
commit a738c705ad
6 changed files with 50 additions and 10 deletions
@@ -1,7 +1,7 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_kitReqRunning.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_kitReqRunning" %>
<%@ Register Src="~/WebUserControls/cmp_KR_cart.ascx" TagPrefix="uc1" TagName="cmp_KR_cart" %>
<h3><%: traduci("RunningKitReq") %></h3>
<h4><%: traduci("RunningKitReq") %></h4>
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="PackListID" DataSourceID="odsKit" Width="100%" CssClass="table table-success table-striped table-sm" OnSelectedIndexChanged="grView_SelectedIndexChanged">
<HeaderStyle CssClass="default" />
<PagerStyle CssClass="active GridPager" />
@@ -32,10 +32,8 @@
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="PackListID" HeaderText="#" ReadOnly="True" SortExpression="PackListID" />--%>
<asp:BoundField DataField="BatchName" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="StatusDesc" HeaderText="Status" ReadOnly="True" SortExpression="StatusDesc" />
<asp:BoundField DataField="BatchName" HeaderText="Name" SortExpression="Name" ItemStyle-CssClass="text-right">
<ItemStyle CssClass="text-right"></ItemStyle>
</asp:BoundField>
<%--<asp:BoundField DataField="ImportDate" HeaderText="Import Date" SortExpression="ImportDate" />--%>
<asp:BoundField DataField="NumKit" HeaderText="Kit #" SortExpression="NumKit" />
<asp:BoundField DataField="NumParts" HeaderText="Parts n#" SortExpression="NumParts" />
@@ -50,3 +48,4 @@
<asp:ObjectDataSource ID="odsKit" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getRunning" TypeName="AppData.DS_AppTableAdapters.PackListTableAdapter"></asp:ObjectDataSource>
<uc1:cmp_KR_cart runat="server" ID="cmp_KR_cart" />
<asp:HiddenField runat="server" ID="hfShowFull" Value="false" />
@@ -25,6 +25,19 @@ namespace NKC_WF.WebUserControls
cmp_KR_cart.doUpdate();
}
protected bool showFull
{
get
{
bool answ = false;
bool.TryParse(hfShowFull.Value, out answ);
return answ;
}
set
{
hfShowFull.Value = value.ToString();
}
}
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
int PackListId = 0;
@@ -40,5 +40,14 @@ namespace NKC_WF.WebUserControls
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_KR_cart cmp_KR_cart;
/// <summary>
/// Controllo hfShowFull.
/// </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 hfShowFull;
}
}
+3 -6
View File
@@ -1,8 +1,7 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_kitReqSched.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_kitReqSched" %>
<h3>
<asp:Label runat="server" ID="lblTitle"><%: traduci("ScheduledKitReq") %></asp:Label></h3>
<h4><asp:Label runat="server" ID="lblTitle"><%: traduci("ScheduledKitReq") %></asp:Label></h4>
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="PackListID" DataSourceID="odsKit" Width="100%" CssClass="table table-striped table-sm">
<HeaderStyle CssClass="default" />
<PagerStyle CssClass="active GridPager" />
@@ -26,10 +25,8 @@
<asp:LinkButton ID="lbtDown" runat="server" CommandArgument='<%# Eval("PackListID") %>' CssClass="btn btn-sm btn-primary" OnClick="lbtDown_Click" Enabled='<%# checkVisible("last", Eval("SchedPrior")) %>'><i class="fa fa-arrow-down" aria-hidden="true"></i></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="BatchName" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="StatusDesc" HeaderText="Status" ReadOnly="True" SortExpression="StatusDesc" />
<asp:BoundField DataField="BatchName" HeaderText="Name" SortExpression="Name" ItemStyle-CssClass="text-right">
<ItemStyle CssClass="text-right"></ItemStyle>
</asp:BoundField>
<%--<asp:BoundField DataField="ImportDate" HeaderText="Import Date" SortExpression="ImportDate" />--%>
<asp:BoundField DataField="NumKit" HeaderText="Kit #" SortExpression="NumKit" />
<asp:BoundField DataField="NumParts" HeaderText="Parts n#" SortExpression="NumParts" />
@@ -38,5 +35,5 @@
</asp:GridView>
<asp:ObjectDataSource ID="odsKit" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getToSchedule" TypeName="AppData.DS_AppTableAdapters.PackListTableAdapter"></asp:ObjectDataSource>
<asp:HiddenField runat="server" ID="hfNumRows" Value="0" />
<asp:HiddenField runat="server" ID="hfShowFull" Value="false" />
@@ -29,6 +29,19 @@ namespace NKC_WF.WebUserControls
hfNumRows.Value = value.ToString();
}
}
protected bool showFull
{
get
{
bool answ = false;
bool.TryParse(hfShowFull.Value, out answ);
return answ;
}
set
{
hfShowFull.Value = value.ToString();
}
}
internal void doUpdate()
{
+9
View File
@@ -49,5 +49,14 @@ namespace NKC_WF.WebUserControls
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfNumRows;
/// <summary>
/// Controllo hfShowFull.
/// </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 hfShowFull;
}
}