예제 #1
0
        private void Modificar_Cliente_click(object sender, RoutedEventArgs e)
        {
            try
            {
                object selected  = dataGrid_Cliente.SelectedItem;
                string rut       = (dataGrid_Cliente.SelectedCells[0].Column.GetCellContent(selected) as TextBlock).Text;
                string nombre    = (dataGrid_Cliente.SelectedCells[1].Column.GetCellContent(selected) as TextBlock).Text;
                string apellidos = (dataGrid_Cliente.SelectedCells[2].Column.GetCellContent(selected) as TextBlock).Text;
                string direccion = (dataGrid_Cliente.SelectedCells[3].Column.GetCellContent(selected) as TextBlock).Text;
                string fono      = (dataGrid_Cliente.SelectedCells[4].Column.GetCellContent(selected) as TextBlock).Text;
                string email     = (dataGrid_Cliente.SelectedCells[5].Column.GetCellContent(selected) as TextBlock).Text;
                //string comuna = (dataGrid_Cliente.SelectedCells[6].Column.GetCellContent(selected) as TextBox).Text;
                string modi = (dataGrid_Cliente.SelectedCells[0].Column.GetCellContent(selected) as TextBlock).Text;

                AgregarClienteWpf ac = new AgregarClienteWpf();
                ac.txt_rut_cliente.Text       = rut;
                ac.txt_nombres_cliente.Text   = nombre;
                ac.txt_apellidos_cliente.Text = apellidos;
                ac.txt_direccion_cliente.Text = direccion;
                ac.txt_fono_cliente.Text      = fono;
                ac.txt_email_cliente.Text     = email;
                //ac.Cbo_comuna_Cliente. = comuna;


                ac.txt_modificar_cliente.Text = modi;

                ac.Show();
            }
            catch (Exception)
            {
                notifier.ShowWarning("Debe seleccionar el cliente para  modificar");
            }
        }
예제 #2
0
        private void Btn_agregar_Cliente_click(object sender, RoutedEventArgs e)
        {
            AgregarClienteWpf ac = new AgregarClienteWpf();

            ac.Show();
        }