コード例 #1
0
 public void RefreshCount()
 {
     NotifyPropertyChanged("CurrentCount");
     NotifyPropertyChanged("CentralStorageCount");
     MaterialListNotificator.Notify(Item.MaterialId, "StockAvailable");
     MaterialListNotificator.Notify(Item.MaterialId, "ExternStorageCount");
 }
コード例 #2
0
        private void ExecuteDeleteOrderCommand(object param)
        {
            ProductOrderViewModel viewModel = (ProductOrderViewModel)param;

            StringBuilder question = new StringBuilder();

            question.AppendLine("QuestionRemoveOrder".Localize());
            question.AppendFormat("QuestionRemoveOrderDetail".Localize(), viewModel.NameDescription, viewModel.Code);

            if (UIApplication.MessageDialogs.Question(question.ToString()) == QuestionResult.Negative)
            {
                return;
            }

            Remove(viewModel);
            MaterialListNotificator.UnregisterListener(viewModel);
            MaterialListNotificator.Notify(viewModel.MaterialId, "OrderCount");
        }
コード例 #3
0
        public void Reload(ILongOperationResult result)
        {
            try
            {
                if (result == null)
                {
                    return;
                }

                if (result.CustomAction != null)
                {
                    result.CustomAction();
                }

                if (result.RefreshAll)
                {
                    Reload();
                    return;
                }

                if (result.DataPublished)
                {
                    UIApplication.MessageDialogs.Info("DataSaved".Localize());
                    Reload();
                    return;
                }

                if (result.RefreshProductOrders)
                {
                    _productOrdersData = null;
                    NotifyPropertyChanged("ProductOrdersData");
                }

                if (result.RefreshMaterialOrders)
                {
                    _materialOrdersData = null;
                    NotifyPropertyChanged("MaterialOrdersData");
                }

                if (result.RefreshExternStorageStats)
                {
                    _externStorageMaterialsData = null;
                    NotifyPropertyChanged("ExternStorageMaterialsData");
                }

                if (result.RefreshAllMaterial)
                {
                    _materialsData = null;
                    NotifyPropertyChanged("MaterialsData");
                }

                if (result.MaterialRefreshList != null)
                {
                    foreach (ObjectId materialId in result.MaterialRefreshList)
                    {
                        MaterialListNotificator.Notify(materialId);
                    }
                }
            }
            catch (Exception ex)
            {
                ApplicationContext.Log.Error(GetType(), ex);
            }
        }