protected void Page_Load(object sender, System.EventArgs e)
        {
            this._gridHelper = new GridHelperForRPT(this.gridWebGrid);
            this.gridWebGrid.DisplayLayout.CellClickActionDefault = CellClickAction.NotSet;

            if (!this.IsPostBack)
            {
                // 初始化页面语言
                this.InitPageLanguage(this.languageComponent1, false);

                this.eMESDate1.Text = FormatHelper.ToDateString(FormatHelper.TODateInt(System.DateTime.Now));
                //
                BaseModelFacade facade   = new FacadeFactory(base.DataProvider).CreateBaseModelFacade();
                object[]        segments = facade.QuerySegment("", 0, System.Int32.MaxValue);
                if (segments != null)
                {
                    this.drpSegmentQuery.Items.Clear();

                    foreach (Segment seg in segments)
                    {
                        this.drpSegmentQuery.Items.Add(seg.SegmentCode);
                    }

                    this.drpSegmentQuery.Items.Insert(0, "");

                    this.RefreshController1.Interval = ConfigSection.Current.DomainSetting.Interval;
                }

                this._initialWebGrid();
            }

            if (!this.IsPostBack)
            {
                //如果接受到其它页面的参数直接执行查询
                if (this.GetRequestParam("post") != null && this.GetRequestParam("post") != string.Empty)
                {
                    this.eMESDate1.Text = this.GetRequestParam("shiftday");                                             //日期
                    this.drpSegmentQuery.SelectedValue = this.GetRequestParam("segmentcode");                           //工段
                    this.drpSegmentQuery_SelectedIndexChanged(null, null);                                              //加载班次选项
                    this.drpShiftQuery.SelectedValue = this.GetRequestParam("shiftcode");                               //班次
                    this.txtModelQuery.Text          = this.GetRequestParam("modelcode");                               //产品别
                    this.txtItemQuery.Text           = this.GetRequestParam("itemcode");                                //产品
                    this.txtMoQuery.Text             = this.GetRequestParam("mocode");                                  //工单
                    this._doQuery();
                }
            }
            if (this.V_StartRefresh)
            {
                this._doQuery();
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            this._gridHelper = new GridHelperForRPT(this.gridWebGrid);

            if (!this.IsPostBack)
            {
                // 初始化页面语言
                this.InitPageLanguage(this.languageComponent1, false);

                this.eMESDate1.Text = FormatHelper.ToDateString(FormatHelper.TODateInt(System.DateTime.Now));
                //
                BaseModelFacade facade   = new FacadeFactory(base.DataProvider).CreateBaseModelFacade();
                object[]        segments = facade.QuerySegment("", 0, System.Int32.MaxValue);
                if (segments != null)
                {
                    this.drpSegmentQuery.Items.Clear();

                    foreach (Segment seg in segments)
                    {
                        this.drpSegmentQuery.Items.Add(seg.SegmentCode);
                    }

                    this.drpSegmentQuery.Items.Insert(0, "");

                    this._initialWebGrid();

                    this.RefreshController1.Interval = ConfigSection.Current.DomainSetting.Interval;

                    this.txtTargetPercent.Attributes.Add("onblur", "Format()");
                }

                factory_load();
            }

            if (this.V_StartRefresh)
            {
                this._doQuery();
            }
        }
        //protected GridHelper gridHelper = null;

        protected void Page_Load(object sender, System.EventArgs e)
        {
            this.gridHelper = new GridHelperNew(this.gridWebGrid, DtSource);
            //this.gridWebGrid.DisplayLayout.CellClickActionDefault = CellClickAction.NotSet;

            if (!this.IsPostBack)
            {
                // 初始化页面语言
                this.InitPageLanguage(this.languageComponent1, false);

                this.eMESDate1.Text = FormatHelper.ToDateString(FormatHelper.TODateInt(System.DateTime.Now));
                //
                BaseModelFacade facade   = new FacadeFactory(base.DataProvider).CreateBaseModelFacade();
                object[]        segments = facade.QuerySegment("", 0, System.Int32.MaxValue);
                if (segments != null)
                {
                    this.drpSegmentQuery.Items.Clear();

                    foreach (Segment seg in segments)
                    {
                        this.drpSegmentQuery.Items.Add(seg.SegmentCode);
                    }

                    this.drpSegmentQuery.Items.Insert(0, "");

                    this.RefreshController1.Interval = ConfigSection.Current.DomainSetting.Interval;
                }

                this._initialWebGrid();
            }

            if (this.V_StartRefresh)
            {
                this._doQuery();
            }
        }