Files
C.TRACK/MP-MAG/WebUserControls/cmp_SelPackList.ascx.cs
T
2020-12-30 17:35:12 +01:00

52 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MP_MAG.WebUserControls
{
public partial class cmp_SelPackList : BaseUserControl
{
#region Protected Fields
protected string baseText = "PACK LIST";
protected string cssCol = "primary";
#endregion Protected Fields
#region Public Properties
public int PackListID
{
get
{
int answ = 0;
int.TryParse(hfPackListID.Value, out answ);
return answ;
}
set
{
hfPackListID.Value = $"{value}";
cmp_OrderList.PackListID = value;
lbtShow.CssClass = value > 0 ? $"btn btn-{cssCol} btn-block" : $"btn btn-outline-{cssCol} btn-block disabled";
lbtShow.Text = $"{baseText} <b>{value}</b>";
}
}
#endregion Public Properties
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
PackListID = 0;
}
}
#endregion Protected Methods
}
}