private async void AddDepositor()
        {
           if (string.IsNullOrEmpty(EAGCLoginDetails.TokenId))
            {

                Login();
            }
            else
            {
                using (var c = NestedContainer)
                {
                    var cd =
                        new ContactCreateDepositorCommand(
                            new ContactPersonalNameDto(FirstName, MiddleName, LastName), MobileNumber,
                            AccountId.ToString());

                    var newDepositor = await Using<IEagcServiceProxy>(c).AddDepositor(cd);
                    if (newDepositor.CommandExecutionStatus == CommandExecutionStatus.RanToCompletion)
                    {
                        MessageBox.Show("Depositor Saved Successfully");
                    }
                    
                    Resetvm();
                }
            }

        }
Beispiel #2
0
       public async Task<IdResponse> AddDepositor(ContactCreateDepositorCommand addDepositor)
       {
           var c = Config.Init();
           IWarehouseReceiptClient wrc = WarehouseReceiptClientFactory.Create(c.WREndPoint, c.VAOKey);
           var newDepositor = await wrc.ContactClient.CreateNewDepositor(addDepositor, EAGCLoginDetails.TokenId, true);
           if (newDepositor != null)
           {
               return newDepositor;
           }
           return null;

       }