Example #1
0
        private void BtnContraste_Click(object sender, RoutedEventArgs e)
        {
            Contraste = !Contraste;
            if (Contraste)
            {
                {
                    SolidColorBrush PinkColor = new SolidColorBrush(Color.FromRgb(242, 0, 252));



                    gPrincipal.Background     = Brushes.Black;
                    btnCerrar.Background      = PinkColor;
                    btnEditarCli.Background   = PinkColor;
                    btnEliminarCli.Background = PinkColor;
                    btnLimpiarCli.Background  = PinkColor;
                    btnListarCli.Background   = PinkColor;
                    btnBuscarCli.Background   = PinkColor;
                }
            }
            else
            {
                editarCliente editarCliente = new editarCliente();
                editarCliente.Show();
                this.Hide();
            }
        }
Example #2
0
        private void btn_editar_cliente_Click(object sender, RoutedEventArgs e)
        {
            editarCliente editCli = new editarCliente();

            editCli.Owner = this;
            editCli.ShowDialog();
        }
        private async void dtgCliente_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            int index   = (dtgCliente.SelectedIndex) + 1;
            int largoDG = dtgCliente.Items.Count;

            if (index > Largo)
            {
                await this.ShowMessageAsync("Advertencia!", "No se pueden mostrar datos de una fila vacĂ­a");
            }
            else
            {
                Cliente       objCli = dtgCliente.SelectedItem as Cliente;
                string        nom    = objCli.Nombre;
                string        ap     = objCli.Apellido;
                string        rut    = objCli.Rut;
                string        sexo   = objCli.Sexo;
                string        estC   = objCli.EstadoCivil;
                string        fecN   = objCli.FechaNacimiento;
                editarCliente edCli  = new editarCliente(nom, ap, rut, sexo, estC, fecN);
                this.Hide();
                edCli.Owner = this;
                edCli.Show();
            }
        }