Пример #1
0
        private void AgregarButton_Click(object sender, RoutedEventArgs e)
        {
            llamadas.LlamadasDetalle.Add(new LlamadasDetalle(llamadas.LlamadaId, ProblemaTextBox.Text, SolucionTextBox.Text));

            Cargar();

            ProblemaTextBox.Clear();
            SolucionTextBox.Clear();
            SolucionTextBox.Focus();
        }
        private void AgregarButton_Click(object sender, RoutedEventArgs e)
        {
            if (!ValidarAgregarButton())
            {
                return;
            }

            contenedor.llamada.LlamadasDetalle.Add(new LlamadaDetalle(contenedor.llamada.LlamadaId, ProblemaTextBox.Text, SolucionTextBox.Text));

            Recargar();

            ProblemaTextBox.Clear();
            SolucionTextBox.Clear();
            ProblemaTextBox.Focus();
        }
        private void AgregarButton_Click(object sender, RoutedEventArgs e)
        {
            if (DetalleDataGrid.ItemsSource != null)
            {
                this.llamadas.Detalles = (List <LlamadasDetalle>)DetalleDataGrid.ItemsSource;
            }

            //Agregar un nuevo detalle con los datos introducidos

            this.llamadas.Detalles.Add(new LlamadasDetalle
            {
                id       = IdTextBox.Text.ToInt(),
                Problema = ProblemaTextBox.Text,
                Solucion = SolucionTextBox.Text,
            });
            Refrescar();
            ProblemaTextBox.Focus();
            ProblemaTextBox.Clear();
            SolucionTextBox.Clear();
        }