Exemplo n.º 1
0
        /// <summary>
        /// 加载扣款项维护信息
        /// </summary>
        public void LoadDeductInfo()
        {
            deductFacade.GetSingleDeductBySysNo(getLoadDeductSysNo, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    Window.Alert(args.Error.Faults[0].ErrorDescription);
                    return;
                }

                deductVm = EntityConverter <Deduct, DeductQueryVM> .Convert(args.Result, (s, t) =>
                {
                    t = new DeductQueryVM
                    {
                        Name         = s.Name,
                        DeductType   = s.DeductType,
                        AccountType  = s.AccountType,
                        DeductMethod = s.DeductMethod,
                    };
                });

                SetRdbtnIsSelected();
                this.DataContext = deductVm;
            });
        }
Exemplo n.º 2
0
        void UCDeductMaintain_Loaded(object sender, RoutedEventArgs e)
        {
            if (null != getLoadDeductSysNo)
            {
                serviceFacade.GetSingleDeductBySysNo(getLoadDeductSysNo, (obj, args) =>
                {
                    if (args.FaultsHandle())
                    {
                        // Window.Alert(args.Error.Faults[0].ErrorDescription);
                        return;
                    }

                    deductVM = EntityConverter <Deduct, DeductQueryVM> .Convert(args.Result, (s, t) =>
                    {
                        t = new DeductQueryVM
                        {
                            Name         = s.Name,
                            DeductType   = s.DeductType,
                            AccountType  = s.AccountType,
                            DeductMethod = s.DeductMethod,
                        };
                    });

                    if (this.deductVM.Status == Status.Invalid)
                    {
                        this.btnSave.IsEnabled = false;
                    }
                    else
                    {
                        this.btnSave.IsEnabled = true;
                    }

                    SetRdbtnIsSelected();

                    this.DataContext = deductVM;
                });
            }
        }