Exemplo n.º 1
0
        private void OnRefreshClick(object sender, RoutedEventArgs e)
        {
            var balance = DataContext as IBalanceFreeHierarchy;

            if (balance == null)
            {
                return;
            }

            try
            {
                double?highLimit, lowerLimit, highLimitValue, lowerLimitValue;

                var message = ARM_Service.BL_TryLoadFreeHierarchyBalanceLimit(balance.BalanceUn, balance.BalanceTypeHierarchy,
                                                                              out highLimit, out lowerLimit, out highLimitValue, out lowerLimitValue);

                if (message == null)
                {
                    return;
                }

                if (message.Length > 0)
                {
                    Manager.UI.ShowMessage(message);
                    return;
                }

                balance.HighLimit       = highLimit;
                balance.LowerLimit      = lowerLimit;
                balance.HighLimitValue  = highLimitValue;
                balance.LowerLimitValue = lowerLimitValue;
            }
            catch (Exception ex)
            {
                Manager.UI.ShowMessage(ex.Message);
            }
        }