Exemple #1
0
        private void Prog_Pagos_Closed(object sender, EventArgs e)
        {
            Prog_Pagos ventana = sender as Prog_Pagos;

            if (ventana.datos != null && ventana.datos.Rows.Count > 0 && ventana._ok)
            {
                dt_programa  = ventana.datos;
                val_fec_ini  = ventana.fecha_i.ToShortDateString();
                val_fec_fin  = ventana.fecha_f.ToShortDateString();
                val_ren_fija = ventana.fija;
                val_ren_var  = ventana.var;
            }
            // (refrescar)
            //QuitarEfecto(this);
            this.IsEnabled = true;
        }
Exemple #2
0
 private void btn_programa_Click(object sender, RoutedEventArgs e)
 {
     if (txt_rent.Text.ToString() != "" && txt_rent_v.Text.ToString() != "")
     {
         if (date_fin.Text.ToString() != "" && date_ini.Text.ToString() != "")
         {
             if (Convert.ToDateTime(date_ini.Text.ToString()) < Convert.ToDateTime(date_fin.Text.ToString()))
             {
                 // Se debe capturar el código
                 if (!Prog_Pagos._activo_form)
                 {
                     Prog_Pagos frm2 = new Prog_Pagos("A", "", "", dt_programa, Convert.ToDateTime(date_ini.Text.ToString()), Convert.ToDateTime(date_fin.Text.ToString()), txt_rent.Text.ToString(), txt_rent_v.Text.ToString());
                     frm2.Owner = this;
                     //AplicarEfecto(this);
                     this.IsEnabled = false;
                     frm2.Show();
                     Prog_Pagos._activo_form = true;
                     frm2.Closed            += Prog_Pagos_Closed;
                 }
             }
             else
             {
                 MessageBox.Show("Las Fechas no guardan Relación, favor verificar. ",
                                 "Bata - Mensaje De Advertencia", MessageBoxButton.OK, MessageBoxImage.Error);
             }
         }
         else
         {
             MessageBox.Show("Es necesario ingresar Fechas de Contrato para continuar. ",
                             "Bata - Mensaje De Advertencia", MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
     else
     {
         MessageBox.Show("Es necesario ingresar Renta Fija y Variable para continuar. ",
                         "Bata - Mensaje De Advertencia", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }