private void MostrarRegistro()
        {
            try
            {
                DataTable dat = NacfRTRt_Reparotributario.Mostrar();

                //ACFdescripcion.Text= dat.Rows[0]["ACFdescripcion"].ToString();

                if (dat.Rows.Count > 0)
                {
                    DataRow row = dat.Rows[0];
                    txtRTRcodigo.Text      = Convert.ToString(row["RTRcodigo"]);
                    txtRTRperiodo.Text     = Convert.ToString(row["RTRperiodo"]);
                    dtRTRfecha.Text        = Convert.ToString(row["RTRfecha"]);
                    txtRTRresponsable.Text = Convert.ToString(row["RTRresponsable"]);
                    txtRTRestado.Checked   = Convert.ToBoolean(row["RTRestado"]);
                }
                else
                {
                    MessageBox.Show("No Existe", "Registro");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
        private void Next(String RTRcodigo)
        {
            try
            {
                DataTable dat = NacfRTRt_Reparotributario.Next(RTRcodigo);

                //ACFdescripcion.Text= dat.Rows[0]["ACFdescripcion"].ToString();

                if (dat.Rows.Count > 0)
                {
                    //guardo datos en variables
                    DataRow row = dat.Rows[0];
                    txtRTRcodigo.Text      = Convert.ToString(row["RTRcodigo"]);
                    txtRTRperiodo.Text     = Convert.ToString(row["RTRperiodo"]);
                    dtRTRfecha.Text        = Convert.ToString(row["RTRfecha"]);
                    txtRTRresponsable.Text = Convert.ToString(row["RTRresponsable"]);
                    txtRTRestado.Text      = Convert.ToString(row["RTRestado"]);
                }
                else
                {
                    MessageBox.Show("No Existe", "Registro");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
 private void Top()
 {
     try
     {
         DataTable dat = NacfRTRt_Reparotributario.Top();
         MostrarDatos(dat);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + ex.StackTrace);
     }
 }
Example #4
0
 private void buscarNombre()
 {
     if (this.txtBuscar.Text == "")
     {
         this.mostrar();
     }
     else
     {
         this.dataListado.DataSource = NacfRTRt_Reparotributario.Buscar(this.txtBuscar.Text);
         this.OcultarColumnas();
         lblTotal.Text = "Total de Registros: " + Convert.ToString(dataListado.Rows.Count);
     }
 }
Example #5
0
        //-----------------------------------------------------------------------------------
        // Actualiza Registros
        //-----------------------------------------------------------------------------------
        private void ActualizaRegistro()
        {
            string Rta = string.Empty;

            try
            {
                Rta = NacfRTRt_Reparotributario.Editar(this.txtRTRperiodo.Text, this.txtRTRfecha.Text, this.txtRTRresponsable.Text, this.cb1.Checked, this.txtRTRcodigo.Text);
                if (Rta.Equals("OK"))
                {
                    this.MensajeOk("Regsitro Actualizado Correctamente");
                }
                else
                {
                    this.MensajeError("Error al Actualizar Registro ");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
Example #6
0
        private void mostrar()
        {
            this.Configura();
            this.Activo = 1;
            this.tomaTab();
            this.Botones(true);
            this.dataListado.DataSource = NacfRTRt_Reparotributario.Mostrar();

            lblTotal.Text = "Total de Registros: " + Convert.ToString(dataListado.Rows.Count);
            if (dataListado.Rows.Count == 0)
            {
                BotonesSinReg(false);
            }
            else
            {
                BotonesSinReg(true);
                this.toolStripAgregar.Enabled = true;
            }
            this.dataListado.Select();
            this.dataListado.Focus();
        }
Example #7
0
        //-----------------------------------------------------------------------------------
        // Elimina Registros
        //-----------------------------------------------------------------------------------
        private void borrauno()
        {
            string       Rta = string.Empty;
            DialogResult Opcion;

            Opcion = MessageBox.Show("Realmente Desea Eliminar los Registros", "Sistema de escolar", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
            if (Opcion == DialogResult.OK)
            {
                string Codigo;
                Codigo = Convert.ToString(this.dataListado.CurrentRow.Cells[5].Value);
                Rta    = NacfRTRt_Reparotributario.Eliminar(Codigo);

                if (Rta.Equals("OK"))
                {
                    this.MensajeOk("Se EliminĂ³ Correctamente el registro");
                }
                else
                {
                    this.MensajeError("Error al Eliminar el Registro ");
                }
            }
        }
Example #8
0
        private void borramuchos()
        {
            try
            {
                DialogResult Opcion;
                Opcion = MessageBox.Show("Realmente Desea Eliminar los Registros", "Sistema de escolar", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);

                if (Opcion == DialogResult.OK)
                {
                    string Codigo;
                    string Rta = string.Empty;

                    foreach (DataGridViewRow row in dataListado.Rows)
                    {
                        if (Convert.ToBoolean(row.Cells[0].Value))
                        {
                            Codigo = Convert.ToString(row.Cells[1].Value);
                            Rta    = NacfRTRt_Reparotributario.Eliminar(Codigo);

                            if (Rta.Equals("OK"))
                            {
                                this.MensajeOk("Se EliminĂ³ Correctamente el registro");
                            }
                            else
                            {
                                this.MensajeError("Error al Eliminar el Registro ...");
                            }
                        }
                    }
                    this.mostrar();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
        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();
            }
        }
        //-----------------------------------------------------------------------------------
        // Actualiza Registros
        //-----------------------------------------------------------------------------------
        private void ActualizaRegistro()
        {
            string Rta = string.Empty;

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

                //Rta = NacfACFp_Activo_Fijo.Editar("1", "1", "1", "1", "1", "1", "2", DateTime.Today.ToString(), "1", this.txtACFdescripcion.Text, DateTime.Today.ToString(), DateTime.Today.ToString(), "0", "0", "0.00", "0", "0", "0", "", "0", "", "", "", "", "", "", "0.00", "0.00", "", "", "1", "", "1", "", "", "", DateTime.Today.ToString(), "1", "", "1", "1", "1", DateTime.Today.ToString(), "1");

                if (Rta.Equals("OK"))
                {
                    this.MensajeOk("Regsitro Editado Correctamente");
                }
                else
                {
                    this.MensajeError("Error al Actualizar Registro " + Rta);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
Example #11
0
        private void BotonImprimir()
        {
            FrmReportes rptalu = new FrmReportes("Reportes\\Rpt_RTRReparoTributario.rdlc", NacfRTRt_Reparotributario.Mostrar(), "ip");

            rptalu.ShowDialog();
        }