private void SaveWaferSbin(Lot_Transformed lot, string waferid, ref int waferIndex)
        {
            int           waferidcount      = lot.WaferidCount;
            List <string> allBinPercentList = lot.AllBinPercentList;
            List <string> allBinList        = lot.AllBinList;
            List <string> allBinLimtList    = lot.AllBinLimtList;
            Wafer_Sbin    sbin = null;

            for (int i = 0; i < waferidcount; i++)
            {
                waferIndex++;
                if (waferIndex == 2 && i == 1)
                {
                    waferIndex = 1;
                }
                if (i > 0)
                {
                    sbin             = new Wafer_Sbin();
                    sbin.ID          = Guid.NewGuid().ToString().Replace("-", "");
                    sbin.WaferID     = waferid;
                    sbin.LotID       = lot.ID;
                    sbin.SbinValue   = !string.IsNullOrEmpty(allBinPercentList[waferIndex]) ? Math.Round(Convert.ToDouble(allBinPercentList[waferIndex]), 2, MidpointRounding.AwayFromZero).ToString("f2") : "0";
                    sbin.IsTriggered = false;
                    sbin.SbinText    = allBinList[i];
                    sbin.SbinLimit   = !string.IsNullOrEmpty(allBinLimtList[i]) ? Math.Round(Convert.ToDouble(allBinLimtList[i]), 2, MidpointRounding.AwayFromZero).ToString("f2") : "0";
                    sbin.Sort        = i;
                    sbin.CreatedTime = DateTime.Now.ToLocalTime();
                    sbinWay.SaveSBin(sbin);
                }
            }
        }
Exemple #2
0
 public int SaveSBin(Wafer_Sbin sbin)
 {
     return(this.dbGateway.AddNew(sbin));
 }
Exemple #3
0
 public int SaveSBin(Wafer_Sbin sbin)
 {
     return(this.dal.SaveSBin(sbin));
 }