Cambio modalità focus x migliorare sensibilità buttons
This commit is contained in:
@@ -100,7 +100,7 @@ namespace NKC_WF.WebUserControls
|
||||
fixDisplayDesc();
|
||||
if (divSplit.Visible)
|
||||
{
|
||||
cmp_batchDetailSplit.doUpdate();
|
||||
cmp_batchDetailSplit.doUpdate(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,15 +2,6 @@
|
||||
<%@ Register Src="~/WebUserControls/cmp_orderExtList.ascx" TagPrefix="uc1" TagName="cmp_orderExtList" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_batchDetailSplitInfo.ascx" TagPrefix="uc1" TagName="cmp_batchDetailSplitInfo" %>
|
||||
|
||||
|
||||
<asp:UpdateProgress ID="UpdateProgressDisplay" runat="server" DisplayAfter="10">
|
||||
<ProgressTemplate>
|
||||
<div class="alert alert-primary" role="alert">
|
||||
<h3>Calculating, please wait... <i class="fa fa-circle-o-notch fa-spin fa-fw" aria-hidden="true"></i></h3>
|
||||
</div>
|
||||
</ProgressTemplate>
|
||||
</asp:UpdateProgress>
|
||||
|
||||
<asp:HiddenField runat="server" ID="hfBatchId" />
|
||||
<asp:HiddenField runat="server" ID="hfFullTime" />
|
||||
<asp:HiddenField runat="server" ID="hfIsSplit" Value="false" />
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (BatchId > 0)
|
||||
{
|
||||
checkCreateDescendant();
|
||||
doUpdate();
|
||||
doUpdate(true);
|
||||
}
|
||||
fixRatio();
|
||||
}
|
||||
@@ -60,13 +60,16 @@ namespace NKC_WF.WebUserControls
|
||||
base.Dispose();
|
||||
}
|
||||
|
||||
public void doUpdate()
|
||||
public void doUpdate(bool doReset)
|
||||
{
|
||||
fixChildBatch();
|
||||
fixRatio();
|
||||
checkDisplayMode();
|
||||
fixEnabled();
|
||||
raiseReset();
|
||||
if (doReset)
|
||||
{
|
||||
raiseReset();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
@@ -326,19 +329,14 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
protected void lbtBalance_Click(object sender, EventArgs e)
|
||||
{
|
||||
Task.Delay(100);
|
||||
ComLib.OrdersExtResetCache();
|
||||
// imposto la % secondo numero di abilitati...
|
||||
Ratio01 = enable01 ? (double)1 / numEnabled : 0;
|
||||
Ratio02 = enable02 ? (double)1 / numEnabled : 0;
|
||||
Ratio03 = enable03 ? (double)1 / numEnabled : 0;
|
||||
ComLib.OrdersExtResetCache();
|
||||
rebalanceOrder();
|
||||
// resetto batch ordini...
|
||||
cmp_orderExtListNE01.BatchId = 0;
|
||||
cmp_orderExtListNE02.BatchId = 0;
|
||||
cmp_orderExtListNE03.BatchId = 0;
|
||||
ComLib.OrdersExtResetCache();
|
||||
doUpdate();
|
||||
doUpdate(true);
|
||||
lbtBalance.Focus();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -390,6 +388,7 @@ namespace NKC_WF.WebUserControls
|
||||
enable01 = !enable01;
|
||||
checkDisplayMode();
|
||||
fixEnabled();
|
||||
lbtToggle01.Focus();
|
||||
}
|
||||
|
||||
protected void lbtToggle02_Click(object sender, EventArgs e)
|
||||
@@ -397,6 +396,7 @@ namespace NKC_WF.WebUserControls
|
||||
enable02 = !enable02;
|
||||
checkDisplayMode();
|
||||
fixEnabled();
|
||||
lbtToggle02.Focus();
|
||||
}
|
||||
|
||||
protected void lbtToggle03_Click(object sender, EventArgs e)
|
||||
@@ -404,6 +404,7 @@ namespace NKC_WF.WebUserControls
|
||||
enable03 = !enable03;
|
||||
checkDisplayMode();
|
||||
fixEnabled();
|
||||
lbtToggle03.Focus();
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
@@ -411,7 +412,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// verifica visualizzazione
|
||||
enableAll();
|
||||
toggleAll(true);
|
||||
fixChildBatch();
|
||||
fixRatio();
|
||||
checkDisplayMode();
|
||||
@@ -560,33 +561,39 @@ namespace NKC_WF.WebUserControls
|
||||
int origOrdId = cmp_orderExtListNE03.SelOrderId;
|
||||
moveOrderById(batchId, origBatchId, origOrdId);
|
||||
}
|
||||
|
||||
private void enableAll()
|
||||
/// <summary>
|
||||
/// Toggle generale pulsanti
|
||||
/// </summary>
|
||||
/// <param name="enable"></param>
|
||||
private void toggleAll(bool enable)
|
||||
{
|
||||
enable01 = true;
|
||||
enable02 = true;
|
||||
enable03 = true;
|
||||
enable01 = enable;
|
||||
enable02 = enable;
|
||||
enable03 = enable;
|
||||
}
|
||||
|
||||
private void fixChildBatch()
|
||||
{
|
||||
// sistemo dati ordini
|
||||
DS_App.BatchListDataTable TabBatch = TabBatchDesc;
|
||||
cmp_orderExtListNE01.BatchId = TabBatch.Rows.Count > 0 ? TabBatch[0].BatchID : 0;
|
||||
cmp_orderExtListNE02.BatchId = TabBatch.Rows.Count > 1 ? TabBatch[1].BatchID : 0;
|
||||
cmp_orderExtListNE03.BatchId = TabBatch.Rows.Count > 2 ? TabBatch[2].BatchID : 0;
|
||||
cmp_orderExtListNE01.doUpdate();
|
||||
cmp_orderExtListNE02.doUpdate();
|
||||
cmp_orderExtListNE03.doUpdate();
|
||||
try
|
||||
if (TabBatch != null && TabBatch.Count > 0)
|
||||
{
|
||||
cmp_batchDetailSplitInfoNE01.BatchId = cmp_orderExtListNE01.BatchId;
|
||||
cmp_batchDetailSplitInfoNE02.BatchId = cmp_orderExtListNE02.BatchId;
|
||||
cmp_batchDetailSplitInfoNE03.BatchId = cmp_orderExtListNE03.BatchId;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Instance.Error($"Error during fixChildBatch{Environment.NewLine}{exc}");
|
||||
cmp_orderExtListNE01.BatchId = TabBatch.Rows.Count > 0 ? TabBatch[0].BatchID : 0;
|
||||
cmp_orderExtListNE02.BatchId = TabBatch.Rows.Count > 1 ? TabBatch[1].BatchID : 0;
|
||||
cmp_orderExtListNE03.BatchId = TabBatch.Rows.Count > 2 ? TabBatch[2].BatchID : 0;
|
||||
cmp_orderExtListNE01.doUpdate();
|
||||
cmp_orderExtListNE02.doUpdate();
|
||||
cmp_orderExtListNE03.doUpdate();
|
||||
try
|
||||
{
|
||||
cmp_batchDetailSplitInfoNE01.BatchId = cmp_orderExtListNE01.BatchId;
|
||||
cmp_batchDetailSplitInfoNE02.BatchId = cmp_orderExtListNE02.BatchId;
|
||||
cmp_batchDetailSplitInfoNE03.BatchId = cmp_orderExtListNE03.BatchId;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Instance.Error($"Error during fixChildBatch{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,15 +14,6 @@ namespace NKC_WF.WebUserControls
|
||||
public partial class cmp_batchDetailSplit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// UpdateProgressDisplay control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdateProgress UpdateProgressDisplay;
|
||||
|
||||
/// <summary>
|
||||
/// hfBatchId control.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user