Exemplo n.º 1
0
        void SetNewAccount(GLTransClient selectedItem)
        {
            var cwObj = new CwEditTransaction(api, hideComments: true, hideVat: true, IsCreditor: (selectedItem._DCType == GLTransRefType.Creditor));

            cwObj.Closed += async delegate
            {
                if (cwObj.DialogResult == true)
                {
                    busyIndicator.IsBusy = true;
                    var errorCodes = await postingApiInv.SetNewDCAccount(selectedItem, cwObj.DCAccount);

                    busyIndicator.IsBusy = false;
                    UtilDisplay.ShowErrorCode(errorCodes);
                    if (errorCodes == ErrorCodes.Succes)
                    {
                        BindGrid();
                    }
                }
            };
            cwObj.Show();
        }
Exemplo n.º 2
0
        void AddVat(GLTransClient selectedItem)
        {
            var cwObj = new CwEditTransaction(api);

            cwObj.Closed += async delegate
            {
                if (cwObj.DialogResult == true)
                {
                    busyIndicator.IsBusy = true;
                    var errorCodes = await postingApiInv.AddVat(selectedItem, cwObj.Vat, cwObj.Comment);

                    busyIndicator.IsBusy = false;
                    UtilDisplay.ShowErrorCode(errorCodes);
                    if (errorCodes == ErrorCodes.Succes)
                    {
                        BindGrid();
                    }
                }
            };
            cwObj.Show();
        }