public static void PrePareLatestData(Controller ctrl, string projectkey) { if (UpdatePJLockUsing(projectkey)) { return; } try { var vm = ProjectViewModels.RetrieveOneProject(projectkey); if (vm.PNList.Count > 0) { string lastupdatetime = BITestData.RetrieveLatestTimeOfLocalBI(projectkey); if (!string.IsNullOrEmpty(lastupdatetime)) { var vlast = DateTime.Parse(lastupdatetime); vlast = vlast.AddMinutes(18); if (vlast < DateTime.Now) { BIDataUtility.UpdateProjectData(ctrl, vm); } } else { BIDataUtility.UpdateProjectData(ctrl, vm); } } ResetUpdatePJLock(projectkey); } catch (Exception ex) { ResetUpdatePJLock(projectkey); } }
public static void RetrieveWaferDataFromMes(Controller ctrl, string projectkey) { if (UpdatePJLockUsing(projectkey)) { return; } try { var vm = ProjectViewModels.RetrieveOneProject(projectkey); BIDataUtility.RetrievePjWaferAllData(ctrl, vm); ResetUpdatePJLock(projectkey); } catch (Exception ex) { ResetUpdatePJLock(projectkey); } }