using SteamWare;
using System;

namespace NKC_WF
{
    public partial class MachineLoad : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                ((SiteMaster)this.Master).showSearch = false;
                forceRefresh();
            }
            cmp_stackLoading.eh_doRefresh += Cmp_stackLoading_eh_doRefresh;
        }

        private void Cmp_stackLoading_eh_doRefresh(object sender, EventArgs e)
        {
            forceRefresh();
        }

        private void forceRefresh()
        {
            cmp_stackLoading.doUpdate();
            cmp_ML_ShDet.BatchId = cmp_stackLoading.BatchIdCurr;
            cmp_ML_ShDet1.BatchId = cmp_stackLoading.BatchIdCurr;
            cmp_ML_ShDet2.BatchId = cmp_stackLoading.BatchIdCurr;
            cmp_ML_ShDet3.BatchId = cmp_stackLoading.BatchIdCurr;
            cmp_ML_ShDet.doUpdate();
            cmp_ML_ShDet1.doUpdate();
            cmp_ML_ShDet2.doUpdate();
            cmp_ML_ShDet3.doUpdate();
        }

        protected void timerLoad_Tick(object sender, EventArgs e)
        {
            forceRefresh();
        }
        protected void timerLong_Tick(object sender, EventArgs e)
        {
            Response.Redirect(Request.RawUrl);
        }
    }
}