예제 #1
0
        private void Btn_consultar_Click(object sender, EventArgs e)
        {
            if (presionado == false)
            {
                Desahiblitarbtn();
                Btn_consultar.Enabled = true;
                presionado            = true;
            }
            else
            {
                Frm_consultaGuiaT conBonos_Desc = new Frm_consultaGuiaT();
                conBonos_Desc.ShowDialog();

                if (conBonos_Desc.DialogResult == DialogResult.OK)
                {
                    Txt_idguia.Text = conBonos_Desc.Dgv_consultaBonoYDesc.Rows[conBonos_Desc.Dgv_consultaBonoYDesc.CurrentRow.Index].
                                      Cells[0].Value.ToString();

                    Txt_ruta.Text = conBonos_Desc.Dgv_consultaBonoYDesc.Rows[conBonos_Desc.Dgv_consultaBonoYDesc.CurrentRow.Index].
                                    Cells[1].Value.ToString();

                    Txt_descripcion.Text = conBonos_Desc.Dgv_consultaBonoYDesc.Rows[conBonos_Desc.Dgv_consultaBonoYDesc.CurrentRow.Index].
                                           Cells[2].Value.ToString();



                    Txt_idguia.Focus();
                    presionado = false;
                    Habilitarbtn();
                }
            }
        }
예제 #2
0
 private void Btn_borrar_Click(object sender, EventArgs e)
 {
     if (presionado == false)
     {
         Desahiblitarbtn();
         Btn_borrar.Enabled = true;
         presionado         = true;
     }
     else
     {
         Borrardatos();
         Txt_idguia.Focus();
         presionado = false;
         Deshabilitarcampos();
         Habilitarbtn();
         Limpiar();
     }
 }