Ejemplo n.º 1
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;
            }
        }
Ejemplo n.º 2
0
        private object[] GetGroupEleDetails(OQCFuncTestValueDetail testValue)
        {
            ArrayList list = new ArrayList();

            foreach (OQCFuncTestValueEleDetail d in this.EleDetails)
            {
                if (d.RunningCard == testValue.RunningCard && d.RunningCardSequence == testValue.RunningCardSequence &&
                    d.GroupSequence == testValue.GroupSequence)
                {
                    list.Add(d);
                }
            }

            return(list.ToArray());
        }
Ejemplo n.º 3
0
        private OQCFuncTestValue GetFTV(OQCFuncTestValueDetail testValue)
        {
            if (this.OQCFuncTestValues == null)
            {
                return(null);
            }

            foreach (OQCFuncTestValue v in OQCFuncTestValues)
            {
                if (testValue.RunningCard == v.RunningCard && testValue.RunningCardSequence == v.RunningCardSequence &&
                    testValue.LotNO == v.LotNO && testValue.LotSequence == v.LotSequence)
                {
                    return(v);
                }
            }

            return(null);
        }
Ejemplo n.º 4
0
        protected override string[] FormatExportRecord(object obj)
        {
            OQCFuncTestValueDetail testValue = obj as OQCFuncTestValueDetail;

            string[] objs = new string[3 + this.electriccount];

            objs[0] = testValue.GroupSequence.ToString();
            objs[1] = testValue.FreMin.ToString("0.00") + "/" + testValue.FreMax.ToString("0.00") + "/" + testValue.FreValue.ToString("0.00");
            objs[2] = 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[iStartIdx + i];
                    objs[i + 3] = /*d.ElectricMin.ToString("0.00")+"/"+d.ElectricMax.ToString("0.00")+"/"+*/ d.ElectricValue.ToString("0.00");
                }
                else
                {
                    objs[i + 3] = "";
                }
            }
            htEleSeq[strKey] = iStartIdx + electriccount;

            return(objs);
        }
Ejemplo n.º 5
0
        protected override Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj)
        {
            OQCFuncTestValueDetail testValue = obj as OQCFuncTestValueDetail;

            object[] objs = new object[3 + this.electriccount];

            objs[0] = testValue.GroupSequence;
            objs[1] = testValue.FreMin.ToString("0.00") + "/" + testValue.FreMax.ToString("0.00") + "/" + testValue.FreValue.ToString("0.00");
            objs[2] = 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[iStartIdx + i];
                    objs[i + 3] = d.ElectricValue.ToString("0.00");
                }
                else
                {
                    objs[i + 3] = "";
                }
            }
            htEleSeq[strKey] = iStartIdx + electriccount;

            /*
             * BenQGuru.eMES.SPCDataCenter.DataEntry dataEntry = (BenQGuru.eMES.SPCDataCenter.DataEntry)obj;
             * if (htSpec == null)
             * {
             *      htSpec = new Hashtable();
             *      string strSql = "SELECT * FROM tblOQCFuncTestSpec WHERE ItemCode='" + dataEntry.ItemCode + "'";
             *      object[] objsSpec = this.DataProvider.CustomQuery(typeof(OQCFuncTestSpec), new BenQGuru.eMES.Common.Domain.SQLCondition(strSql));
             *      if (objsSpec != null)
             *      {
             *              for (int i = 0; i < objsSpec.Length; i++)
             *              {
             *                      OQCFuncTestSpec spec = (OQCFuncTestSpec)objsSpec[i];
             *                      if (htSpec.ContainsKey(Convert.ToInt32(spec.GroupSequence)) == false)
             *                      {
             *                              htSpec.Add(Convert.ToInt32(spec.GroupSequence), spec);
             *                      }
             *              }
             *      }
             * }
             * int iGroupCount = 0;
             * for (int i = 0; i < dataEntry.ListTestData.Count; i++)
             * {
             *      BenQGuru.eMES.SPCDataCenter.DataEntryTestData testData = (BenQGuru.eMES.SPCDataCenter.DataEntryTestData)dataEntry.ListTestData[i];
             *      if (iGroupCount < testData.GroupSequence)
             *              iGroupCount = Convert.ToInt32(testData.GroupSequence);
             * }
             * this.pagerToolBar.RowCount = this.pagerToolBar.RowCount - 1 + iGroupCount;
             * object[] objs = null;
             * for (int i = 1; i <= iGroupCount; i++)
             * {
             *      OQCFuncTestSpec spec = new OQCFuncTestSpec();
             *      if (htSpec.ContainsKey(i) == true)
             *              spec = (OQCFuncTestSpec)htSpec[i];
             *      objs = new object[3 + this.electriccount];
             *      objs[0] = i;
             *      objs[2] = spec.ElectricMin.ToString("0.00") + "/" + spec.ElectricMax.ToString("0.00");
             *      for (int n = 0; n < dataEntry.ListTestData.Count; n++)
             *      {
             *              BenQGuru.eMES.SPCDataCenter.DataEntryTestData testData = (BenQGuru.eMES.SPCDataCenter.DataEntryTestData)dataEntry.ListTestData[n];
             *              if (testData.ObjectCode == SPCObjectList.OQC_FT_FREQUENCY && testData.GroupSequence == i)
             *              {
             *                      objs[1] = spec.FreMin.ToString("0.00") + "/" + spec.FreMax.ToString("0.00") + "/" + Convert.ToDecimal(testData.Data).ToString("0.00");
             *              }
             *              if (testData.ObjectCode == SPCObjectList.OQC_FT_ELECTRIC && testData.GroupSequence == i)
             *              {
             *                      decimal[] dvalue = (decimal[])testData.Data;
             *                      for (int x = 0; x < this.electriccount; x++)
             *                      {
             *                              objs[3 + x] = dvalue[x].ToString("0.00");
             *                      }
             *              }
             *      }
             *      if (i < iGroupCount)
             *      {
             *              this.gridWebGrid.Rows.Add(new Infragistics.WebUI.UltraWebGrid.UltraGridRow( objs ));
             *      }
             * }
             */

            return(new Infragistics.WebUI.UltraWebGrid.UltraGridRow(objs));
        }