Esempio n. 1
0
 protected void GrdApContable_PageIndexChanged(object source, GridPageChangedEventArgs e)
 {
     try
     {
         GrdApContable.Rebind();
     }
     catch (Exception ex)
     {
         ErrorManager(ex, new System.Diagnostics.StackTrace().GetFrame(0).GetMethod().Name);
     }
 }
Esempio n. 2
0
        private void GuardarAplicacion()
        {
            try
            {
                if (this.CmbAc_Naturaleza.SelectedValue != "-1")
                {
                    if (this.TxtId_TmAc.Text != "")
                    {
                        Sesion            sesion = (Sesion)Session["Sesion" + Session.SessionID];
                        CN_CatMovimientos cn_mov = new CN_CatMovimientos();
                        Movimientos       mov    = new Movimientos();
                        int Verificador          = 0;
                        LlenarObjetoMovimientos(ref mov);

                        cn_mov.InsertarMovApContable(mov, ref Verificador, sesion);

                        if (Verificador == -1)
                        {
                            Alerta("Los datos se guardaron correctamente");
                            InicializarApCont();
                            GrdApContable.Rebind();
                        }
                        else if (Verificador == -2)
                        {
                            Alerta("Los datos se modificaron correctamente");
                            InicializarApCont();
                            GrdApContable.Rebind();
                        }
                        else
                        {
                            Alerta("Error insesperado al tratar de guardar");
                        }
                    }
                    else
                    {
                        this.RfvTxtId_TmAc.IsValid = false;
                    }
                }
                else
                {
                    this.RfvCmbAc_Nauraleza.IsValid = false;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 3
0
        private void Inicializar()
        {
            txtNumero.Text = Valor;
            CargarTipo();
            CargarNaturaleza();
            CargarInverso();
            CargarAfecta();
            CargarCentros();
            rgMovimiento.Rebind();
            GrdApContable.Rebind();

            trCobranza.Visible = rbCobranza.Checked;
            //chkIva.Visible = rbCobranza.Checked;
            //chkVenta.Visible = rbCobranza.Checked;

            trInventario.Visible = rbInventario.Checked;
            //chkOrden.Visible = rbInventario.Checked;
            //chkReqRef.Visible = rbInventario.Checked;
            trAfecta.Visible = rbInventario.Checked;
        }