示例#1
0
        private void btn_AgregarDelegacion_Click(object sender, RoutedEventArgs e)
        {
            Delegacion        delegacion = new Delegacion();
            AgregarDelegacion ad         = new AgregarDelegacion(this, true, delegacion);

            ad.Show();
        }
示例#2
0
        private void btn_EditarDelegacion_Click(object sender, RoutedEventArgs e)
        {
            int index = dgDelegaciones.SelectedIndex;

            if (index >= 0)
            {
                Delegacion        delegacion = listDelegacion[index];
                Boolean           resultado  = false;
                AgregarDelegacion ad         = new AgregarDelegacion(this, false, delegacion);
                ad.ShowDialog();
                resultado = ad.Resultado;
                if (resultado)
                {
                    this.CargaDelegaciones();
                }
            }
            else
            {
                MessageBox.Show("Seleccione una delegacion");
            }
        }