Пример #1
0
 private void BtnMostrar_Click(object sender, RoutedEventArgs e)
 {
     dgtDueñoMascota.ItemsSource = (from a in mane.ListarClientes()
                                    select new
     {
         id = a.Id,
         edad = a.Edad,
         rut = a.Rut,
         nom = a.Nombre,
         pago = a.MetoPago,
     }
                                    ).ToArray();
 }
Пример #2
0
 private async void BtnMostrarListClientes_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         dtgListadoClientes.ItemsSource = (
             from ent in mane.ListarClientes()
             select new
         {
             Rut = ent.Rut,
             RazonSocial = ent.RazonSocial,
             Direccion = ent.Direccion,
             NombreContacto = ent.NombreContacto,
             Email = ent.Email,
             Telefono = ent.Telefono,
             ActividadEmpresa = ent.ActividadEmpresa,
             TipoEmpresa = ent.TipoEmpresa
         }).ToList();
     }
     catch (Exception zz)
     {
         await this.ShowMessageAsync("Error", string.Format(
                                         "No se han encontrado clientes."));
     }
 }