Files
NKC/NKC_WF/WebUserControls/cmp_PartMIA_byBinID.ascx.cs
T
Samuele E. Locatelli 59b319418d Gestione BIN PRE x MIA
2020-08-31 14:28:50 +02:00

107 lines
2.6 KiB
C#

using SteamWare;
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_PartMIA_byBinID : BaseUserControl
{
/// <summary>
/// BinID richiesta
/// </summary>
protected int reqBinID
{
get
{
int answ = 0;
try
{
answ = memLayer.ML.QSI("BinID");
}
catch
{ }
return answ;
}
}
protected void Page_Load(object sender, EventArgs e)
{
BinID = reqBinID;
}
/// <summary>
/// BinID corrente...
/// </summary>
public int BinID
{
set
{
hfBinID.Value = value.ToString();
doUpdate();
}
get
{
int answ = 0;
int.TryParse(hfBinID.Value, out answ);
return answ;
}
}
public void doUpdate()
{
grView.DataBind();
}
public bool checkVisible(object _statusID)
{
bool answ = false;
int StatusID = 0;
int.TryParse(_statusID.ToString(), out StatusID);
answ = StatusID < 900;
return answ;
}
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
int ItemId = 0;
int.TryParse(grView.SelectedValue.ToString(), out ItemId);
if (ItemId > 0)
{
// resetto item selezionato...
DLMan.taIL.updateStatus(ItemId, 990, PlaceId);
lgInfo($"cmp_partMIA_byBinID | SCRAP | Status --> 990 | itemIdSelected: {ItemId} | PlaceId: {PlaceId}");
grView.SelectedIndex = -1;
grView.DataBind();
raiseEvent();
}
}
public int numRow
{
get
{
return grView.PageSize;
}
set
{
grView.PageSize = value;
}
}
public bool showFull
{
get
{
bool answ = false;
bool.TryParse(hfShowFull.Value, out answ);
return answ;
}
set
{
hfShowFull.Value = value.ToString();
grView.DataBind();
}
}
}
}