private void GetAllCustomerInvoiceGroups()
        {
            _dataService.GetCustomerInvoiceGroupByCustomerId(_customer.Id).Subscribe(
                i =>
            {
                foreach (var customerInvoiceGroup in i)
                {
                    CustomerInvoiceGroups.Add(customerInvoiceGroup);
                }

                NewCigLabel = CustomerInvoiceGroups.Where(d => d.DefaultCig).Select(l => l.Label).First();
            });
        }
Exemple #2
0
 private void ExecuteAddNew(object obj)
 {
     CustomerInvoiceGroups.Add(
         new EditCustomerInvoiceGroupItemViewModel(
             new CustomerInvoiceGroup
     {
         Attention  = _customer.ContactName,
         Email      = _customer.Email,
         Address1   = _customer.StreetAddress,
         Address2   = _customer.Address2,
         ZipCode    = _customer.ZipCode,
         City       = _customer.City,
         Country    = _customer.Country,
         CustomerID = _customer.CustomerID,
         SendFormat = _customer.SendFormat,
         EmailCC    = _customer.EmailCC
     }));
     CloseAndSaveCIGView.RaiseCanExecuteChanged();
     SelectedCustomerInvoiceGroups = CustomerInvoiceGroups.Last();
 }