예제 #1
0
        private string GetOPControl(Hashtable htRoute, Hashtable htOP, RPTCenterYield real)
        {
            string routeCode = "";

            if (htRoute.Contains(real.MOCode) == true)
            {
                routeCode = ((MO2Route)htRoute[real.MOCode]).RouteCode;
            }

            object objOp = null;

            if (htOP.Contains(real.ItemCode + ":" + routeCode + ":" + real.OperationCode) == true)
            {
                objOp = htOP[real.ItemCode + ":" + routeCode + ":" + real.OperationCode];
            }
            else
            {
                QueryFacade1 queryFacade1 = new QueryFacade1(this.DataProvider);
                try
                {
                    objOp = queryFacade1.GetItemRoute2Operation(real.ItemCode, routeCode, real.OperationCode);
                    if (objOp != null)
                    {
                        htOP.Add(real.ItemCode + ":" + routeCode + ":" + real.OperationCode, objOp);
                    }
                }
                catch {}
            }
            string opControl = String.Empty;

            if (objOp != null)
            {
                if (objOp is ItemRoute2OP)
                {
                    opControl = ((ItemRoute2OP)objOp).OPControl;
                }
                else if (objOp is BenQGuru.eMES.Domain.BaseSetting.Operation)
                {
                    opControl = ((BenQGuru.eMES.Domain.BaseSetting.Operation)objOp).OPControl;
                }
            }
            else
            {
                BenQGuru.eMES.BaseSetting.BaseModelFacade modelFacade = new BenQGuru.eMES.BaseSetting.BaseModelFacade(this.DataProvider);
                object objTmp = modelFacade.GetOperation(real.OperationCode);
                if (objTmp != null)
                {
                    opControl = ((BenQGuru.eMES.Domain.BaseSetting.Operation)objTmp).OPControl;
                    htOP.Add(real.ItemCode + ":" + routeCode + ":" + real.OperationCode, objTmp);
                }
            }
            return(opControl);
        }
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new FacadeFactory(base.DataProvider).CreateQueryFacade1();
     }
     return(this._facade.QueryFirstHandingYieldDetailCount(
                "",
                this.txtItemCode.Value,
                FormatHelper.TODateInt(this.txtStartDate.Value),
                FormatHelper.TODateInt(this.txtEndDate.Value)
                ));
 }
 protected override object[] LoadDataSource(int inclusive, int exclusive)
 {
     if (_facade == null)
     {
         _facade = new FacadeFactory(base.DataProvider).CreateQueryFacade1();
     }
     return(this._facade.QueryFirstHandingYieldDetail(
                "",
                this.txtItemCode.Value,
                FormatHelper.TODateInt(this.txtStartDate.Value),
                FormatHelper.TODateInt(this.txtEndDate.Value),
                inclusive,
                exclusive));
 }
        private object[] _loadDataSource()
        {
            System.Collections.Specialized.NameValueCollection iNVC = new System.Collections.Specialized.NameValueCollection(3);
            iNVC.Add("iModelCode", FormatHelper.CleanString(this.txtModelQuery.Text));  //产品别
            iNVC.Add("iItemCode", FormatHelper.CleanString(this.txtItemQuery.Text));    //产品
            iNVC.Add("iMoCode", FormatHelper.CleanString(this.txtMoQuery.Text));        //工单

            QueryFacade1 _QueryFacade = new QueryFacade1(base.DataProvider);

            object[] returnObjs =
                _QueryFacade.QueryHistoryQuantitySummary(
                    FormatHelper.CleanString(this.txtCondition.Text),
                    FormatHelper.CleanString(this.txtCondition.Text),
                    FormatHelper.CleanString(this.txtCondition.Text),
                    FormatHelper.CleanString(this.txtCondition.Text),
                    FormatHelper.CleanString(this.txtCondition.Text),
                    FormatHelper.CleanString(this.txtCondition.Text),
                    FormatHelper.CleanString(this.txtCondition.Text),
                    iNVC,
                    FormatHelper.TODateInt(this.dateStartDateQuery.Text),
                    FormatHelper.TODateInt(this.dateEndDateQuery.Text),
                    this.rblTimingType.SelectedValue,
                    this.V_SummaryTarget,
                    "",
                    "");


            if (returnObjs != null)
            {
                foreach (HistroyQuantitySummary hyp in returnObjs)
                {
                    if (hyp.Week != null)
                    {
                        hyp.Week = string.Format("{0}W{1}", hyp.ShiftDay.ToString().Substring(2, 2), hyp.Week.PadLeft(2, '0'));
                    }
                    if (hyp.Month != null)
                    {
                        hyp.Month = string.Format("{0}M{1}", hyp.ShiftDay.ToString().Substring(2, 2), hyp.Month.PadLeft(2, '0'));
                    }
                }
            }

            return(returnObjs);
        }
        private void WebQueryHelper_LoadGridDataSource(object sender, EventArgs e)
        {
            QueryFacade1 queryFacade1 = new QueryFacade1(this.DataProvider);

            WebQueryEventArgs args = (WebQueryEventArgs)e;

            FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider);

            args.RowCount = queryFacade1.QueryAchievingRateCount(
                FormatHelper.TODateInt(this.datStartDateQuery.Date_DateTime),
                FormatHelper.TODateInt(this.datEndDateQuery.Date_DateTime),
                this.txtBigSSCodeQuery.Text,
                this.txtMOCodeQuery.Text,
                this.txtItemCodeQuery.Text,
                this.txtMaterialModelCodeQuery.Text,
                this.ddlGoodSemiGoodQuery.SelectedValue);

            args.GridDataSource = queryFacade1.QueryAchievingRate(
                FormatHelper.TODateInt(this.datStartDateQuery.Date_DateTime),
                FormatHelper.TODateInt(this.datEndDateQuery.Date_DateTime),
                this.txtBigSSCodeQuery.Text,
                this.txtMOCodeQuery.Text,
                this.txtItemCodeQuery.Text,
                this.txtMaterialModelCodeQuery.Text,
                this.ddlGoodSemiGoodQuery.SelectedValue,
                args.StartRow,
                args.EndRow);

            ProcessOWC(queryFacade1.QueryAchievingRate(
                           FormatHelper.TODateInt(this.datStartDateQuery.Date_DateTime),
                           FormatHelper.TODateInt(this.datEndDateQuery.Date_DateTime),
                           this.txtBigSSCodeQuery.Text,
                           this.txtMOCodeQuery.Text,
                           this.txtItemCodeQuery.Text,
                           this.txtMaterialModelCodeQuery.Text,
                           this.ddlGoodSemiGoodQuery.SelectedValue,
                           int.MinValue,
                           int.MaxValue));
        }