using AppData;
using System;

namespace NKC_WF.WebUserControls
{
    public partial class cmp_MU_stats : BaseUserControl
    {
        /// <summary>
        /// Batch corrente...
        /// </summary>
        public int BatchId
        {
            set
            {
                hfBatchID.Value = value.ToString();
                doUpdate();
            }
            get
            {
                int answ = 0;
                int.TryParse(hfBatchID.Value, out answ);
                return answ;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        public void doUpdate()
        {

            // fix x BIN
            cmp_MU_singleStatBin.BatchId = BatchId;
            cmp_MU_singleStatBin.statLevel = (int)StatType.BIN;
            cmp_MU_singleStatBin.titleCss = "bg-primary text-light";


            // fix x BATCH
            cmp_MU_singleStatBatch.BatchId = BatchId;
            cmp_MU_singleStatBatch.statLevel = (int)StatType.BATCH;
            cmp_MU_singleStatBatch.titleCss = "bg-info";

            // fix x BUNK
            cmp_MU_singleStatBunk.BatchId = BatchId;
            cmp_MU_singleStatBunk.statLevel = (int)StatType.BUNK;
            cmp_MU_singleStatBunk.titleCss = "bg-secondary text-light";


            // fix x SHEET
            cmp_MU_singleStatSheet.BatchId = BatchId;
            cmp_MU_singleStatSheet.statLevel = (int)StatType.SHEET;
            cmp_MU_singleStatSheet.titleCss = "bg-warning";

            // fix x CART
            cmp_MU_singleStatCart.BatchId = BatchId;
            cmp_MU_singleStatCart.statLevel = (int)StatType.CART;
            cmp_MU_singleStatCart.titleCss = "bg-success";

        }
    }
}