Ejemplo n.º 1
0
        //查询事件
        private void QueryEvent(object sender, EventArgs e)
        {
            //added by jessie lee,2005/9/20
            //限制计入统计的维修状态
            ArrayList array = new ArrayList();

            array.Add(TSStatus.TSStatus_Complete);
            array.Add(TSStatus.TSStatus_Reflow);
            FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider);

            (e as WebQueryEventArgsNew).GridDataSource =
                facadeFactory.CreateQueryTSRecordFacade().QueryTSPerformanceRecord(
                    FormatHelper.CleanString(this.ModelCode).ToUpper(),
                    FormatHelper.CleanString(this.ItemCode).ToUpper(),
                    FormatHelper.CleanString(this.MoCode).ToUpper(),
                    "", "",
                    this.StartDate,
                    this.EndDate,
                    array, this.TsOperator, this.TsResource,
                    (e as WebQueryEventArgsNew).StartRow,
                    (e as WebQueryEventArgsNew).EndRow);

            (e as WebQueryEventArgsNew).RowCount =
                facadeFactory.CreateQueryTSRecordFacade().QueryTSPerformanceRecordCount(
                    FormatHelper.CleanString(this.ModelCode).ToUpper(),
                    FormatHelper.CleanString(this.ItemCode).ToUpper(),
                    FormatHelper.CleanString(this.MoCode).ToUpper(),
                    "", "",
                    this.StartDate,
                    this.EndDate,
                    array, this.TsOperator, this.TsResource);
        }
Ejemplo n.º 2
0
        private void QueryEvent(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

            int startDate = DefaultDateTime.DefaultToInt;
            int endDate   = DefaultDateTime.DefaultToInt;

            startDate = FormatHelper.TODateInt(this.dateStartDateQuery.Text);
            endDate   = FormatHelper.TODateInt(this.dateEndDateQuery.Text);

            FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider);

            (e as WebQueryEventArgsNew).GridDataSource =
                facadeFactory.CreateQueryTSRecordFacade().QueryTSRecord_New(
                    this.drpFGorSemiFG.SelectedValue,
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtConditionItem.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtConditionMo.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(startSourceCard)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(endSourceCard)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtReworkMo.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtSegmentCodeQuery.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtStepSequence.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtOPCodeEdit.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtBigSSCodeGroupQuery.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMaterialModelCodeQuery.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMaterialMachineTypeGroup.Text)),
                    startDate, endDate, CheckBoxListBuilder.GetCheckedList(this.chkTSStateList),
                    (e as WebQueryEventArgsNew).StartRow,
                    (e as WebQueryEventArgsNew).EndRow);
            (e as WebQueryEventArgsNew).RowCount =
                facadeFactory.CreateQueryTSRecordFacade().QueryTSRecordCount_New(
                    this.drpFGorSemiFG.SelectedValue,
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtConditionItem.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtConditionMo.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(startSourceCard)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(endSourceCard)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtReworkMo.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtSegmentCodeQuery.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtStepSequence.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtOPCodeEdit.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtBigSSCodeGroupQuery.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMaterialModelCodeQuery.Text)),
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMaterialMachineTypeGroup.Text)),
                    startDate, endDate, CheckBoxListBuilder.GetCheckedList(this.chkTSStateList));
        }
Ejemplo n.º 3
0
        private void _helper_LoadGridDataSource(object sender, EventArgs e)
        {
            if (this._checkRequireFields())
            {
                (e as WebQueryEventArgs).GridDataSource =
                    FacadeFactory.CreateQueryTSRecordFacade().QueryTSRecord(
                        FormatHelper.CleanString(this.txtConditionModel.Text).ToUpper(),
                        FormatHelper.CleanString(this.txtConditionItem.Text).ToUpper(),
                        FormatHelper.CleanString(this.txtConditionMo.Text).ToUpper(),
                        FormatHelper.CleanString(this.txtStartSnQuery.Text).ToUpper(),
                        FormatHelper.CleanString(this.txtEndSnQuery.Text).ToUpper(),
                        FormatHelper.TODateInt(this.dateStartDateQuery.Text),
                        FormatHelper.TODateInt(this.dateEndDateQuery.Text),
                        TSStateListBuilder.GetCheckedTSStateList(this.chkTSStateList),
                        "",
                        (e as WebQueryEventArgs).StartRow,
                        (e as WebQueryEventArgs).EndRow);

                (e as WebQueryEventArgs).RowCount =
                    FacadeFactory.CreateQueryTSRecordFacade().QueryTSRecordCount(
                        FormatHelper.CleanString(this.txtConditionModel.Text).ToUpper(),
                        FormatHelper.CleanString(this.txtConditionItem.Text).ToUpper(),
                        FormatHelper.CleanString(this.txtConditionMo.Text).ToUpper(),
                        FormatHelper.CleanString(this.txtStartSnQuery.Text).ToUpper(),
                        FormatHelper.CleanString(this.txtEndSnQuery.Text).ToUpper(),
                        FormatHelper.TODateInt(this.dateStartDateQuery.Text),
                        FormatHelper.TODateInt(this.dateEndDateQuery.Text),
                        TSStateListBuilder.GetCheckedTSStateList(this.chkTSStateList),
                        "");
            }
        }
Ejemplo n.º 4
0
 //导出事件
 private void ExportQueryEvent(object sender, EventArgs e)
 {
     if (chbRepairDetail.Checked)
     {
         //TODO ForSimone
         //added by jessie lee,2005/9/20
         //限制计入统计的维修状态
         ArrayList array = new ArrayList();
         array.Add(TSStatus.TSStatus_Complete);
         array.Add(TSStatus.TSStatus_Reflow);
         FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider);
         (e as WebQueryEventArgs).GridDataSource =
             facadeFactory.CreateQueryTSRecordFacade().ExportQueryTSPerformanceRecord(
                 FormatHelper.CleanString(this.ModelCode).ToUpper(),
                 FormatHelper.CleanString(this.ItemCode).ToUpper(),
                 FormatHelper.CleanString(this.MoCode).ToUpper(),
                 "", "",
                 this.StartDate,
                 this.EndDate,
                 array, this.TsOperator, this.TsResource,
                 (e as WebQueryEventArgs).StartRow,
                 (e as WebQueryEventArgs).EndRow);
     }
     else
     {
         this.QueryEvent(sender, e);
     }
 }
Ejemplo n.º 5
0
        //导出按钮事件
        private void ExprotEvent(object sender, EventArgs e)
        {
            if (this._checkRequireFields())
            {
                if (chbRepairDetail.Checked)
                {
                    //包含维修明细 TODO ForSimone
                    if (this._checkRequireFields())
                    {
                        int startDate        = DefaultDateTime.DefaultToInt;
                        int endDate          = DefaultDateTime.DefaultToInt;
                        int receiveBeginDate = DefaultDateTime.DefaultToInt;
                        int receiveEndDate   = DefaultDateTime.DefaultToInt;
                        int TSBeginDate      = DefaultDateTime.DefaultToInt;
                        int TSEndDate        = DefaultDateTime.DefaultToInt;

                        int startTime = 0;        // FormatHelper.TOTimeInt(this.dateStartTimeQuery.Text);
                        int endTime   = 0;        // FormatHelper.TOTimeInt(this.dateEndTimeQuery.Text);

                        int receiveBeginTime = 0; // FormatHelper.TOTimeInt(this.txtReceiveBeginTime.Text);
                        int receiveEndTime   = 0; // FormatHelper.TOTimeInt(this.txtReceiveEndTime.Text);

                        int TSBeginTime = 0;      // FormatHelper.TOTimeInt(this.txtTSBeginTime.Text);
                        int TSEndTime   = 0;      // ormatHelper.TOTimeInt(this.txtTSEndTime.Text);


                        if (this.rdbErrorDate.Checked)
                        {
                            startDate = FormatHelper.TODateInt(this.dateStartDateQuery.Text);
                            endDate   = FormatHelper.TODateInt(this.dateEndDateQuery.Text);
                        }

                        if (this.rdbReceivedDate.Checked)
                        {
                            receiveBeginDate = FormatHelper.TODateInt(this.txtReceiveBeginDate.Text);
                            receiveEndDate   = FormatHelper.TODateInt(this.txtReceiveEndDate.Text);
                        }
                        if (this.rdbTSDate.Checked)
                        {
                            TSBeginDate = FormatHelper.TODateInt(this.txtTSBeginDate.Text);
                            TSEndDate   = FormatHelper.TODateInt(this.txtTSEndDate.Text);
                        }

                        FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider);
                        (e as WebQueryEventArgs).GridDataSource =
                            facadeFactory.CreateQueryTSRecordFacade().QueryExportTSRecord(
                                FormatHelper.CleanString(this.txtConditionModel.Text).ToUpper(),
                                FormatHelper.CleanString(this.txtConditionItem.Text).ToUpper(),
                                FormatHelper.CleanString(this.txtConditionMo.Text).ToUpper(),
                                FormatHelper.CleanString(this.txtReworkMo.Text).ToUpper(),
                                FormatHelper.CleanString(this.txtStartSnQuery.Text).ToUpper(),
                                FormatHelper.CleanString(this.txtEndSnQuery.Text).ToUpper(),
                                startDate, startTime,
                                endDate, endTime,
                                receiveBeginDate, receiveBeginTime,
                                receiveEndDate, receiveEndTime,
                                TSBeginDate, TSBeginTime,
                                TSEndDate, TSEndTime,
                                CheckBoxListBuilder.GetCheckedList(this.chkTSStateList),
                                FormatHelper.CleanString(this.txtConditionResource.Text).ToUpper(),
                                FormatHelper.CleanString(this.txtFromResource.Text).ToUpper(),
                                FormatHelper.CleanString(this.txtConfirmRes.Text).ToUpper(),
                                (e as WebQueryEventArgs).StartRow,
                                (e as WebQueryEventArgs).EndRow);
                    }
                }
                else
                {
                    this.QueryEvent(sender, e);
                }
            }
        }