public static void Create() { if (sTask == null) { sTask = new LotTask(); sTask.AddToSimulator(); } }
//BOM Validation Tasks---------------------------------------------------------------------- public void UpdatePartsReviewInProgress(LotTask currentTask) { //Set BomValidationInProgress Flag within QuoteStatus using (System.Data.IDbConnection connection = new System.Data.SqlClient.SqlConnection(Classes.Helper.CnnVal("TracerDB"))) { //1. Update PartsReviewInProgress where QuoteWOR = workorder from currentTask connection.Execute($"UPDATE QuoteStatus SET PartsReviewInProgress='True' WHERE QuoteWOR='{ currentTask.JobWOR }'"); } }
public void UpdatePartsReviewComplete(LotTask currentTask) { using (System.Data.IDbConnection connection = new System.Data.SqlClient.SqlConnection(Classes.Helper.CnnVal("TracerDB"))) { //1. Change PartsReviewRequest, PartsReviewInProgress flags to "False", and PartsReviewComplete flag to "True" where QuoteWOR = currentTask.JobWOR connection.Execute($"UPDATE QuoteStatus SET PartsReviewInProgress='False', PartsReviewRequest='False', PartsReviewComplete='True' WHERE QuoteWOR='{ currentTask.JobWOR }'"); //TIME-TRACKING PLACE-HOLDER FOR NOW //DateTime rightNow = new DateTime(); //rightNow = DateTime.Now; //3. update MasterReviewEnd(time-stamp) in LotTimeTracking where LotStatusID = LotStatusID from previous Call //connection.Execute($"UPDATE LotTimeTracking SET MasterReviewEnd='{ rightNow.ToString() }' WHERE LotStatusID='{ LotStatusID[0] }'"); } }
public List <LotInfoJSON> SetNextDiff(List <LotInfoJSON> ListLotInfo) { var temp = new List <LotInfoJSON>(); foreach (var lot in ListLotInfo) { for (var i = 0; i < lot.Tasks.Length; i++) { if ((i < (lot.Tasks.Length - 1)) && (lot.TargetOperation == lot.Tasks[i].Operation) && diffList.Contains(lot.Tasks[i].Entity) && diffList.Contains(lot.Tasks[i + 1].Entity)) { var newLotInfoJSON = new LotInfoJSON(); newLotInfoJSON.Delay = 0; newLotInfoJSON.DiffRecipe = lot.Tasks[i + 1].Recipe; newLotInfoJSON.FirstDiffEntityName = lot.Tasks[i + 1].Entity; newLotInfoJSON.Kristal = lot.Kristal; newLotInfoJSON.Lot = lot.Lot + "(B)"; newLotInfoJSON.OperAgo = lot.OperAgo + 1; newLotInfoJSON.Paket = lot.Tasks[i + 1].paket; newLotInfoJSON.Priority = lot.Priority; newLotInfoJSON.TargetOperation = lot.Tasks[i + 1].Operation; var tempTask1 = new LotTask(); tempTask1.Entity = newLotInfoJSON.FirstDiffEntityName; var tempTask2 = new LotTask(); if (i < lot.Tasks.Length - 2) { tempTask2.Entity = lot.Tasks[i + 2].Entity; } else { tempTask2.Entity = "_"; } newLotInfoJSON.Tasks = new LotTask[2] { tempTask1, tempTask2 }; temp.Add(newLotInfoJSON); } } } ListLotInfo = ListLotInfo.Concat(temp).ToList(); return(ListLotInfo); }
//Stencils Ordered---------------------------------------------------------------------- public void UpdateStencilsOrdered(LotTask currentTask) { using (System.Data.IDbConnection connection = new System.Data.SqlClient.SqlConnection(Classes.Helper.CnnVal("TracerDB"))) { //1. Get LotID from LotNumbers where JobWOR = currentTask.JobWOR and Lot = currentTask.Lot var LotID = connection.Query <string>($"SELECT LotID FROM LotNumbers WHERE JobWOR='{ currentTask.JobWOR }' AND Lot=' { currentTask.Lot }'").ToList(); //2. Change StencilsOrdered flag to "True" where LotID = returned LotID from previous Call connection.Execute($"UPDATE LotPurchasingStatus SET StencilsOrdered='True' WHERE LotID='{ LotID[0] }'"); //3. Get PurchasingStatusID from LotPurchasingStatus where LotID = returned LotID from previous Call var PurchasingStatusID = connection.Query <string>($"SELECT PurchasingStatusID FROM LotPurchasingStatus WHERE LotID='{ LotID[0] }'").ToList(); //Get Current DateTime DateTime rightNow = new DateTime(); rightNow = DateTime.Now; //4. update StencilOrderDate(time-stamp) in PurchasingTimeTracking where PurchasingStatusID = PurchasingStatusID from previous Call connection.Execute($"UPDATE PurchasingTimeTracking SET StencilOrderDate='{ rightNow.ToString() }' WHERE PurchasingStatusID='{ PurchasingStatusID[0] }'"); } }
internal void UpdateQuoteReviewComplete(LotTask currentTask) { using (System.Data.IDbConnection connection = new System.Data.SqlClient.SqlConnection(Classes.Helper.CnnVal("TracerDB"))) { //1. Get LotID from LotNumbers where JobWOR = inputted JobWOR and Lot = inputted Lot var LotID = connection.Query <string>($"SELECT LotID FROM LotNumbers WHERE JobWOR='{ currentTask.JobWOR }' AND Lot=' { currentTask.Lot }'").ToList(); //2. Change QuoteReviewRequest, QuoteReviewInProgress flags to "False", and QuoteReviewComplete flag to "True" where LotID = returned LotID from previous Call connection.Execute($"UPDATE LotStatus SET QuoteReviewInProgress='False', QuoteReviewRequest='False', QuoteReviewComplete='True' WHERE LotID='{ LotID[0] }'"); //3. Get LotStatusID from LotStatus where LotID = returned LotID from previous Call var LotStatusID = connection.Query <string>($"SELECT LotStatusID FROM LotStatus WHERE LotID='{ LotID[0] }'").ToList(); //Get Current DateTime DateTime rightNow = new DateTime(); rightNow = DateTime.Now; //4. update QuoteReviewEnd(time-stamp) in LotTimeTracking where LotStatusID = LotStatusID from previous Call connection.Execute($"UPDATE LotTimeTracking SET QuoteReviewEnd='{ rightNow.ToString() }' WHERE LotStatusID='{ LotStatusID[0] }'"); } }
public override void Dispose() { base.Dispose(); sTask = null; }
public void OnWorldLoadFinished() { SimTask.Create(); LotTask.Create(); }