コード例 #1
0
        private void ReOpenAllTrans()
        {
            CWConfirmationBox dialog = new CWConfirmationBox(Uniconta.ClientTools.Localization.lookup("AreYouSureToContinue"), Uniconta.ClientTools.Localization.lookup("Confirmation"), false);

            dialog.Closing += async delegate
            {
                if (dialog.ConfirmationResult == CWConfirmationBox.ConfirmationResultEnum.Yes)
                {
                    TransactionAPI transApi      = new TransactionAPI(this.api);
                    var            masterAccount = dgCreditorTranOpenGrid.masterRecord as DCAccount;
                    if (masterAccount != null)
                    {
                        busyIndicator.IsBusy = true;
                        var errorCodes = await transApi.ReOpenAll(masterAccount, true);

                        busyIndicator.IsBusy = false;
                        UtilDisplay.ShowErrorCode(errorCodes);
                        if (errorCodes == ErrorCodes.Succes)
                        {
                            InitQuery();
                        }
                    }
                }
            };
            dialog.Show();
        }
コード例 #2
0
        async void Settle()
        {
            if (transOpenMaster != null && settles != null && settles.Count > 0)
            {
                TransactionAPI transApi = new TransactionAPI(api);
                var            err      = await transApi.Settle(transOpenMaster, settles);

                transOpenMaster = null;
                settles         = null;
                UtilDisplay.ShowErrorCode(err);
                InitQuery();
            }
        }
コード例 #3
0
        async void Settle(CreditorTransClient trans)
        {
            TransactionAPI tranApi = new TransactionAPI(api);
            ErrorCodes     err;

            if (trans.IsSettled)
            {
                err = await tranApi.ReOpen(master, trans);
            }
            else
            {
                err = await tranApi.ReOpen(trans, master);
            }
            if (err != ErrorCodes.Succes)
            {
                UtilDisplay.ShowErrorCode(err);
            }
            else
            {
                InitQuery();
            }
        }