Example #1
0
        private int GetElectricCount()
        {
            int seq;

            try
            {
                seq = int.Parse(this.txtSeq.Value);
            }
            catch
            {
                seq = -1;
            }

            if (_facade == null)
            {
                _facade = new QueryOQCFunctionFacade(this.DataProvider);
            }

            OQCFuncTestValue obj = (OQCFuncTestValue)this._facade.GetOQCFuncTestValue(this.txtSN.Value, seq,
                                                                                      this.txtLotNo.Value, this.txtLotSeq.Value);

            if (obj != null)
            {
                electriccount = Convert.ToInt32(obj.ElectricTestCount);
            }
            else
            {
                electriccount = 0;
            }

            return(electriccount);
        }
Example #2
0
        private void GetGridRowFT(object sender, EventArgs e)
        //private Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRowFT(object obj)
        {
//			OQCFuncTestValue testValue = obj as OQCFuncTestValue;
//
//			return

            if ((e as DomainObjectToGridRowEventArgs).DomainObject != null)
            {
                OQCFuncTestValue testValue = (e as DomainObjectToGridRowEventArgs).DomainObject as OQCFuncTestValue;
                (e as DomainObjectToGridRowEventArgs).GridRow = new Infragistics.WebUI.UltraWebGrid.UltraGridRow(
                    new object[] {
                    testValue.RunningCard,
                    testValue.RunningCardSequence,
                    testValue.StepSequenceCode,
                    testValue.ResourceCode,
                    testValue.MinDutyRatoMin.ToString("0.00") + "/" + testValue.MinDutyRatoMax.ToString("0.00") + "/" + testValue.MinDutyRatoValue.ToString("0.00"),
                    testValue.BurstMdFreMin.ToString("0.00") + "/" + testValue.BurstMdFreMax.ToString("0.00") + "/" + testValue.BurstMdFreValue.ToString("0.00"),
                    testValue.ProductStatus,
                    FormatHelper.ToDateString(testValue.MaintainDate),
                    FormatHelper.ToTimeString(testValue.MaintainTime),
                    testValue.MaintainUser,
                    "",
                    testValue.LotNO,
                    testValue.LotSequence,
                });
            }
        }
Example #3
0
        private void _gridFTHelper_DomainObjectToExportRow(object sender, EventArgs e)
        {
            if ((e as DomainObjectToExportRowEventArgs).DomainObject != null)
            {
                int electriccount = GetElectricCount();
                OQCFuncTestValueDetail testValue = (e as DomainObjectToExportRowEventArgs).DomainObject as OQCFuncTestValueDetail;

                string[] objs = new string[7 + electriccount];

                OQCFuncTestValue FTV = GetFTV(testValue);

                objs[0] = testValue.RunningCard;
                objs[1] = testValue.LotNO;
                objs[2] = testValue.GroupSequence.ToString();
                if (FTV != null)
                {
                    objs[3] = FTV.MinDutyRatoMin.ToString("0.00") + "/" + FTV.MinDutyRatoMax.ToString("0.00") + "/" + FTV.MinDutyRatoValue.ToString("0.00");
                    objs[4] = FTV.BurstMdFreMin.ToString("0.00") + "/" + FTV.BurstMdFreMax.ToString("0.00") + "/" + FTV.BurstMdFreValue.ToString("0.00");
                }
                else
                {
                    objs[3] = "";
                    objs[4] = "";
                }

                objs[5] = testValue.FreMin.ToString("0.00") + "/" + testValue.FreMax.ToString("0.00") + "/" + testValue.FreValue.ToString("0.00");
                objs[6] = testValue.ElectricMin.ToString("0.00") + "/" + testValue.ElectricMax.ToString("0.00");            //+"/"+testValue.ElectricValue.ToString("0.00");

                object[] details = GetGroupEleDetails(testValue);

                if (htEleSeq == null)
                {
                    htEleSeq = new Hashtable();
                }
                string strKey = testValue.RunningCard + ":" + testValue.RunningCardSequence + ":" + testValue.GroupSequence.ToString();
                if (htEleSeq.ContainsKey(strKey) == false)
                {
                    htEleSeq.Add(strKey, 0);
                }
                int iStartIdx = Convert.ToInt32(htEleSeq[strKey]);

                for (int i = 0; i < electriccount; i++)
                {
                    if (i < details.Length)
                    {
                        OQCFuncTestValueEleDetail d = (OQCFuncTestValueEleDetail)details[i + iStartIdx];
                        objs[i + 7] = /*d.ElectricMin.ToString("0.00")+"/"+d.ElectricMax.ToString("0.00")+"/"+*/ d.ElectricValue.ToString("0.00");
                    }
                    else
                    {
                        objs[i + 7] = "";
                    }
                }
                htEleSeq[strKey] = iStartIdx + electriccount;

                (e as DomainObjectToExportRowEventArgs).ExportRow = objs;
            }
        }
Example #4
0
        protected override string[] FormatExportRecord(object obj)
        {
            OQCFuncTestValue testValue = obj as OQCFuncTestValue;

            return(new string[] {
                testValue.RunningCard,
                //testValue.RunningCardSequence.ToString(),
                testValue.StepSequenceCode,
                testValue.ResourceCode,
                testValue.MinDutyRatoMin.ToString("0.00") + "/" + testValue.MinDutyRatoMax.ToString("0.00") + "/" + testValue.MinDutyRatoValue.ToString("0.00"),
                testValue.BurstMdFreMin.ToString("0.00") + "/" + testValue.BurstMdFreMax.ToString("0.00") + "/" + testValue.BurstMdFreValue.ToString("0.00"),
                this.languageComponent1.GetString(testValue.ProductStatus),
                FormatHelper.ToDateString(testValue.MaintainDate),
                FormatHelper.ToTimeString(testValue.MaintainTime),
                testValue.MaintainUser,
                "",
            }
                   );
        }
Example #5
0
        private void LoadData()
        {
            OQCFacade oqcFacade = new OQCFacade(this.DataProvider);

            object[] objs = oqcFacade.GetOQCFuncTestValueByLotNo(this._lotno, OQCFacade.Lot_Sequence_Default);
            if (objs != null)
            {
                for (int i = 0; i < objs.Length; i++)
                {
                    OQCFuncTestValue testValue = (OQCFuncTestValue)objs[i];
                    DataRow          row       = dtIDList.NewRow();
                    row["runningcard"] = testValue.RunningCard;
                    row["result"]      = testValue.ProductStatus;
                    dtIDList.Rows.Add(row);
                }
                this.txtFunTestQty.Value = objs.Length.ToString();
            }
            else
            {
                this.txtFunTestQty.Value = "0";
            }
        }
Example #6
0
        protected override Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj)
        {
            OQCFuncTestValue testValue = obj as OQCFuncTestValue;

            return(new Infragistics.WebUI.UltraWebGrid.UltraGridRow(
                       new object[] {
                testValue.RunningCard,
                testValue.RunningCardSequence,
                testValue.StepSequenceCode,
                testValue.ResourceCode,
                testValue.MinDutyRatoMin.ToString("0.00") + "/" + testValue.MinDutyRatoMax.ToString("0.00") + "/" + testValue.MinDutyRatoValue.ToString("0.00"),
                testValue.BurstMdFreMin.ToString("0.00") + "/" + testValue.BurstMdFreMax.ToString("0.00") + "/" + testValue.BurstMdFreValue.ToString("0.00"),
                this.languageComponent1.GetString(testValue.ProductStatus),
                FormatHelper.ToDateString(testValue.MaintainDate),
                FormatHelper.ToTimeString(testValue.MaintainTime),
                testValue.MaintainUser,
                "",
            }


                       ));
        }
Example #7
0
        public Messages Execute(ActionEventArgs actionEventArgs, ActionCheckStatus actionCheckStatus)
        {
            Messages         messages         = new Messages();
            DataCollectDebug dataCollectDebug = new DataCollectDebug(this.GetType().ToString() + "Collect");

            dataCollectDebug.WhenFunctionIn(messages);
            try
            {
                ActionOnLineHelper dataCollect = new ActionOnLineHelper(this.DataProvider);
                //填写SIMULATION 检查工单、ID、途程、操作
                messages.AddMessages(dataCollect.CheckID(actionEventArgs, actionCheckStatus));

                if (messages.IsSuccess())
                {
                    // 0. 检查OQC Lot
                    // 1. OQCFuncTestValue
                    // 2. OQCFuncTestValueDetail
                    // 3. OQCFuncTestValueEleDetail
                    OQCFuncTestActionEventArgs args = (OQCFuncTestActionEventArgs)actionEventArgs;
                    Simulation sim       = args.ProductInfo.LastSimulation;
                    OQCFacade  oqcFacade = new OQCFacade(this.DataProvider);
                    OQCLot     oqcLot    = (OQCLot)oqcFacade.GetOQCLot(sim.LOTNO, OQCFacade.Lot_Sequence_Default);
                    if (oqcLot.LOTStatus != OQCLotStatus.OQCLotStatus_Examing &&
                        oqcLot.LOTStatus != OQCLotStatus.OQCLotStatus_NoExame)
                    {
                        messages.Add(new Message(MessageType.Error, "$OQCLot_Status_Must_Be_Examing"));
                    }
                    if (messages.IsSuccess())
                    {
                        BenQGuru.eMES.BaseSetting.BaseModelFacade baseFacade = new BaseModelFacade(this.DataProvider);
                        Resource  resource  = (Resource)baseFacade.GetResource(args.ResourceCode);
                        Operation operation = (Operation)baseFacade.GetOperationByRouteAndResource(sim.RouteCode, resource.ResourceCode);
                        if (operation == null)
                        {
                            operation = new Operation();
                        }
                        // 1. OQCFuncTestValue
                        OQCFuncTestValue testValue = new OQCFuncTestValue();

                        testValue.RunningCard         = args.RunningCard;
                        testValue.RunningCardSequence = sim.RunningCardSequence;
                        testValue.ModelCode           = sim.ModelCode;
                        testValue.ItemCode            = sim.ItemCode;
                        testValue.MOCode             = sim.MOCode;
                        testValue.LotNO              = sim.LOTNO;
                        testValue.LotSequence        = oqcLot.LotSequence;
                        testValue.FuncTestGroupCount = args.oqcFuncTest.FuncTestGroupCount;
                        testValue.MinDutyRatoMin     = args.oqcFuncTest.MinDutyRatoMin;
                        testValue.MinDutyRatoMax     = args.oqcFuncTest.MinDutyRatoMax;
                        testValue.MinDutyRatoValue   = args.minDutyRatoValue;
                        testValue.BurstMdFreMin      = args.oqcFuncTest.BurstMdFreMin;
                        testValue.BurstMdFreMax      = args.oqcFuncTest.BurstMdFreMax;
                        testValue.BurstMdFreValue    = args.burstMdFreValue;
                        testValue.ElectricTestCount  = args.oqcFuncTest.ElectricTestCount;
                        testValue.OPCode             = operation.OPCode;
                        testValue.StepSequenceCode   = resource.StepSequenceCode;
                        testValue.SegmentCode        = resource.SegmentCode;
                        testValue.ResourceCode       = args.ResourceCode;
                        if (args.Result == true)
                        {
                            testValue.ProductStatus = ProductStatus.GOOD;
                        }
                        else
                        {
                            testValue.ProductStatus = ProductStatus.NG;
                        }
                        testValue.MaintainUser = args.UserCode;

                        DBDateTime dbDateTime;
                        //Laws Lu,2006/11/13 uniform system collect date
                        if (actionEventArgs.ProductInfo.WorkDateTime != null)
                        {
                            dbDateTime = actionEventArgs.ProductInfo.WorkDateTime;
                        }
                        else
                        {
                            dbDateTime = FormatHelper.GetNowDBDateTime(DataProvider);
                            actionEventArgs.ProductInfo.WorkDateTime = dbDateTime;
                        }

                        testValue.MaintainDate = dbDateTime.DBDate;
                        testValue.MaintainTime = dbDateTime.DBTime;

                        /* modified by jessie lee, 2006/8/10 */
                        object obj = oqcFacade.GetOQCFuncTestValue(args.RunningCard, sim.RunningCardSequence);
                        if (obj == null)
                        {
                            oqcFacade.AddOQCFuncTestValue(testValue);
                        }
                        else
                        {
                            oqcFacade.UpdateOQCFuncTestValue(testValue);

                            //// Added by Icyer 2007/01/12	如果是重复测试,则需要先删除原来的数据
                            //OQCFuncTestValue testValueTmp = (OQCFuncTestValue)obj;
                            //BenQGuru.eMES.SPCDataCenter.DataHandler deleteHandler = new BenQGuru.eMES.SPCDataCenter.DataHandler(this.DataProvider);
                            //deleteHandler.DeleteData(SPCObjectList.OQC_FT_FREQUENCY, testValueTmp.ItemCode, testValueTmp.MOCode, testValueTmp.RunningCard, testValueTmp.RunningCardSequence, testValueTmp.MaintainDate);
                            //// Added end
                        }

                        //// Added by Icyer 2006-08-11
                        //BenQGuru.eMES.SPCDataCenter.DataEntry dataEntry = new BenQGuru.eMES.SPCDataCenter.DataEntry();
                        //dataEntry.ModelCode = sim.ModelCode;
                        //dataEntry.ItemCode = sim.ItemCode;
                        //dataEntry.MOCode = sim.MOCode;
                        //dataEntry.RunningCard = sim.RunningCard;
                        //dataEntry.RunningCardSequence = sim.RunningCardSequence;
                        //dataEntry.SegmentCode = resource.SegmentCode;
                        //dataEntry.LineCode = resource.StepSequenceCode;
                        //dataEntry.ResourceCode = resource.ResourceCode;
                        //dataEntry.OPCode = sim.OPCode;
                        //dataEntry.LotNo = sim.LOTNO;
                        //dataEntry.TestDate = testValue.MaintainDate;
                        //dataEntry.TestTime = testValue.MaintainTime;
                        //if (args.Result == true)
                        //    dataEntry.TestResult = "P";
                        //else
                        //    dataEntry.TestResult = "F";
                        //dataEntry.TestUser = args.UserCode;
                        //dataEntry.AddTestData(SPCObjectList.OQC_DUTY_RATO, args.minDutyRatoValue);
                        //dataEntry.AddTestData(SPCObjectList.OQC_BURST_MD, args.burstMdFreValue);
                        //for (int i = 0; i < args.oqcFuncTest.FuncTestGroupCount; i++)
                        //{
                        //    dataEntry.AddTestData(SPCObjectList.OQC_FT_FREQUENCY, i + 1, Convert.ToDecimal(args.listTestValueFre[i]));
                        //    Hashtable ht = (Hashtable)args.listTestValueEle[i];
                        //    decimal[] dataEle = new decimal[Convert.ToInt32(args.oqcFuncTest.ElectricTestCount)];
                        //    for (int n = 0; n < args.oqcFuncTest.ElectricTestCount; n++)
                        //    {
                        //        dataEle[n] = Convert.ToDecimal(ht[(n + 1).ToString()]);
                        //    }
                        //    dataEntry.AddTestData(SPCObjectList.OQC_FT_ELECTRIC, i + 1, dataEle);
                        //}
                        //BenQGuru.eMES.SPCDataCenter.DataHandler handler = new BenQGuru.eMES.SPCDataCenter.DataHandler(this.DataProvider);
                        //messages.AddMessages(handler.CollectData(dataEntry));
                        //// Added end
                    }
                }
            }
            catch (Exception e)
            {
                messages.Add(new Message(e));
            }
            dataCollectDebug.WhenFunctionOut(messages);
            return(messages);
        }