Пример #1
0
        private void _helper_LoadGridDataSource(object sender, EventArgs e)
        {
            //将序列号转换为SourceCode
            DataCollectFacade dataCollectfacade = new DataCollectFacade(this.DataProvider);
            //对于序列号的输入框,需要进行一下处理
            string startRCard = FormatHelper.CleanString(this.txtStartSnQuery.Text.Trim().ToUpper());
            string endRCard   = FormatHelper.CleanString(this.txtEndSnQuery.Text.Trim().ToUpper());
            //转换成SourceCard
            string startSourceCard = dataCollectfacade.GetSourceCard(startRCard, string.Empty);
            string endSourceCard   = dataCollectfacade.GetSourceCard(endRCard, string.Empty);
            //end

            FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider);

            (e as WebQueryEventArgsNew).GridDataSource =
                facadeFactory.CreateQuerySMTNGFacade().QuerySMTNG(
                    FormatHelper.CleanString(this.txtConditionItem.Text).ToUpper(),
                    FormatHelper.CleanString(this.txtConditionMo.Text).ToUpper(),
                    FormatHelper.CleanString(this.txtConditionStepSequence.Text).ToUpper(),
                    FormatHelper.CleanString(startSourceCard),
                    FormatHelper.CleanString(endSourceCard),
                    (e as WebQueryEventArgsNew).StartRow,
                    (e as WebQueryEventArgsNew).EndRow);

            (e as WebQueryEventArgsNew).RowCount =
                facadeFactory.CreateQuerySMTNGFacade().QuerySMTNGCount(
                    FormatHelper.CleanString(this.txtConditionItem.Text).ToUpper(),
                    FormatHelper.CleanString(this.txtConditionMo.Text).ToUpper(),
                    FormatHelper.CleanString(this.txtConditionStepSequence.Text).ToUpper(),
                    FormatHelper.CleanString(startSourceCard),
                    FormatHelper.CleanString(endSourceCard));
        }
Пример #2
0
        private void _helper_LoadGridDataSource(object sender, EventArgs e)
        {
            if (this._checkRequireFields())
            {
                FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider);
                (e as WebQueryEventArgsNew).GridDataSource =
                    facadeFactory.CreateQuerySMTNGFacade().QuerySMTNGDetails(
                        "",
                        FormatHelper.CleanString(this.txtSNQuery.Text).ToUpper(),
                        "",
                        "",
                        (e as WebQueryEventArgsNew).StartRow,
                        (e as WebQueryEventArgsNew).EndRow);

                (e as WebQueryEventArgsNew).RowCount =
                    facadeFactory.CreateQuerySMTNGFacade().QuerySMTNGDetailsCount(
                        "",
                        FormatHelper.CleanString(this.txtSNQuery.Text).ToUpper(),
                        "",
                        "");
            }
        }