public IEnumerable<IResult> Save()
        {
            this.RemoveAllErrors();
            if (InventoryItem.Id > 0)
            {
                GetIsLockValidRequest getIsLockValidRequest = new GetIsLockValidRequest(ModelNamesEnum.Inventory, this.InventoryItem.Id.ToString());
                yield return getIsLockValidRequest;
                if (getIsLockValidRequest.Error != null)
                {
                    yield return new HandleExceptionResult(getIsLockValidRequest.Error);
                    BusyOff();
                    yield break;
                }
                if (!getIsLockValidRequest.Result)
                {
                    WindowManager.Value.Alert("Unable to continue", "The Record lock has expired.");
                    BusyOff();
                    yield break;
                }
            }

            InventoryAssistantState validatingState;

            BusyOn("Validating Inventory Item...");

            validatingState = InventoryAssistantState.General;
            if (!ValidateGeneral()) {
                this.state = validatingState;
                BusyOff();
                yield break;
            }

            validatingState = InventoryAssistantState.Notes;
            if (AssistantNoteMode == (int)AssistantViewMode.DataEntry)
            {
                if (ValidateNote())
                {
                    NoteSave();
                }
                else
                {
                    NotifyOfPropertyChange(() => ViewModelErrorsString);
                    if (this.State != validatingState)
                        this.State = validatingState;
                    BusyOff();
                    yield break;
                }
            }

            BusyOn("Saving Inventory Item...");

            // Build Save Object
            this.InventoryItem.Notes.Reset(this.Notes);

            //Save Order
            SaveInventoryItemRequest saveInventoryItemRequest = new SaveInventoryItemRequest(this.InventoryItem);
            yield return saveInventoryItemRequest;
            if (saveInventoryItemRequest.Error != null)
            {
                yield return new HandleExceptionResult(saveInventoryItemRequest.Error);
                BusyOff();
                yield break;
            }

            if (this.InventoryItem.Id == null)
                this.InventoryItem.Id = saveInventoryItemRequest.Result;

            GetInventoryItemRequest getInventoryItemRequest = new GetInventoryItemRequest((int)this.InventoryItem.Id);
            yield return getInventoryItemRequest;
            if (getInventoryItemRequest.Error != null)
            {
                yield return new HandleExceptionResult(getInventoryItemRequest.Error);
                BusyOff();
                yield break;
            }
            Events.Value.Publish(new EventModifiedInventory() { InventoryItem = getInventoryItemRequest.Result.Clone() });

            IsDirty = false;
            BusyOff();
            base.Close();
        }
        public IEnumerable<IResult> LoadViewGeneral()
        {
            if (this.IsLoadedGeneral)
                yield break;

            var req = new GetClientsRequest();
            req.clientName = string.Empty;
            yield return req;
            if (req.Error != null)
            {
                yield return HandleExceptionResult.Display(req.Error);
                BusyOff();
                base.Close();
                yield break;
            }

            this.Clients.AddRange(req.Result);
            NotifyOfPropertyChange(() => Clients);
            BusyOff();

            switch (AssistantMode) {
                case ViewMode.Add:
                    this.InventoryItem = new InventoryItem();
                    break;
                case ViewMode.Edit:
                    if (this.EditingModelId.IsNotNull()) {
                        BusyOn("Loading Item...");
                        GetInventoryItemRequest getInventoryItemRequest = new GetInventoryItemRequest((int)this.EditingModelId);
                        yield return getInventoryItemRequest;
                        if (getInventoryItemRequest.Error != null)
                        {
                            yield return new HandleExceptionResult(getInventoryItemRequest.Error);
                            BusyOff();
                            yield break;
                        }
                        this.InventoryItem = getInventoryItemRequest.Result.Clone();
                        BusyOff();
                    }
                    break;
                default:
                    break;
            }
            this.EditingModelId = null;
            SetDisplayName();
            UpdateSummaryGeneral();
            NotifyOfPropertyChange(() => AssistantMode);
            this.InventoryItem.IsTrackChange = true;
            this.IsLoadedGeneral = true;
        }