cleanup vari di if false
This commit is contained in:
@@ -447,27 +447,6 @@ namespace MP_MAG.WebUserControls
|
||||
/// <param name="resetStatus"></param>
|
||||
protected void resetSelection(bool resetStatus)
|
||||
{
|
||||
#if false
|
||||
if (resetStatus)
|
||||
{
|
||||
try
|
||||
{
|
||||
// SE item esiste...
|
||||
var tabItem = DataLayer.man.taIL.getBySearch(itemIdSelected, itemIdSelected.ToString(), 0, 999);
|
||||
if (tabItem.Count == 1)
|
||||
{
|
||||
// riposto item a status 1...
|
||||
DataLayer.man.taIL.updateStatus(itemIdSelected, 1, PlaceId);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
// elimino item sel...
|
||||
itemIdSelected = 0;
|
||||
resetShowData();
|
||||
ComLib.resetItemPickup(SheetID, DeviceId);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
@@ -214,19 +214,6 @@ namespace MP_MAG.WebUserControls
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Avvia stampa report pedana
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtPrintReport_Click(object sender, EventArgs e)
|
||||
{
|
||||
// lancio il report x l'elenco pedane + contenuto
|
||||
MagDataLayerObj.taPJQ.insertQuery($"{tipoDocumento.docPackList}", $"{PackListID}", ddlPost.SelectedValue);
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// comando reset
|
||||
/// </summary>
|
||||
|
||||
@@ -285,61 +285,6 @@ namespace MP_MAG.WebUserControls
|
||||
|
||||
private void doUpdate()
|
||||
{
|
||||
#if false
|
||||
// reset grafico
|
||||
icnCart.Attributes.Remove("class");
|
||||
icnCart.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary");
|
||||
icnBin.Attributes.Remove("class");
|
||||
icnBin.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary");
|
||||
icnSecOp.Attributes.Remove("class");
|
||||
icnSecOp.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary");
|
||||
|
||||
// in base al secondo mostro uno o altro...
|
||||
if (showCart)
|
||||
{
|
||||
icnCart.Attributes.Remove("class");
|
||||
icnCart.Attributes.Add("class", "btn btn-sm btn-block btn-success");
|
||||
lblMessage.Text = "Item recognized";
|
||||
// controllo SE HO cart
|
||||
if (currCartTab.Count == 1)
|
||||
{
|
||||
var cartRow = currCartTab[0];
|
||||
// imposto OUT
|
||||
lblDestination.Text = $"SEND TO CART <b>C{cartRow.CartIndex}</b> ({cartRow.CartDtmx})";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblDestination.Text = $"ERROR SEARCHING CART: {currCartTab.Count} found!";
|
||||
}
|
||||
lblDestination.CssClass = "text-success";
|
||||
}
|
||||
else if (showBin)
|
||||
{
|
||||
icnBin.Attributes.Remove("class");
|
||||
icnBin.Attributes.Add("class", "btn btn-sm btn-block btn-primary");
|
||||
lblMessage.Text = "Item recognized";
|
||||
if (currBinTab.Count == 1)
|
||||
{
|
||||
var binRow = currBinTab[0];
|
||||
lblDestination.Text = $"SEND TO BIN <b>B{binRow.BinIndex}</b> ({binRow.BinDtmx})";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblDestination.Text = $"ERROR SEARCHING BIN: {currBinTab.Count} found!";
|
||||
}
|
||||
lblDestination.CssClass = "text-primary";
|
||||
}
|
||||
if (showSecOp)
|
||||
{
|
||||
icnSecOp.Attributes.Remove("class");
|
||||
icnSecOp.Attributes.Add("class", "btn btn-sm btn-block btn-info");
|
||||
lblMessage.Text = "Item recognized";
|
||||
lblLastBCode.Text = $"DO SEC OP: {secOp}";
|
||||
lblLastBCode.CssClass = "text-info";
|
||||
}
|
||||
// fix btn reset!
|
||||
lbtResetSel.Visible = (itemIdSelected != 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
private bool processLastCmd(bool doRaiseEv)
|
||||
@@ -517,16 +462,7 @@ namespace MP_MAG.WebUserControls
|
||||
|
||||
private void resetIcons()
|
||||
{
|
||||
#if false
|
||||
lblDestination.CssClass = "text-secondary";
|
||||
lblMessage.Text = "";
|
||||
lblDestination.Text = "";
|
||||
lblLastBCode.Text = "";
|
||||
lbtCancel.Visible = false;
|
||||
lbtScrapped.Visible = false;
|
||||
lbtParkArea.Visible = false;
|
||||
lbtResetSel.Visible = (itemIdSelected != 0);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
@@ -604,76 +540,5 @@ namespace MP_MAG.WebUserControls
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Mostra o nasconde dettaglio su ITEM letto
|
||||
/// </summary>
|
||||
/// <param name="showItem"></param>
|
||||
/// <param name="itemRow"></param>
|
||||
/// <param name="showError"></param>
|
||||
private void showItemDetail(bool showItem, DS_App.ItemListRow itemRow, bool showError)
|
||||
{
|
||||
resetShowData();
|
||||
divItemDet.Visible = showItem;
|
||||
divItemError.Visible = showError;
|
||||
if (showError)
|
||||
{
|
||||
displError("Item not found", true);
|
||||
}
|
||||
if (showItem)
|
||||
{
|
||||
lblItemCode.Text = itemRow.ItemExtCode;
|
||||
lblItemDesc.Text = itemRow.ItemDesc;
|
||||
lblItemDtmx.Text = itemRow.ItemDtmx;
|
||||
itemIdSelected = itemRow.ItemID;
|
||||
// CONTROLLO SIA in stato 1 --> worked, 2--> selected, 100--> parked...
|
||||
switch (itemRow.StatusID)
|
||||
{
|
||||
case 0:
|
||||
displError("ERROR: Item not ready", false);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case 2:
|
||||
case 100:
|
||||
// salvo che è in STATO 2 (picked up)
|
||||
DataLayer.man.taIL.updateStatus(itemRow.ItemID, 2, PlaceId);
|
||||
// verifico cosa devo mostrare come PROX passaggio...
|
||||
showCart = itemRow.ProcessesReq == "";
|
||||
showBin = (itemRow.ProcessesReq.Contains("PaintFlag"));
|
||||
secOp = itemRow.PostProcList;
|
||||
showSecOp = (secOp != "");
|
||||
doUpdate();
|
||||
break;
|
||||
|
||||
case 3:
|
||||
displError("Item already on CART!", false);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
// fino a concorrenza qta richiesta sposto, POI do errori
|
||||
displError("ALL Item already scanned on BIN!", false);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
displError("Item already at KIT STATION!", false);
|
||||
break;
|
||||
|
||||
case 990:
|
||||
displError("Item declared SCRAP!", false);
|
||||
break;
|
||||
|
||||
case 991:
|
||||
displError("Item declared SCRAP with CNC program created!", false);
|
||||
break;
|
||||
|
||||
default:
|
||||
displError("ERROR: Item status UNKNOWN!", false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
lbtResetSel.Visible = (itemIdSelected != 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -283,61 +283,6 @@ namespace MP_MAG.WebUserControls
|
||||
|
||||
private void doUpdate()
|
||||
{
|
||||
#if false
|
||||
// reset grafico
|
||||
icnCart.Attributes.Remove("class");
|
||||
icnCart.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary");
|
||||
icnBin.Attributes.Remove("class");
|
||||
icnBin.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary");
|
||||
icnSecOp.Attributes.Remove("class");
|
||||
icnSecOp.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary");
|
||||
|
||||
// in base al secondo mostro uno o altro...
|
||||
if (showCart)
|
||||
{
|
||||
icnCart.Attributes.Remove("class");
|
||||
icnCart.Attributes.Add("class", "btn btn-sm btn-block btn-success");
|
||||
lblMessage.Text = "Item recognized";
|
||||
// controllo SE HO cart
|
||||
if (currCartTab.Count == 1)
|
||||
{
|
||||
var cartRow = currCartTab[0];
|
||||
// imposto OUT
|
||||
lblDestination.Text = $"SEND TO CART <b>C{cartRow.CartIndex}</b> ({cartRow.CartDtmx})";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblDestination.Text = $"ERROR SEARCHING CART: {currCartTab.Count} found!";
|
||||
}
|
||||
lblDestination.CssClass = "text-success";
|
||||
}
|
||||
else if (showBin)
|
||||
{
|
||||
icnBin.Attributes.Remove("class");
|
||||
icnBin.Attributes.Add("class", "btn btn-sm btn-block btn-primary");
|
||||
lblMessage.Text = "Item recognized";
|
||||
if (currBinTab.Count == 1)
|
||||
{
|
||||
var binRow = currBinTab[0];
|
||||
lblDestination.Text = $"SEND TO BIN <b>B{binRow.BinIndex}</b> ({binRow.BinDtmx})";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblDestination.Text = $"ERROR SEARCHING BIN: {currBinTab.Count} found!";
|
||||
}
|
||||
lblDestination.CssClass = "text-primary";
|
||||
}
|
||||
if (showSecOp)
|
||||
{
|
||||
icnSecOp.Attributes.Remove("class");
|
||||
icnSecOp.Attributes.Add("class", "btn btn-sm btn-block btn-info");
|
||||
lblMessage.Text = "Item recognized";
|
||||
lblLastBCode.Text = $"DO SEC OP: {secOp}";
|
||||
lblLastBCode.CssClass = "text-info";
|
||||
}
|
||||
// fix btn reset!
|
||||
lbtResetSel.Visible = (itemIdSelected != 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
private bool processLastCmd(bool doRaiseEv)
|
||||
@@ -566,27 +511,6 @@ namespace MP_MAG.WebUserControls
|
||||
/// <param name="resetStatus"></param>
|
||||
protected void resetSelection(bool resetStatus)
|
||||
{
|
||||
#if false
|
||||
if (resetStatus)
|
||||
{
|
||||
try
|
||||
{
|
||||
// SE item esiste...
|
||||
var tabItem = DataLayer.man.taIL.getBySearch(itemIdSelected, itemIdSelected.ToString(), 0, 999);
|
||||
if (tabItem.Count == 1)
|
||||
{
|
||||
// riposto item a status 1...
|
||||
DataLayer.man.taIL.updateStatus(itemIdSelected, 1, PlaceId);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
// elimino item sel...
|
||||
itemIdSelected = 0;
|
||||
resetShowData();
|
||||
ComLib.resetItemPickup(SheetID, DeviceId);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -602,76 +526,5 @@ namespace MP_MAG.WebUserControls
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Mostra o nasconde dettaglio su ITEM letto
|
||||
/// </summary>
|
||||
/// <param name="showItem"></param>
|
||||
/// <param name="itemRow"></param>
|
||||
/// <param name="showError"></param>
|
||||
private void showItemDetail(bool showItem, DS_App.ItemListRow itemRow, bool showError)
|
||||
{
|
||||
resetShowData();
|
||||
divItemDet.Visible = showItem;
|
||||
divItemError.Visible = showError;
|
||||
if (showError)
|
||||
{
|
||||
displError("Item not found", true);
|
||||
}
|
||||
if (showItem)
|
||||
{
|
||||
lblItemCode.Text = itemRow.ItemExtCode;
|
||||
lblItemDesc.Text = itemRow.ItemDesc;
|
||||
lblItemDtmx.Text = itemRow.ItemDtmx;
|
||||
itemIdSelected = itemRow.ItemID;
|
||||
// CONTROLLO SIA in stato 1 --> worked, 2--> selected, 100--> parked...
|
||||
switch (itemRow.StatusID)
|
||||
{
|
||||
case 0:
|
||||
displError("ERROR: Item not ready", false);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case 2:
|
||||
case 100:
|
||||
// salvo che è in STATO 2 (picked up)
|
||||
DataLayer.man.taIL.updateStatus(itemRow.ItemID, 2, PlaceId);
|
||||
// verifico cosa devo mostrare come PROX passaggio...
|
||||
showCart = itemRow.ProcessesReq == "";
|
||||
showBin = (itemRow.ProcessesReq.Contains("PaintFlag"));
|
||||
secOp = itemRow.PostProcList;
|
||||
showSecOp = (secOp != "");
|
||||
doUpdate();
|
||||
break;
|
||||
|
||||
case 3:
|
||||
displError("Item already on CART!", false);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
// fino a concorrenza qta richiesta sposto, POI do errori
|
||||
displError("ALL Item already scanned on BIN!", false);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
displError("Item already at KIT STATION!", false);
|
||||
break;
|
||||
|
||||
case 990:
|
||||
displError("Item declared SCRAP!", false);
|
||||
break;
|
||||
|
||||
case 991:
|
||||
displError("Item declared SCRAP with CNC program created!", false);
|
||||
break;
|
||||
|
||||
default:
|
||||
displError("ERROR: Item status UNKNOWN!", false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
lbtResetSel.Visible = (itemIdSelected != 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user