예제 #1
0
 public bool CheckAll()
 {
     if (CustomerInvoiceGroups.Where(s => s.IsMail).Select(r => r.Email).Contains(string.Empty))
     {
         if (CustomerInvoiceGroups.Select(l => l.Label).Contains(null) ||
             CustomerInvoiceGroups.Select(s => s.Address1).Contains(null) ||
             CustomerInvoiceGroups.Select(z => z.ZipCode).Contains(null) ||
             CustomerInvoiceGroups.Select(c => c.City).Contains(null) ||
             CustomerInvoiceGroups.Select(cc => cc.Country).Contains(null) ||
             CustomerInvoiceGroups.Select(e => e.Email).Contains(string.Empty))
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
     if (CustomerInvoiceGroups.Select(l => l.Label).Contains(null) ||
         CustomerInvoiceGroups.Select(s => s.Address1).Contains(null) ||
         CustomerInvoiceGroups.Select(z => z.ZipCode).Contains(null) ||
         CustomerInvoiceGroups.Select(c => c.City).Contains(null) ||
         CustomerInvoiceGroups.Select(cc => cc.Country).Contains(null))
     {
         return(false);
     }
     return(true);
 }
예제 #2
0
        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();
            });
        }