private void grabarseleACF()
        {
            try
            {
                //falta mostrar el ACFid
                Int32 total = 0;
                foreach (DataGridViewRow row in dataListado.Rows)
                {
                    string Rta = string.Empty;

                    if (Convert.ToBoolean(row.Cells[0].Value))
                    {
                        Rta = NacfDRTt_detallereparotributario.Insertar2(
                            Convert.ToString(row.Cells[1].Value),  //ACFCuenta
                            Convert.ToString(row.Cells[3].Value),  //ACFid
                            Convert.ToString(row.Cells[4].Value),  //ACFdescripcion
                            Convert.ToString(row.Cells[5].Value),  //ACFfactorniif
                            Convert.ToString(row.Cells[6].Value),  //ACFvutilniif
                            Convert.ToString(row.Cells[7].Value),  //ACFfactortriub
                            Convert.ToString(row.Cells[8].Value),  //ACFvutiltrib
                            Convert.ToString(row.Cells[9].Value),  //ACFvutiltrib
                            Convert.ToString(row.Cells[10].Value), //VNRid

                            Convert.ToString(row.Cells[12].Value), //ACFfincorporacion
                            Convert.ToString(row.Cells[13].Value), //ACFvutiltrib
                            Convert.ToString(row.Cells[14].Value), //ACFvutiltribanio

                            Convert.ToString(row.Cells[16].Value)  //ACFvutiltrib


                            );

                        if (Rta.Equals("OK"))
                        {
                            // MessageBox.Show("Datos agregados");
                        }
                        else
                        {
                            //MessageBox.Show("Datos No Agregados");
                            break;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
        private void mostrar()
        {
            this.datalistado1.DataSource = NacfDRTt_detallereparotributario.Buscar(txtRTRcodigo.Text);

            /* if (datalistado.Rows.Count == 0)
             * {
             *   BotonesSinReg(false);
             * }
             * else
             * {
             *   BotonesSinReg(true);
             *   this.toolStripAgregar.Enabled = true;
             *
             * }
             * this.datalistado.Select();
             * this.datalistado.Focus();*/
        }
        private void InsertaRegistro()
        {
            string Rta = string.Empty;

            try
            {
                Rta = NacfRTRt_Reparotributario.Insertar(this.txtRTRperiodo.Text, this.dtRTRfecha.Text, this.txtRTRresponsable.Text, this.txtRTRestado.Checked, this.txtRTRcodigo.Text);

                if (Rta.Equals("OK"))
                {
                    this.MensajeOk("Registro Agregado Correctamente");
                }
                else
                {
                    this.MensajeError(Rta);
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }



            if (checkBox1.Checked == true && checkBox2.Checked == false)
            {
                Form Frm_Excel_Reparo = new Frm_Excel_Reparo();
                Frm_Excel_Reparo.ShowDialog();
            }
            if (checkBox2.Checked == true && checkBox1.Checked == false)
            {
                NacfDRTt_detallereparotributario.Copiar(txtRTRcodigo.Text);
                mostrar();
            }
        }
 private void PrevDataGRid(String RTRcodigo)
 {
     this.datalistado1.DataSource = NacfDRTt_detallereparotributario.Buscar(RTRcodigo);
 }
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            FrmReportes rptalu = new FrmReportes("Reportes\\Rpt_Reparo_Tributario.rdlc", NacfDRTt_detallereparotributario.Reporte(txtRTRcodigo.Text), "ip");

            rptalu.ShowDialog();
        }