Example #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (button2.Enabled == true)
     {
         button2.Enabled  = false;
         button3.Enabled  = false;
         textBox1.Enabled = false;
         textBox1.Text    = textBox2.Text = "";
         textBox2.Focus();
     }
     else
     {
         if (textBox2.Text.Length > 0)
         {
             imagen.espere();
             acceso.agregar_pais(textBox2.Text);
             this.paisTableAdapter.Fill(this.programa2DataSet4.Pais);
             button2.Enabled  = button3.Enabled = true;
             textBox1.Enabled = true;
             imagen.fin_espere();
         }
         else
         {
             MessageBox.Show("Debe indicar el nombre del país");
         }
     }
 }
Example #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (button2.Enabled)
     {
         textBox1.ReadOnly = false;
         button2.Enabled   = false;
         textBox1.Text     = textBox2.Text = "";
         button3.Text      = "Cancelar";
     }
     else
     {
         if (textBox1.Text.Length > 0 && textBox2.Text.Length > 0)
         {
             imagen.espere();
             acceso.agregar_status(textBox1.Text, textBox2.Text);
             textBox1.ReadOnly = true;
             button2.Enabled   = true;
             button3.Text      = "Eliminar";
             acceso.grid_manstatus(ref dt, ref dataGridView1);
             imagen.fin_espere();
         }
         else
         {
             MessageBox.Show("Debe escribir un código y un concepto");
         }
     }
 }
Example #3
0
 private void resolucionesFavorablesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if ((dbpais.Length > 0) && (periodo.Length > 0))
     {
         imagen.espere();
         AccesoADatos acceso = new AccesoADatos(Application.StartupPath);
         acceso.accesapais(Application.StartupPath, periodo, dbpais);
         acceso.Resoluciones_favorables(periodo, dbpais, saveFileDialog1);
         imagen.fin_espere();
     }
     else
     {
         MessageBox.Show("Debe seleccionar un período y un país");
     }
 }
Example #4
0
 private void button2_Click(object sender, EventArgs e)
 {
     imagen.espere();
     acceso.modificar_marca_en_expediente(periodo, dataGridView1.CurrentRow.Cells[0].Value.ToString(), textBox1.Text);
     acceso.grid_marca(ref dt, ref dataGridView1, periodo);
     imagen.fin_espere();
 }
Example #5
0
 public FormManStatus()
 {
     InitializeComponent();
     acceso = new AccesoADatos(Application.StartupPath);
     img    = pictureBox1;
     imagen = new ImagenProceso(img, this);
     imagen.fin_espere();
 }
Example #6
0
 public ResoluciónDelExpediente(FormRegistro f, string pais)
 {
     InitializeComponent();
     frm    = f;
     img    = pictureBox1;
     imagen = new ImagenProceso(img, this);
     imagen.fin_espere();
     this.pais = pais;
 }
Example #7
0
 public FormAdmin(int usr)
 {
     InitializeComponent();
     usuario = usr;
     acceso  = new AccesoADatos(Application.StartupPath);
     img     = pictureBox1;
     imagen  = new ImagenProceso(img, this);
     imagen.fin_espere();
 }
Example #8
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (button2.Enabled)
     {
         button3.Enabled   = false;
         textBox1.Text     = textBox2.Text = textBox4.Text = textBox5.Text = textBox6.Text = textBox7.Text = "";
         checkBox1.Checked = false;
         comboBox1.Text    = "";
         button2.Text      = "Cancelar";
     }
     else
     {
         if (textBox1.Text.Length > 0 && textBox2.Text.Length > 0)
         {
             imagen.espere();
             string pagado = "0";
             if (checkBox1.Checked)
             {
                 pagado = "1";
             }
             if (comboBox2.Text.Equals("Cheque"))
             {
                 acceso.agregar_pago(textBox1.Text, periodo, textBox2.Text, textBox5.Text, dateTimePicker1.Value.ToShortDateString(), comboBox1.Text,
                                     "", textBox6.Text, textBox7.Text, pagado);
             }
             else
             {
                 acceso.agregar_pago(textBox1.Text, periodo, textBox2.Text, "", dateTimePicker1.Value.ToShortDateString(), comboBox1.Text,
                                     textBox5.Text, textBox6.Text, textBox7.Text, pagado);
             }
             textBox1.ReadOnly = true;
             button3.Enabled   = true;
             button2.Text      = "Eliminar";
             acceso.grid_pagos(ref dt, ref dataGridView1, periodo);
             imagen.fin_espere();
         }
         else
         {
             MessageBox.Show("Debe escribir un código y un concepto");
         }
     }
 }
Example #9
0
 public FormMedio(int usr, string per, string pa)
 {
     InitializeComponent();
     img    = pictureBox1;
     imagen = new ImagenProceso(img, this);
     imagen.fin_espere();
     usuario = usr;
     periodo = per;
     pais    = pa;
     acceso.accesapais(Application.StartupPath, periodo, pais);
 }
Example #10
0
 public FormListaRegistro(FormRegistro f, string per, string pa)
 {
     InitializeComponent();
     periodo = per;
     pais    = pa;
     padre   = f;
     img     = pictureBox1;
     imagen  = new ImagenProceso(img, this);
     imagen.fin_espere();
     filtro = "";
 }
Example #11
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (button2.Enabled)
     {
         button2.Enabled = false;
         button3.Enabled = false;
         comboBox1.Text  = comboBox2.Text = textBox1.Text = textBox2.Text = "";
     }
     else
     {
         if (comboBox1.Text.Length > 0 && comboBox2.Text.Length > 0 && textBox1.Text.Length > 0 && textBox2.Text.Length > 0)
         {
             imagen.espere();
             acceso.agregar_ciudad(comboBox1.Text, comboBox2.Text, textBox1.Text, textBox2.Text);
             acceso.grid_ciudad(ref dt, ref dataGridView1);
             button2.Enabled = button3.Enabled = true;
             imagen.fin_espere();
         }
     }
 }
Example #12
0
        public FormEstadis()
        {
            InitializeComponent();
            img    = pictureBox1;
            imagen = new ImagenProceso(img, this);
            imagen.fin_espere();

            /*usuario = usr;
             * periodo = per;
             * pais = pa;
             * acceso.accesapais(Application.StartupPath, periodo, pais);*/
        }
Example #13
0
 private void button1_Click(object sender, EventArgs e)
 {
     imagen.espere();
     Application.DoEvents();
     if (!(acceso.guardar_resolucion(periodo, expediente, textBox9.Text, dateTimePicker5.Value.ToShortDateString(),
                                     textBox10.Text, textBox11.Text, textBox12.Text, textBox13.Text, textBox14.Text,
                                     dateTimePicker6.Value.ToShortDateString(), textBox15.Text, dateTimePicker7.Value.ToShortDateString(),
                                     dateTimePicker8.Value.ToShortDateString(), textBox16.Text, usuario, pais)))
     {
         MessageBox.Show("Ocurrió un error guardando la resolución. Revise que el expediente esté creado.");
     }
     Application.DoEvents();
     imagen.fin_espere();
 }
Example #14
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBox1.Text.Length > 0)
     {
         imagen.espere();
         tabControl1.Enabled = true;
         dataGridView2.Rows.Clear();
         acceso.cuantitativo(ref dataGridView2, comboBox1.Text);
         dataGridView1.Rows.Clear();
         acceso.administrativo(ref dataGridView1, comboBox1.Text);
         imagen.fin_espere();
     }
     else
     {
         tabControl1.Enabled = false;
     }
 }
Example #15
0
        private void button1_Click(object sender, EventArgs e)
        {
            imagen.espere();
            filtro = "";

            /*if (textBox1.Text.Length > 0)
             * {
             *  if (filtro.Length > 0)
             *      filtro += " AND ";
             *  filtro += "NumExp like '%" + textBox1.Text + "%'";
             * }
             * if (textBox2.Text.Length > 0)
             * {
             *  if (filtro.Length > 0)
             *      filtro += " AND ";
             *  filtro += "Pasaporte like '%" + textBox2.Text + "%'";
             * }
             * if (textBox3.Text.Length > 0)
             * {
             *  if (filtro.Length > 0)
             *      filtro += " AND ";
             *  filtro += "Apellidos like '%" + textBox3.Text + "%'";
             * }
             * if (textBox4.Text.Length > 0)
             * {
             *  if (filtro.Length > 0)
             *      filtro += " AND ";
             *  filtro += "Nombres like '%" + textBox4.Text + "%'";
             * }
             * if (comboBox1.Text.Length > 0)
             * {
             *  if (filtro.Length > 0)
             *      filtro += " AND ";
             *  filtro += "Medio like '%" + comboBox1.Text + "%'";
             * }*/

            if (textBox1.Text.Length > 0)
            {
                if (filtro.Length > 0)
                {
                    filtro += " AND ";
                }
                filtro += "solicitudes.NumExp like '%" + textBox1.Text + "%' ";
            }
            if (textBox2.Text.Length > 0)
            {
                if (filtro.Length > 0)
                {
                    filtro += " AND ";
                }
                filtro += "solicitudes.Pasaporte like '%" + textBox2.Text + "%' ";
            }
            if (textBox3.Text.Length > 0)
            {
                if (filtro.Length > 0)
                {
                    filtro += " AND ";
                }
                filtro += "solicitudes.Apellidos like '%" + textBox3.Text + "%' ";
            }
            if (textBox4.Text.Length > 0)
            {
                if (filtro.Length > 0)
                {
                    filtro += " AND ";
                }
                filtro += "solicitudes.Nombres like '%" + textBox4.Text + "%' ";
            }
            if (comboBox1.Text.Length > 0)
            {
                if (filtro.Length > 0)
                {
                    filtro += " AND ";
                }
                filtro += "solicitudes.MedioSolicitud like '%" + comboBox1.Text + "%' ";
            }
            if (radioButton1.Checked)
            {
                acceso.grid_expedientes(ref dt, ref dataGridView1, comboBox2.Text, filtro, 1);
            }
            if (radioButton2.Checked)
            {
                acceso.grid_expedientes(ref dt, ref dataGridView1, comboBox2.Text, filtro, 2);
            }
            if (radioButton3.Checked)
            {
                acceso.grid_expedientes(ref dt, ref dataGridView1, comboBox2.Text, filtro, 3);
            }

            /*try
             * {
             *  dt.DefaultView.RowFilter = filtro;
             * }
             * catch (Exception ex)
             * {
             *  dt.DefaultView.RowFilter = "";
             * }*/
            textBox5.Text = dataGridView1.Rows.Count.ToString();
            imagen.fin_espere();
        }
Example #16
0
        private void button1_Click(object sender, EventArgs e)
        {
            imagen.espere();
            filtro     = "";
            txt_filtro = "";

            if (textBox1.Text.Length > 0) //lugar de nacimiento
            {
                if (filtro.Length > 0)
                {
                    filtro     += " AND ";
                    txt_filtro += " Y ";
                }
                filtro    += "solicitudes.LugarNac like '%" + textBox1.Text + "%' ";
                txt_filtro = "Lugar de nacimiento = " + textBox1.Text;
            }

            /*if ((textBox2.Text.Length > 0) || (textBox3.Text.Length > 0) || (textBox4.Text.Length > 0) || (textBox5.Text.Length > 0) ) //lugar de residencia
             * {*/

            /*filtro2 = "";
             * filtro += " ( ";*/
            if (textBox2.Text.Length > 0)
            {
                if (filtro.Length > 0)
                {
                    filtro     += " AND ";
                    txt_filtro += " Y ";
                }
                filtro += "solicitudes.Domicilio like '%" + textBox2.Text + "%' ";
                //filtro2 = ".";
                txt_filtro += " Domicilio = " + textBox2.Text;
            }

            if (textBox3.Text.Length > 0)
            {
                if (filtro.Length > 0)
                {
                    filtro     += " AND ";
                    txt_filtro += " Y ";
                }

                /*   if (filtro2.Length > 0)
                 * {
                 *     filtro += " OR ";
                 *     txt_filtro += " O ";
                 * }*/
                filtro += "solicitudes.Localidad like '%" + textBox3.Text + "%' ";
                //filtro2 = ".";
                txt_filtro += " Localidad =  " + textBox3.Text;
            }
            if (textBox4.Text.Length > 0)
            {
                if (filtro.Length > 0)
                {
                    filtro     += " AND ";
                    txt_filtro += " Y ";
                }

                /*   if (filtro2.Length > 0)
                 * {
                 *     filtro += " OR ";
                 *     txt_filtro += " O ";
                 * }*/
                filtro += "solicitudes.Ciudad like '%" + textBox4.Text + "%' ";
                //filtro2 = ".";
                txt_filtro += " Ciudad =  " + textBox4.Text;
            }
            if (textBox5.Text.Length > 0)
            {
                if (filtro.Length > 0)
                {
                    filtro     += " AND ";
                    txt_filtro += " Y ";
                }

                /*   if (filtro2.Length > 0)
                 * {
                 *     filtro += " OR ";
                 *     txt_filtro += " O ";
                 * }*/
                filtro     += "solicitudes.Estado like '%" + textBox5.Text + "%' ";
                txt_filtro += " Estado =  " + textBox5.Text;
            }
            //filtro += " ) ";
            //}
            if (comboBox1.Text.Length > 0)
            {
                if (filtro.Length > 0)
                {
                    filtro     += " AND ";
                    txt_filtro += " Y ";
                }
                string nummes = Convert.ToString(comboBox1.SelectedIndex);
                if (nummes.Length == 1)
                {
                    nummes = "0" + nummes;
                }

                filtro     += "Month(solicitudes.FSolic)=" + nummes;
                txt_filtro += " Mes =  " + comboBox1.Text;
            }
            if (radioButton1.Checked == true) //aprobadas
            {
                if (filtro.Length > 0)
                {
                    filtro     += " AND ";
                    txt_filtro += " Y ";
                }
                filtro     += "(solicitudes.IdStatus='06' OR solicitudes.IdStatus='08') ";
                txt_filtro += " Aprobadas";
            }
            if (radioButton2.Checked == true) //denegadas
            {
                if (filtro.Length > 0)
                {
                    filtro += " AND ";
                }
                filtro     += "solicitudes.IdStatus<>'06' AND solicitudes.IdStatus<>'08' ";
                txt_filtro += " Denegadas";
            }
            if (txt_filtro.Length > 70)
            {
                txt_filtro.Insert(70, "\n");
            }
            if (txt_filtro.Length > 140)
            {
                txt_filtro.Insert(140, "\n");
            }
            acceso.grid_expedientes(ref dt, ref dataGridView1, periodo, filtro, 4);
            dataGridView1.Columns[0].Visible = false;

            dataGridView1.Columns[2].Visible  = false;
            dataGridView1.Columns[5].Visible  = false;
            dataGridView1.Columns[6].Visible  = false;
            dataGridView1.Columns[7].Visible  = false;
            dataGridView1.Columns[8].Visible  = false;
            dataGridView1.Columns[10].Visible = false;
            dataGridView1.Columns[11].Visible = false;

            for (int i = 16; i < 63; i++)
            {
                dataGridView1.Columns[i].Visible = false;
            }

            label2.Text = dataGridView1.Rows.Count.ToString();
            imagen.fin_espere();
        }
Example #17
0
 private void button5_Click(object sender, EventArgs e)
 {
     if (button5.Text.Equals("Cancelar"))
     {
         button5.Text     = "Eliminar";
         button3.Enabled  = button6.Enabled = true;
         textBox9.Enabled = true;
         textBox6.Enabled = true;
     }
     else
     {
         if (MessageBox.Show("El expediente que se muestra será eliminado completamente. Está seguro?", "Eliminar registro", MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             imagen.espere();
             acceso.eliminarRegistro(periodo, textBox9.Text, textBox6.Text);
             actualizar_historico(textBox1.Text, textBox2.Text);
             foreach (Control c in this.Controls)
             {
                 try
                 {
                     if ((c is TextBox) || (c is ComboBox))
                     {
                         c.Text = "";
                     }
                 }
                 catch (Exception ex)
                 {
                 }
             }
             foreach (Control c in groupBox1.Controls)
             {
                 try
                 {
                     if ((c is TextBox) || (c is ComboBox))
                     {
                         c.Text = "";
                     }
                 }
                 catch (Exception ex)
                 {
                 }
             }
             foreach (Control c in groupBox2.Controls)
             {
                 try
                 {
                     if ((c is TextBox) || (c is ComboBox))
                     {
                         c.Text = "";
                     }
                 }
                 catch (Exception ex)
                 {
                 }
             }
             foreach (Control c in groupBox3.Controls)
             {
                 try
                 {
                     if ((c is TextBox) || (c is ComboBox))
                     {
                         c.Text = "";
                     }
                 }
                 catch (Exception ex)
                 {
                 }
             }
             foreach (Control c in groupBox4.Controls)
             {
                 try
                 {
                     if ((c is TextBox) || (c is ComboBox))
                     {
                         c.Text = "";
                     }
                 }
                 catch (Exception ex)
                 {
                 }
             }
             foreach (Control c in tabPage1.Controls)
             {
                 try
                 {
                     if ((c is TextBox) || (c is ComboBox))
                     {
                         c.Text = "";
                     }
                 }
                 catch (Exception ex)
                 {
                 }
             }
             foreach (Control c in tabPage2.Controls)
             {
                 try
                 {
                     if ((c is TextBox) || (c is ComboBox))
                     {
                         c.Text = "";
                     }
                 }
                 catch (Exception ex)
                 {
                 }
             }
             foreach (Control c in tabPage3.Controls)
             {
                 try
                 {
                     if ((c is TextBox) || (c is ComboBox))
                     {
                         c.Text = "";
                     }
                 }
                 catch (Exception ex)
                 {
                 }
             }
             foreach (Control c in tabPage4.Controls)
             {
                 try
                 {
                     if ((c is TextBox) || (c is ComboBox))
                     {
                         c.Text = "";
                     }
                 }
                 catch (Exception ex)
                 {
                 }
             }
             try
             {
                 dataGridViewFamiliares.Rows.Clear();
             }
             catch (Exception ex)
             {
             }
             try
             {
                 dataGridViewHistorico.Rows.Clear();
             }
             catch (Exception ex)
             {
             }
             try
             {
                 dataGridViewIngresos.Rows.Clear();
             }
             catch (Exception ex)
             {
             }
         }
         imagen.fin_espere();
     }
 }
Example #18
0
        private void button1_Click(object sender, EventArgs e)
        {
            int valor = 0, valor1 = 0;

            if (radioButton1.Checked)
            {
                if ((textBox1.Text.Length == 0) ||
                    (textBox2.Text.Length == 0))
                {
                    MessageBox.Show("Debe indicar los limites de los expedientes a procesar");
                    return;
                }
                if (!(int.TryParse(textBox1.Text, out valor)) ||
                    !(int.TryParse(textBox2.Text, out valor1)))
                {
                    MessageBox.Show("Debe indicar valores numéricos en los limites de los expedientes a procesar");
                    return;
                }
                if (valor > valor1)
                {
                    MessageBox.Show("El valor 'Desde' debe ser el numero mas bajo de los expedientes a procesar");
                    return;
                }
            }
            if (radioButton2.Checked)
            {
                if (dateTimePicker1.Value > dateTimePicker2.Value)
                {
                    MessageBox.Show("La fecha 'Desde' debe ser la fecha mas baja de los expedientes a procesar");
                    return;
                }
            }
            if (!((radioButton5.Checked) || (radioButton6.Checked) || (radioButton7.Checked) || (radioButton8.Checked) ||
                  (radioButton9.Checked) || (radioButton10.Checked) || (radioButton11.Checked) || (radioButton12.Checked)))
            {
                MessageBox.Show("Indique el tipo de documento");
                return;
            }

            if (radioButton5.Checked)
            {
                imagen.espere();
                acceso.favorables_filtro(valor, valor1, dateTimePicker1.Value, dateTimePicker2.Value, periodo, pais, saveFileDialog1);
                //System.Diagnostics.Process.Start("winword.exe", Application.StartupPath + "\\Documentos\\" + System.Configuration.ConfigurationManager.AppSettings["Resoluciones_favorables_"+pais]);
                imagen.fin_espere();
            }
            if (radioButton6.Checked)
            {
                imagen.espere();
                acceso.Justificante_filtro(valor, valor1, dateTimePicker1.Value, dateTimePicker2.Value, periodo, pais, saveFileDialog1);
                //System.Diagnostics.Process.Start("winword.exe", Application.StartupPath + "\\Documentos\\" + System.Configuration.ConfigurationManager.AppSettings["Justificantes_" + pais]);
                imagen.fin_espere();
            }
            if (radioButton7.Checked)
            {
                imagen.espere();
                acceso.Resoluciones_desfavorables(valor, valor1, dateTimePicker1.Value, dateTimePicker2.Value, periodo, pais, saveFileDialog1);
                //System.Diagnostics.Process.Start("winword.exe", Application.StartupPath + "\\Documentos\\" + System.Configuration.ConfigurationManager.AppSettings["Desfavorable_" + pais]);
                imagen.fin_espere();
            }
            if (radioButton8.Checked)
            {
                MessageBox.Show("No implementado");
                return;
            }
            if (radioButton9.Checked)
            {
                System.Diagnostics.Process.Start("winword.exe", Application.StartupPath + "\\Documentos\\" + System.Configuration.ConfigurationManager.AppSettings["Desestimiento_" + pais]);
            }
            if (radioButton10.Checked)
            {
                System.Diagnostics.Process.Start("winword.exe", Application.StartupPath + "\\Documentos\\" + System.Configuration.ConfigurationManager.AppSettings["Revision_Favorable_" + pais]);
            }
            if (radioButton12.Checked)
            {
                System.Diagnostics.Process.Start("winword.exe", Application.StartupPath + "\\Documentos\\" + System.Configuration.ConfigurationManager.AppSettings["Solicitud_Duplicada_" + pais]);
            }
        }
Example #19
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (button1.Enabled)
            {
                //Vamos a modificar el registro
                imagen.espere();
                string activo = "";
                if (radioButton1.Checked)
                {
                    activo = "1";
                }
                if (radioButton2.Checked)
                {
                    activo = "2";
                }
                if (radioButton3.Checked)
                {
                    activo = "3";
                }
                if (radioButton4.Checked)
                {
                    activo = "4";
                }
                try
                {
                    acceso.modificar_periodo(textBox1.Text, textBox2.Text, Double.Parse(textBox3.Text), Double.Parse(textBox4.Text), Double.Parse(textBox5.Text), Double.Parse(textBox6.Text),
                                             Double.Parse(textBox7.Text), Double.Parse(textBox8.Text), Double.Parse(textBox9.Text), Double.Parse(textBox10.Text),
                                             Double.Parse(textBox11.Text), Double.Parse(textBox12.Text), Double.Parse(textBox13.Text), Double.Parse(textBox14.Text),
                                             Double.Parse(textBox15.Text), Double.Parse(textBox16.Text), Double.Parse(textBox17.Text), Double.Parse(textBox18.Text), activo, checkBox1.Checked, usuario.ToString(), DateTime.Now.ToShortDateString());
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Ocurrio un error. " + ex.Message);
                }
                this.periodoTableAdapter.Fill(this.programa2DataSet.Periodo);
                dataGridView1_SelectionChanged(sender, e);
                imagen.fin_espere();
            }
            else
            {
                //Vamos a agregar un registro
                imagen.espere();
                string activo = "";
                if (radioButton1.Checked)
                {
                    activo = "1";
                }
                if (radioButton2.Checked)
                {
                    activo = "2";
                }
                if (radioButton3.Checked)
                {
                    activo = "3";
                }
                if (radioButton4.Checked)
                {
                    activo = "4";
                }
                try
                {
                    acceso.agregar_periodo(textBox1.Text, textBox2.Text, Double.Parse(textBox3.Text), Double.Parse(textBox4.Text), Double.Parse(textBox5.Text), Double.Parse(textBox6.Text),
                                           Double.Parse(textBox7.Text), Double.Parse(textBox8.Text), Double.Parse(textBox9.Text), Double.Parse(textBox10.Text),
                                           Double.Parse(textBox11.Text), Double.Parse(textBox12.Text), Double.Parse(textBox13.Text), Double.Parse(textBox14.Text),
                                           Double.Parse(textBox15.Text), Double.Parse(textBox16.Text), Double.Parse(textBox17.Text), Double.Parse(textBox18.Text), activo, checkBox1.Checked, usuario.ToString(), DateTime.Now.ToShortDateString());
                    button3.Text     = "Eliminar";
                    textBox1.Enabled = false;
                    button1.Enabled  = true;
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Ocurrio un error. " + ex.Message);
                }
                this.periodoTableAdapter.Fill(this.programa2DataSet.Periodo);

                dataGridView1_SelectionChanged(sender, e);
                imagen.fin_espere();
            }
        }