private void SaveWafer(Lot_Transformed lot) { List <string> waferList = lot.WaferList; if (waferList != null && waferList.Count > 0) { SqlWafer wafer = null; int index = 0; string waferid = ""; int waferIndex = 0; List <string> allBinPercentList = lot.AllBinPercentList; int waferidcount = lot.WaferidCount; foreach (string s in waferList) { waferid = Guid.NewGuid().ToString().Replace("-", ""); wafer = new SqlWafer(); wafer.ID = waferid; wafer.TransformID = lot.ID; wafer.WaferID = s.Substring(lot.LotId.Length, s.Length - lot.LotId.Length); wafer.Status = lot.Status; wafer.HoldReason = lot.HoldReason; // stryield=allBinPercentList[index * waferidcount] != null ? Math.Round(Convert.ToDouble(allBinPercentList[index * waferidcount].ToString()), 2, MidpointRounding.AwayFromZero).ToString("f2") : "0"; wafer.Yield = allBinPercentList[index * waferidcount] != null?decimal.Parse(Math.Round(Convert.ToDouble(allBinPercentList[index *waferidcount].ToString()), 2, MidpointRounding.AwayFromZero).ToString("f2")) : 0; wafer.CompletionDate = lot.CompletionDate; wafer.PEDispose = 0; wafer.QADispose = 0; wafer.SPRDDecision = 0; wafer.CreateDate = DateTime.Now.ToLocalTime(); wafer.VendorConfirm = 0; wafer.Program = lot.Program; wafer.StartTime = lot.StartTime; waferWay2.SaveWafer(wafer); SaveWaferSbin(lot, waferid, ref waferIndex); index++; } } }
public int SaveWafer(SqlWafer wafer) { return(this.dbGateway.AddNew(wafer)); }
public int SaveWafer(SqlWafer wafer) { return(this.way2.SaveWafer(wafer)); }