Fix filtraggio + fix trascriziones tati
This commit is contained in:
@@ -61,6 +61,37 @@ namespace AppData
|
||||
Discarded
|
||||
}
|
||||
|
||||
public static string BatchStatusDescr(object value)
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
ComLib.BatchStatus bStatus = (ComLib.BatchStatus)Enum.Parse(typeof(ComLib.BatchStatus), value.ToString());
|
||||
switch (bStatus)
|
||||
{
|
||||
case BatchStatus.Imported:
|
||||
answ = "Imported";
|
||||
break;
|
||||
case BatchStatus.NestRequested:
|
||||
answ = "Nesting Requested";
|
||||
break;
|
||||
case BatchStatus.NestDone:
|
||||
answ = "Nesting Completed";
|
||||
break;
|
||||
case BatchStatus.Approved:
|
||||
answ = "Nesting Approved";
|
||||
break;
|
||||
case BatchStatus.Discarded:
|
||||
answ = "Nesting Discarded";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -47,14 +47,7 @@ namespace NKC_WF.WebUserControls
|
||||
/// <returns></returns>
|
||||
public string BStatus(object _status)
|
||||
{
|
||||
string answ = "nd";
|
||||
try
|
||||
{
|
||||
var bStatus = Enum.Parse(typeof(ComLib.BatchStatus), _status.ToString());
|
||||
answ = bStatus.ToString();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
string answ = ComLib.BatchStatusDescr(_status);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,25 @@
|
||||
<div class="col-12" runat="server" id="divDetail">
|
||||
<uc1:cmp_batchDetail runat="server" ID="cmp_batchDetail" />
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<h3>Batch List</h3>
|
||||
</div>
|
||||
<div class="col-8 text-right">
|
||||
Filter status
|
||||
<asp:DropDownList runat="server" ID="ddlStatus" AutoPostBack="true">
|
||||
<asp:ListItem Selected="True" Text="-- Show All --" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Imported" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Nesting Requested" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Nesting Completed" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Nesting Approved" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Nesting Discarded" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="BatchID" DataSourceID="ods" CssClass="table table-sm table-striped" AllowSorting="True" OnSelectedIndexChanged="grView_SelectedIndexChanged">
|
||||
<HeaderStyle CssClass="default" />
|
||||
@@ -38,6 +57,10 @@
|
||||
<asp:BoundField DataField="ApprovUser" HeaderText="ApprovUser" SortExpression="ApprovUser" />--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="AppData.DS_AppTableAdapters.BatchListTableAdapter"></asp:ObjectDataSource>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByStatus" TypeName="AppData.DS_AppTableAdapters.BatchListTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="ddlStatus" DefaultValue="-1" Name="Status" PropertyName="SelectedValue" Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,14 +24,7 @@ namespace NKC_WF.WebUserControls
|
||||
/// <returns></returns>
|
||||
public string BStatus(object _status)
|
||||
{
|
||||
string answ = "nd";
|
||||
try
|
||||
{
|
||||
var bStatus = Enum.Parse(typeof(ComLib.BatchStatus), _status.ToString());
|
||||
answ = bStatus.ToString();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
string answ = ComLib.BatchStatusDescr(_status);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
@@ -30,6 +30,15 @@ namespace NKC_WF.WebUserControls {
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_batchDetail cmp_batchDetail;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlStatus.
|
||||
/// </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.DropDownList ddlStatus;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo grView.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user