示例#1
0
        private void TraerInformacionDelRegistro()
        {
            try
            {
                ConfiguracionEN oRegistroEN = new ConfiguracionEN();
                ConfiguracionLN oRegistroLN = new ConfiguracionLN();

                oRegistroEN.IdConfiguracion = IdConfiguracion;

                if (oRegistroLN.ListadoPorIdentificador(oRegistroEN, Program.oDatosDeConexion))
                {
                    DataRow Fila = oRegistroLN.TraerDatos().Rows[0];

                    txtRutaRespaldosBD.Text = Fila["RutaRespaldos"].ToString();
                    txtRutaExportacionArchivosExcel.Text = Fila["RutaRespaldosDeExcel"].ToString();
                    txtNivelesDeLaCuentas.Text           = Fila["NivelesDeLaCuenta"].ToString();
                    txtMysqlDump.Text = Fila["PathMysSQLDump"].ToString();
                    txtPathMySQL.Text = Fila["PathMySQL"].ToString();
                    txtCuentaPrincipalDeBanco.Text         = Fila["CuentaPrincipalDeBanco"].ToString();
                    txtNombreDelSistema.Text               = Fila["NombreDelSistema"].ToString();
                    txtUtilidadOPerdidaDelEjercicio.Text   = Fila["UtilidadOPerdidaDelEjercicio"].ToString();
                    txtTiempoDeRespaldo.Text               = Fila["TiempoDeRespaldo"].ToString();
                    txtCuentaQueSeVaOcultarNivel.Text      = Fila["CuentaQueSeVaOcultarNivel"].ToString();
                    cmbNivelDeLaCuentaAOcultar.Text        = Fila["NivelDeLaCuentaAOcultar"].ToString();
                    txtCuentaQueSeVaAMostrar.Text          = Fila["CuentaQueSeVaAMostrar"].ToString();
                    cmbNivelDelaCuentaQueSeVaAMostrar.Text = Fila["NivelDelaCuentaQueSeVaAMostrar"].ToString();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(string.Format("Error: {0} ", ex.Message), "Traer información del Registro", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void CargarInformacionDeLaConfiguracion()
        {
            try
            {
                ConfiguracionEN oRegistroEN = new ConfiguracionEN();
                ConfiguracionLN oRegistroLN = new ConfiguracionLN();

                oRegistroEN.IdConfiguracion = 1;

                if (oRegistroLN.ListadoPorIdentificador(oRegistroEN, Program.oDatosDeConexion))
                {
                    DataRow Fila = oRegistroLN.TraerDatos().Rows[0];

                    Program.oConfiguracionEN.RutaRespaldos        = Fila["RutaRespaldos"].ToString();
                    Program.oConfiguracionEN.RutaRespaldosDeExcel = Fila["RutaRespaldosDeExcel"].ToString();
                    Program.oConfiguracionEN.PathMysSQLDump       = Fila["PathMysSQLDump"].ToString();
                    Program.oConfiguracionEN.PathMySQL            = Fila["PathMySQL"].ToString();
                    Program.oConfiguracionEN.NombreDelSistema     = Fila["NombreDelSistema"].ToString();
                    Program.oConfiguracionEN.TiempoDeRespaldo     = Convert.ToInt32(Fila["TiempoDeRespaldo"].ToString());
                    Program.oConfiguracionEN.PrecioPorDefecto     = Convert.ToInt32(Fila["PrecioPorDefecto"].ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(string.Format("Error: {0} ", ex.Message), "Traer información del Registro", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#3
0
        private void CargarInformacionDeLaConfiguracion()
        {
            try
            {
                ConfiguracionEN oRegistroEN = new ConfiguracionEN();
                ConfiguracionLN oRegistroLN = new ConfiguracionLN();

                oRegistroEN.IdConfiguracion = 1;

                if (oRegistroLN.ListadoPorIdentificador(oRegistroEN, Program.oDatosDeConexion))
                {
                    DataRow Fila = oRegistroLN.TraerDatos().Rows[0];

                    Program.oConfiguracionEN.RutaRespaldos                  = Fila["RutaRespaldos"].ToString();
                    Program.oConfiguracionEN.RutaRespaldosDeExcel           = Fila["RutaRespaldosDeExcel"].ToString();
                    Program.oConfiguracionEN.NivelesDeLaCuenta              = Convert.ToInt32(Fila["NivelesDeLaCuenta"].ToString());
                    Program.oConfiguracionEN.PathMysSQLDump                 = Fila["PathMysSQLDump"].ToString();
                    Program.oConfiguracionEN.PathMySQL                      = Fila["PathMySQL"].ToString();
                    Program.oConfiguracionEN.CuentaPrincipalDeBanco         = Fila["CuentaPrincipalDeBanco"].ToString();
                    Program.oConfiguracionEN.NombreDelSistema               = Fila["NombreDelSistema"].ToString();
                    Program.oConfiguracionEN.UtilidadOPerdidaDelEjercicio   = Fila["UtilidadOPerdidaDelEjercicio"].ToString();
                    Program.oConfiguracionEN.TiempoDeRespaldo               = Convert.ToInt32(Fila["TiempoDeRespaldo"].ToString());
                    Program.oConfiguracionEN.NivelDeLaCuentaAOcultar        = Convert.ToInt32(Fila["NivelDeLaCuentaAOcultar"].ToString());
                    Program.oConfiguracionEN.CuentaQueSeVaOcultarNivel      = Fila["CuentaQueSeVaOcultarNivel"].ToString();
                    Program.oConfiguracionEN.CuentaQueSeVaAMostrar          = Fila["CuentaQueSeVaAMostrar"].ToString();
                    Program.oConfiguracionEN.NivelDelaCuentaQueSeVaAMostrar = Convert.ToInt32(Fila["NivelDelaCuentaQueSeVaAMostrar"].ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(string.Format("Error: {0} ", ex.Message), "Traer información del Registro", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#4
0
        private void cmdGuardar_Click(object sender, EventArgs e)
        {
            try
            {
                if (EvaluarSiHayRegistro())
                {
                    return;
                }

                ConfiguracionEN oRegistroEN = InformacionDelRegistro();
                ConfiguracionLN oRegistroLN = new ConfiguracionLN();

                if (oRegistroLN.Actualizar(oRegistroEN, Program.oDatosDeConexion))
                {
                    MessageBox.Show("Registro actualizado correctamente", "Guardar inforamción del registro", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    CargarInformacionDeLaConfiguracion();
                }
                else
                {
                    throw new ArgumentException(oRegistroLN.Error);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Guardar Información del registro", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#5
0
        protected void gvTipoLinea_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName.Equals("Editar"))
            {
                OidConfiguracion  = Convert.ToInt32(HttpUtility.HtmlDecode(gvTipoLinea.Rows[Convert.ToInt32(e.CommandArgument)].Cells[2].Text));
                lbTLEditando.Text = HttpUtility.HtmlDecode(gvTipoLinea.Rows[Convert.ToInt32(e.CommandArgument)].Cells[5].Text);
                llenarGrillaCampos();
            }
            else if (e.CommandName.Equals("Eliminar"))
            {
                Configuracion objCfg = new Configuracion();
                objCfg.pOid = Convert.ToInt32(HttpUtility.HtmlDecode(gvTipoLinea.Rows[Convert.ToInt32(e.CommandArgument)].Cells[2].Text));
                campos      = (Convert.ToString(HttpUtility.HtmlDecode(this.gvTipoLinea.Rows[Convert.ToInt32(e.CommandArgument)].Cells[5].Text)));
                int valor = new ConfiguracionLN().borrar(objCfg);

                if (valor == 0)
                {
                    llenarLineasDisponibles();
                    UtilidadesWeb.ajustarMensaje(lbEstado, "Se eliminó la línea exitosamente!", TipoMensaje.Informacion);
                    Log(3, 1);
                    campos = string.Empty;
                }
                else
                {
                    UtilidadesWeb.ajustarMensaje(lbEstado, "No fue posible eliminar la línea, puede que tenga campos asociados!!!", TipoMensaje.Error);
                }
            }
        }
示例#6
0
        private void TraerInformacionDelRegistro()
        {
            try
            {
                ConfiguracionEN oRegistroEN = new ConfiguracionEN();
                ConfiguracionLN oRegistroLN = new ConfiguracionLN();

                oRegistroEN.IdConfiguracion = IdConfiguracion;

                if (oRegistroLN.ListadoPorIdentificador(oRegistroEN, Program.oDatosDeConexion))
                {
                    DataRow Fila = oRegistroLN.TraerDatos().Rows[0];

                    txtRutaRespaldosBD.Text = Fila["RutaRespaldos"].ToString();
                    txtRutaExportacionArchivosExcel.Text = Fila["RutaRespaldosDeExcel"].ToString();
                    txtMysqlDump.Text        = Fila["PathMysSQLDump"].ToString();
                    txtPathMySQL.Text        = Fila["PathMySQL"].ToString();
                    txtNombreDelSistema.Text = Fila["NombreDelSistema"].ToString();
                    txtTiempoDeRespaldo.Text = Fila["TiempoDeRespaldo"].ToString();
                    cmbPrecioPorDefecto.Text = string.Format("Precio ", Fila["PrecioPorDefecto"].ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(string.Format("Error: {0} ", ex.Message), "Traer información del Registro", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        public JsonResult CargaRolPermisos(int nRolId)
        {
            ConfiguracionLN oConfigLN = new ConfiguracionLN();
            Rol             lstRol    = new Rol();

            lstRol = oConfigLN.CargaRolPermisos(nRolId);
            return(Json(JsonConvert.SerializeObject(lstRol)));
        }
        public JsonResult EliminarRol(int nRolId)
        {
            int             nReg   = 0;
            ConfiguracionLN ConfLN = new ConfiguracionLN();

            nReg = ConfLN.EliminarRol(nRolId);

            return(Json(nReg));
        }
示例#9
0
        private int insertarConfiguracion()
        {
            int           valor  = 0;
            Configuracion objCfg = new Configuracion();

            objCfg.pArchivoPlano = OidArchivo;
            objCfg.pTipoLinea    = ddlTipoLinea.SelectedValue;
            ConfiguracionLN objCfgLN = new ConfiguracionLN();

            valor = objCfgLN.insertarCfgArchivoPlano(objCfg);
            return(valor);
        }
示例#10
0
        private int insertarConfiguracion()
        {
            int valor = 0;

            Configuracion objCfg = new Configuracion();

            objCfg.pArchivoAsobancaria = OidArchivoAsobancaria;
            objCfg.pTipoLinea          = ddlTipoLinea.SelectedValue;
            campos = this.ddlTipoLinea.SelectedItem.Text;
            ConfiguracionLN objCfgLN = new ConfiguracionLN();

            valor = objCfgLN.insertarCfgAsobancaria(objCfg);

            return(valor);
        }
        public JsonResult RegistrarRolPermisos(string oJsonRol)
        {
            int             nReg   = 0;
            ConfiguracionLN ConfLN = new ConfiguracionLN();

            Rol lstRol = JsonConvert.DeserializeObject <Rol>(oJsonRol);

            if (lstRol.nRolId != Constantes.Rol_Administrador)
            {
                nReg = ConfLN.RegistrarActualizarRolPermisos(lstRol);
            }
            else
            {
                nReg = -1;
            }

            return(Json(nReg));
        }