private void btnBuscarRut_Click(object sender, RoutedEventArgs e)
        {
            BibliotecaClase.Contrato conti = new BibliotecaClase.Contrato();
            string id = ((BibliotecaClase.Cliente)cboxRut.SelectedItem).Rut;
            var    x  = conti.cliConContrato(id);

            dtgContratos.ItemsSource = x;
        }
 private void btnBuscar_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         BibliotecaClase.Contrato cont = new BibliotecaClase.Contrato();
         string textoRut = ((BibliotecaClase.Cliente)cboxRut.SelectedItem).Rut;
         var    c        = cont.cliConContrato(textoRut);
         dtgContratos.ItemsSource = c;
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error al buscar: " + ex.Message);
     }
 }
예제 #3
0
        public void TestMethod5()
        { //3A
          //ARRANGE

            BibliotecaClase.Contrato con = new BibliotecaClase.Contrato();
            string ClienteConContrato    = "11.813.711-6";
            List <BibliotecaClase.Contrato> realidad;

            //ACT
            realidad = con.cliConContrato(ClienteConContrato);


            //Assert
            Assert.IsNotNull(realidad);
        }