Example #1
0
        private void QueryEvent(object sender, EventArgs e)
        {
            int BeginDate = FormatHelper.TODateInt(this.txtBeginDate.Text);
            int EndDate   = FormatHelper.TODateInt(this.txtEndDate.Text);

            FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider);

            (e as WebQueryEventArgs).GridDataSource =
                facadeFactory.CreateQueryFacade3().QueryPT(
                    FormatHelper.CleanString(this.txtItemQuery.Text).ToUpper(),
                    FormatHelper.CleanString(this.txtMoQuery.Text).ToUpper(),
                    FormatHelper.CleanString(this.txtStartSnQuery.Text).ToUpper(),
                    FormatHelper.CleanString(this.txtEndSnQuery.Text).ToUpper(),
                    BeginDate,
                    EndDate,
                    (e as WebQueryEventArgs).StartRow,
                    (e as WebQueryEventArgs).EndRow);

            (e as WebQueryEventArgs).RowCount =
                facadeFactory.CreateQueryFacade3().QueryPTCount(
                    FormatHelper.CleanString(this.txtItemQuery.Text).ToUpper(),
                    FormatHelper.CleanString(this.txtMoQuery.Text).ToUpper(),
                    FormatHelper.CleanString(this.txtStartSnQuery.Text).ToUpper(),
                    FormatHelper.CleanString(this.txtEndSnQuery.Text).ToUpper(),
                    BeginDate,
                    EndDate
                    );
        }
Example #2
0
        private void _helper_LoadGridDataSource(object sender, EventArgs e)
        {
            FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider);

            (e as WebQueryEventArgsNew).GridDataSource =
                facadeFactory.CreateQueryFacade3().QueryOnWipInfoDistributing(
                    this.ViewState["Status"].ToString(),
                    this.txtItemCodeQuery.Text,
                    this.ViewState["ShiftCode"].ToString(),
                    this.txtOperationCodeQuery.Text,
                    this.txtResourceCodeQuery.Text,
                    this.txtMoCodeQuery.Text,
                    FormatHelper.TODateInt(this.ViewState["ShiftDay"].ToString()),
                    FormatHelper.TODateInt(this.ViewState["ShiftDay"].ToString()),
                    (e as WebQueryEventArgsNew).StartRow,
                    (e as WebQueryEventArgsNew).EndRow);

            (e as WebQueryEventArgsNew).RowCount =
                facadeFactory.CreateQueryFacade3().QueryOnWipInfoDistributingCount(
                    this.ViewState["Status"].ToString(),
                    this.txtItemCodeQuery.Text,
                    this.ViewState["ShiftCode"].ToString(),
                    this.txtOperationCodeQuery.Text,
                    this.txtResourceCodeQuery.Text,
                    this.txtMoCodeQuery.Text,
                    FormatHelper.TODateInt(this.ViewState["ShiftDay"].ToString()),
                    FormatHelper.TODateInt(this.ViewState["ShiftDay"].ToString()));
        }
Example #3
0
        private void _helper_LoadGridDataSource(object sender, EventArgs e)
        {
            FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider);

            (e as WebQueryEventArgsNew).GridDataSource = facadeFactory.CreateQueryFacade3().QueryOnWipInfoOnResource(
                this.txtItemCodeQuery.Text,
                this.txtMoCodeQuery.Text,
                this.txtOperationCodeQuery.Text,
                FormatHelper.TODateInt(this.txtStartDate.Value),
                FormatHelper.TODateInt(this.txtEndDate.Value),
                (e as WebQueryEventArgsNew).StartRow,
                (e as WebQueryEventArgsNew).EndRow);

            (e as WebQueryEventArgsNew).RowCount =
                facadeFactory.CreateQueryFacade3().QueryOnWipInfoOnResourceCount(
                    this.txtItemCodeQuery.Text,
                    this.txtMoCodeQuery.Text,
                    this.txtOperationCodeQuery.Text,
                    FormatHelper.TODateInt(this.txtStartDate.Value),
                    FormatHelper.TODateInt(this.txtEndDate.Value));
        }
Example #4
0
        //protected GridHelper gridHelper = null;

        protected void Page_Load(object sender, System.EventArgs e)
        {
            this.gridHelper = new GridHelperNew(this.gridWebGrid, DtSource);
            this._helper    = new WebQueryHelperNew(null, this.cmdGridExport, this.gridWebGrid, this.pagerSizeSelector, this.pagerToolBar, this.languageComponent1, DtSource);
            this._helper.LoadGridDataSource      += new EventHandler(_helper_LoadGridDataSource);
            this._helper.DomainObjectToGridRow   += new EventHandler(_helper_DomainObjectToGridRow);
            this._helper.DomainObjectToExportRow += new EventHandler(_helper_DomainObjectToExportRow);
            this._helper.GetExportHeadText       += new EventHandler(_helper_GetExportHeadText);
            //this._helper.GridCellClick +=new EventHandler(_helper_GridCellClick);

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

                /* added by jessie lee, 2005/12/30,
                 * 在在制分布页面判断工序是否为FQC工序 */
                bool isFQC = false;
                if (string.Compare(this.GetRequestParam("OperationCode"), "TS", true) != 0)
                {
                    FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider);
                    isFQC = facadeFactory.CreateQueryFacade3().IsOpFQC(
                        this.GetRequestParam("OperationCode"),
                        this.GetRequestParam("ItemCode"),
                        this.GetRequestParam("MoCode"),
                        FormatHelper.TODateInt(this.GetRequestParam("STARTDATE")),
                        FormatHelper.TODateInt(this.GetRequestParam("ENDDATE")));
                }
                this.ViewState["IsFQC"] = isFQC;

                this._initialWebGrid();

                this.txtItemCodeQuery.Text      = this.GetRequestParam("ItemCode");
                this.txtMoCodeQuery.Text        = this.GetRequestParam("MoCode");
                this.txtOperationCodeQuery.Text = this.GetRequestParam("OperationCode");
                this.txtStartDate.Value         = this.GetRequestParam("STARTDATE");
                this.txtEndDate.Value           = this.GetRequestParam("ENDDATE");

                this._helper.Query(sender);
            }
        }
Example #5
0
        private void _helper_LoadGridDataSource(object sender, EventArgs e)
        {
            if (!_checkRequireFields())
            {
                return;
            }

            this.ViewState["ItemCode"] = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtItemCodeQuery.Text));
            this.ViewState["MoCode"]   = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMoCodeQuery.Text));

            //this.OWCChartSpace1.ClearCharts();

            FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider);

            object[] dataSource = facadeFactory.CreateQueryFacade3().QueryOnWipInfoOnOperation(
                this.ViewState["ItemCode"].ToString(),
                this.ViewState["MoCode"].ToString(),
                //this.dFactoryCode.SelectedValue,
                FormatHelper.TODateInt(this.dateStartDateQuery.Text),
                FormatHelper.TODateInt(this.dateEndDateQuery.Text),
                (e as WebQueryEventArgsNew).StartRow,
                (e as WebQueryEventArgsNew).EndRow);

            (e as WebQueryEventArgsNew).GridDataSource = dataSource;

            (e as WebQueryEventArgsNew).RowCount =
                facadeFactory.CreateQueryFacade3().QueryOnWipInfoOnOperationCount(
                    this.ViewState["ItemCode"].ToString(),
                    this.ViewState["MoCode"].ToString(),
                    FormatHelper.TODateInt(this.dateStartDateQuery.Text),
                    FormatHelper.TODateInt(this.dateEndDateQuery.Text)
                    );


            //update by Seven  2011-01-06
            if (dataSource != null)
            {
                this.columnChart.Visible = true;
                NewReportDomainObject[] dateSourceForOWC = new NewReportDomainObject[dataSource.Length];

                string propertyName = "Operation";
                NewReportDomainObject item;
                for (int i = 0; i < dataSource.Length; i++)
                {
                    item                = new NewReportDomainObject();
                    item.EAttribute1    = propertyName;
                    item.PeriodCode     = (dataSource[i] as OnWipInfoOnOperation).OperationCode;
                    item.TempValue      = (dataSource[i] as OnWipInfoOnOperation).OnWipQuantityOnOperation.ToString();
                    dateSourceForOWC[i] = item;
                }

                this.columnChart.ChartGroupByString    = "";
                this.columnChart.ChartTextFormatString = "<DATA_VALUE:0.##>";
                this.columnChart.YLabelFormatString    = "<DATA_VALUE:0.##>";
                this.columnChart.DataType   = true;
                this.columnChart.DataSource = dateSourceForOWC;
                this.columnChart.DataBind();
            }
            else
            {
                this.columnChart.Visible = false;
            }
            //end
        }