using System;

namespace NKC_WF.site
{
    public partial class OrderScheduler : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!Page.IsPostBack)
            {
                ((SiteMaster)this.Master).showSearch = false;
                cmp_orderPrintRun.Visible = false;
                cmp_orderPrintSch.Visible = false;
            }
            cmp_orderRunning.eh_doRefresh += cmp_orderRunning_eh_doRefresh;
            cmp_orderRunning.eh_doReset += cmp_orderRunning_eh_doReset;
            cmp_orderSched.eh_doRefresh += cmp_orderSched_eh_doRefresh;
            cmp_orderSched.eh_doReset += cmp_orderSched_eh_doReset;
        }

        private void cmp_orderSched_eh_doReset(object sender, EventArgs e)
        {
            cmp_orderPrintSch.BatchId = 0;
            cmp_orderPrintSch.Visible = false;
        }

        private void cmp_orderSched_eh_doRefresh(object sender, EventArgs e)
        {
            cmp_orderPrintSch.BatchId = cmp_orderSched.selBatchId;
            cmp_orderPrintSch.Visible = true;
        }

        private void cmp_orderRunning_eh_doReset(object sender, EventArgs e)
        {
            cmp_orderPrintRun.BatchId = 0;
            cmp_orderPrintRun.Visible = false;
        }

        private void cmp_orderRunning_eh_doRefresh(object sender, EventArgs e)
        {
            cmp_orderPrintRun.BatchId = cmp_orderRunning.selBatchId;
            cmp_orderPrintRun.Visible = true;
        }
    }
}