Continuo redistribuzione dati ordini
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_batchDetail.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_batchDetail" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_orderExtList.ascx" TagPrefix="uc1" TagName="cmp_orderExtList" %>
|
||||
|
||||
<asp:FormView ID="frmView" runat="server" DataKeyNames="BatchID" DataSourceID="ods" Width="100%">
|
||||
<ItemTemplate>
|
||||
@@ -97,14 +98,11 @@
|
||||
</div>
|
||||
|
||||
<div class="row small text-center">
|
||||
<div class="col-4">
|
||||
<div class="col-6">
|
||||
<span class="btn btn-primary disabled"><b>NE01</b>
|
||||
<asp:Label runat="server" ID="lblRatio01" />%</span>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<asp:Label runat="server" ID="lblSplitRatio" />
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="col-6">
|
||||
<span class="btn btn-secondary disabled"><b>NE02</b>
|
||||
<asp:Label runat="server" ID="lblRatio02" />%</span>
|
||||
</div>
|
||||
@@ -113,12 +111,10 @@
|
||||
</div>
|
||||
<div class="col-6">
|
||||
ORD LIST NE01 - summary
|
||||
<br />
|
||||
table detail
|
||||
<uc1:cmp_orderExtList runat="server" id="cmp_orderExtListNE01" />
|
||||
</div>
|
||||
<div class="col-6">
|
||||
ORD LIST NE02- summary
|
||||
<br />
|
||||
table detail
|
||||
<uc1:cmp_orderExtList runat="server" id="cmp_orderExtListNE02" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -19,7 +19,10 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected DS_App.BatchListDataTable tabDesc
|
||||
/// <summary>
|
||||
/// Tabella dei batch Descendant di quello corrente
|
||||
/// </summary>
|
||||
protected DS_App.BatchListDataTable tabBatchDesc
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -27,6 +30,15 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
}
|
||||
|
||||
protected Dictionary<string, DS_App.OrderListDataTable> TabOrders
|
||||
{
|
||||
get
|
||||
{
|
||||
// cerco in redis
|
||||
return ComLib.OrdersExtByBatch(BatchId, PlaceCod);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
@@ -211,6 +223,7 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
}
|
||||
checkCreateDescendant();
|
||||
showBatchDescendant();
|
||||
}
|
||||
get
|
||||
{
|
||||
@@ -242,7 +255,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (BatchId != 0)
|
||||
{
|
||||
// verifico se ho descendant
|
||||
if (tabDesc.Rows.Count == 0)
|
||||
if (tabBatchDesc.Rows.Count == 0)
|
||||
{
|
||||
// altrimenti creo...
|
||||
DLMan.taBL.makeDescendantByKey(BatchId, PlaceCod);
|
||||
@@ -250,6 +263,25 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mostro dati dei Batch descendant
|
||||
/// </summary>
|
||||
private void showBatchDescendant()
|
||||
{
|
||||
// se ho qualcosa aggiorno visualizzazione...
|
||||
if (TabOrders.Count > 0)
|
||||
{
|
||||
// se ne ho nel MAIN --> redistribuisco
|
||||
if (TabOrders["VIRTNE"].Count > 0)
|
||||
{
|
||||
// suddivido
|
||||
}
|
||||
// ...e poi mostro
|
||||
cmp_orderExtListNE01.CurrOrders = TabOrders["NE01"];
|
||||
cmp_orderExtListNE02.CurrOrders = TabOrders["NE02"];
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
@@ -326,13 +358,22 @@ namespace NKC_WF.WebUserControls
|
||||
return num / den;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco ordini dato BatchID
|
||||
/// </summary>
|
||||
/// <param name="BatchId"></param>
|
||||
/// <returns></returns>
|
||||
protected DS_App.OrderListDataTable tabOrdersByBatch(int BatchId)
|
||||
{
|
||||
return ComLib.OrdersByBatch(BatchId);
|
||||
}
|
||||
|
||||
protected void txtRatio_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
int valRatio = 0;
|
||||
int.TryParse(txtRatio.Text, out valRatio);
|
||||
lblRatio01.Text = $"{valRatio}";
|
||||
lblRatio02.Text = $"{100 - valRatio}";
|
||||
lblSplitRatio.Text = $"{valRatio}/{100 - valRatio}";
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
+18
-9
@@ -77,15 +77,6 @@ namespace NKC_WF.WebUserControls
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblRatio01;
|
||||
|
||||
/// <summary>
|
||||
/// lblSplitRatio control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblSplitRatio;
|
||||
|
||||
/// <summary>
|
||||
/// lblRatio02 control.
|
||||
/// </summary>
|
||||
@@ -103,5 +94,23 @@ namespace NKC_WF.WebUserControls
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtRatio;
|
||||
|
||||
/// <summary>
|
||||
/// cmp_orderExtListNE01 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_orderExtList cmp_orderExtListNE01;
|
||||
|
||||
/// <summary>
|
||||
/// cmp_orderExtListNE02 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_orderExtList cmp_orderExtListNE02;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_orderExtList.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_orderExtList" %>
|
||||
|
||||
<asp:GridView ID="grView" runat="server"></asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server"></asp:ObjectDataSource>
|
||||
@@ -0,0 +1,27 @@
|
||||
using AppData;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
{
|
||||
public partial class cmp_orderExtList : System.Web.UI.UserControl
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public DS_App.OrderListDataTable CurrOrders { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class cmp_orderExtList
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// grView control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView grView;
|
||||
|
||||
/// <summary>
|
||||
/// ods control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user