Files
NKC/NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx.cs
T
2020-08-27 18:41:49 +02:00

106 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_byPLID : BaseUserControl
{
/// <summary>
/// PackListID richiesta
/// </summary>
protected int reqPLID
{
get
{
int answ = 0;
try
{
answ = memLayer.ML.QSI("PLID");
}
catch
{ }
return answ;
}
}
protected void Page_Load(object sender, EventArgs e)
{
PLID = reqPLID;
}
/// <summary>
/// PLID corrente...
/// </summary>
public int PLID
{
set
{
hfPLID.Value = value.ToString();
doUpdate();
}
get
{
int answ = 0;
int.TryParse(hfPLID.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_byPLID | 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();
}
}
}
}