public void RunInventoryCapture(InventoryCapture capture, InventoryItem item) { string captureReason = capture.Message; if (capture.Hold) { // Create Hold InventoryHold hold = new InventoryHold(item, capture.Type); hold.Capture = capture; hold.AllowStationData = capture.AllowStationData; // Create transaction Transaction transaction = new CaptureTransactionMapper().MapFrom(hold); if (capture.HoldStation != null) { Scout.Core.Service <IShopfloorService>().MoveUnitToNewStation (item.CurrentProcess, capture.HoldStation); } } // Apply Shopfloor Condition item.ShopfloorConditions = capture.ApplyCondition; UserInteraction.Dialog.ShowMessage("This unit is to be captured for: " + captureReason, UserMessageType.Warning); Scout.Core.Data.Save(item.Session); Logging.Log("Captured item " + item.SerialNumber + " for " + captureReason, LogType.Information); }
public ICollection <InventoryHold> GetUnresolvedHoldsForCapture(InventoryCapture capture) { BinaryOperator crit1 = new BinaryOperator("Capture", capture); BinaryOperator crit2 = new BinaryOperator("Status", HoldStatus.Open); GroupOperator criteria = new GroupOperator(crit1, crit2); return(Repository .GetList <InventoryHold>(capture.Session) .ByCriteria(criteria)); }
public void ExecuteMultipleHighPriorityCapture(InventoryCapture capture, InventoryItem item) { Logging.Log("Executing multiple high priority capture for " + item.LotId, LogType.Information); InventoryHold hold = item.Hold; hold.Resolution = "Multiple Capture Selected"; hold.ResolutionDate = DateTime.Now; ReleaseHold(item.Hold, capture.HoldDomain); RunInventoryCapture(capture, item); UserInteraction.Dialog.ShowMessage("Capture Executed", UserMessageType.Information); }
public bool SaveCapture(InventoryCapture capture) { InventoryCaptureValidator validator = new InventoryCaptureValidator(capture); if (!validator.Validated()) { return(false); } Scout.Core.Data.Save(capture.Session); UserInteraction.Dialog.ShowMessage("Save Complete", UserMessageType.Information); return(true); }
public InventoryCaptureValidator(InventoryCapture capture) { m_capture = capture; }
public InventoryCaptureValidator(InventoryCapture capture, MessageListener listener) : base(listener) { m_capture = capture; }