Example #1
0
        /// <summary>
        /// Obtiene todos los Documentos segun parametros
        /// </summary>
        /// <param name="pTipoDoc"></param>
        /// <returns></returns>
        public ArrayList Listar(int pCodigoTipoDocumento)
        {
            DAABRequest.Parameter[] arrParam = { new DAABRequest.Parameter("P_ID_TIPO_DOCUMENTO", DbType.Int32,  ParameterDirection.Input),
                                                 new DAABRequest.Parameter("P_DOCUMENTO",         DbType.Object, ParameterDirection.Output) };

            for (int i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            arrParam[0].Value = pCodigoTipoDocumento;
            //--
            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.PKG_SISACT_ACUERDO + ".DOCUMENTO_LISTAR";
            obRequest.Parameters.AddRange(arrParam);

            ArrayList   filas = new ArrayList();
            IDataReader dr    = null;

            try
            {
                dr = obRequest.Factory.ExecuteReader(ref obRequest).ReturnDataReader;
                while (dr.Read())
                {
                    Documento item = new Documento();
                    item.CODIGO = Funciones.CheckInt(dr["ID_DOCUMENTO"]);
                    item.NOMBRE = Funciones.CheckStr(dr["NOMBRE"]);

                    filas.Add(item);
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                if (dr != null && dr.IsClosed == false)
                {
                    dr.Close();
                }
                obRequest.Parameters.Clear();
                obRequest.Factory.Dispose();
            }
            return(filas);
        }
Example #2
0
        //ldrz
        public bool EliminarPaquete3Play(string P_PRDC_CODIGO, string P_PAQTV_CODIGO, string P_USUARIO_CREA)
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_PRDC_CODIGO",  DbType.String,  5, ParameterDirection.Input),
                new DAABRequest.Parameter("P_PAQTV_CODIGO", DbType.String,  5, ParameterDirection.Input),
                new DAABRequest.Parameter("P_USUARIO_CREA", DbType.String, 10, ParameterDirection.Input),
                new DAABRequest.Parameter("K_RESULTADO",    DbType.Int32,  ParameterDirection.Output)
            };

            int i = 0;

            for (i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            arrParam[0].Value = P_PRDC_CODIGO;
            arrParam[1].Value = P_PAQTV_CODIGO;
            arrParam[2].Value = P_USUARIO_CREA;

            bool     salida    = false;
            BDSISACT oBDSISACT = new BDSISACT(BaseDatos.BD_SISACT);

            DAABRequest obRequest = oBDSISACT.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.PKG_SISACT_MANTENIMIENTO_3PLAY + ".SISACT_DEL_PAQUETE_3PLAY";
            obRequest.Parameters.AddRange(arrParam);
            obRequest.Transactional = true;

            try
            {
                obRequest.Factory.ExecuteNonQuery(ref obRequest);
                obRequest.Factory.CommitTransaction();
                salida = true;
            }
            catch (Exception ex)
            {
                obRequest.Factory.RollBackTransaction();
                string rMsg = "Error al Eliminar en Paquete 3Play. \nMensaje : " + ex.Message;
                throw ex;
            }
            finally
            {
                obRequest.Factory.Dispose();
            }
            return(salida);
        }
Example #3
0
        public int InsertarActualizaDatosNivelesAprobacionXtipo(string strPerfilVin, string strTipo, string strEstado, string strPerfilDesc, string strCantidad, string strUsuario, ref string codError, ref string msgError)
        {
            DAABRequest.Parameter[] arrParam = { new DAABRequest.Parameter("K_NAN_PERFIL_VINCULADO", DbType.String, ParameterDirection.Input),
                                                 new DAABRequest.Parameter("K_NAC_TIPO",             DbType.String, ParameterDirection.Input),
                                                 new DAABRequest.Parameter("K_NAC_ESTADO",           DbType.String, ParameterDirection.Input),
                                                 new DAABRequest.Parameter("K_NAV_PERFIL_DESC",      DbType.String, ParameterDirection.Input),
                                                 new DAABRequest.Parameter("K_NAC_CANTIDAD",         DbType.Int32,  ParameterDirection.Input),
                                                 new DAABRequest.Parameter("K_NAV_USUAC_MODI",       DbType.String, ParameterDirection.Input),
                                                 new DAABRequest.Parameter("P_CODIGO_RESPUESTA",     DbType.String, ParameterDirection.Output),
                                                 new DAABRequest.Parameter("P_MENSAJE_RESPUESTA",    DbType.String, ParameterDirection.Output), };

            arrParam[0].Value = strPerfilVin;
            arrParam[1].Value = strTipo;
            arrParam[2].Value = strEstado;
            arrParam[3].Value = strPerfilDesc;
            arrParam[4].Value = strCantidad;
            arrParam[5].Value = strUsuario;


            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.Parameters.Clear();
            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.SISACT_PKG_MANT_LIMITE_AUT + ".sisactsi_niv_autorizacion";
            obRequest.Parameters.AddRange(arrParam);
            obRequest.Transactional = true;


            try
            {
                obRequest.Factory.ExecuteNonQuery(ref obRequest);
                obRequest.Factory.CommitTransaction();
                codError = Funciones.CheckStr(((IDataParameter)obRequest.Parameters[6]).Value);
                msgError = Funciones.CheckStr(((IDataParameter)obRequest.Parameters[7]).Value);
            }
            catch (Exception ex)
            {
                codError = "-9";
                msgError = "Error oracle. Consultar administrador.";
                obRequest.Factory.RollBackTransaction();
            }
            finally
            {
                obRequest.Factory.Dispose();
            }
            return(0);
        }
Example #4
0
        public void ConsultarDatosDireccion(string idDepartamento, string idProvincia, string idDistrito,
                                            ref string strDepartamento, ref string strProvincia, ref string strDistrito)
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_CUR_DIR",      DbType.Object, ParameterDirection.Output),
                new DAABRequest.Parameter("P_DEPARTAMENTO", DbType.String,                          4,ParameterDirection.Input),
                new DAABRequest.Parameter("P_PROVINCIA",    DbType.String,                          4,ParameterDirection.Input),
                new DAABRequest.Parameter("P_DISTRITO",     DbType.String,                          4,ParameterDirection.Input)
            };

            arrParam[1].Value = idDepartamento;
            arrParam[2].Value = idProvincia;
            arrParam[3].Value = idDistrito;

            BDSISACT    obj        = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest objRequest = obj.CreaRequest();

            objRequest.CommandType = CommandType.StoredProcedure;
            objRequest.Command     = BaseDatos.PKG_SISACT_CONSULTA_BRMS + ".SP_CON_DATOS_DISTRITO";
            objRequest.Parameters.AddRange(arrParam);

            IDataReader dr = null;

            try
            {
                dr = objRequest.Factory.ExecuteReader(ref objRequest).ReturnDataReader;
                while (dr.Read())
                {
                    strDepartamento = Funciones.CheckStr(dr["DEPAV_DESCRIPCION"]);
                    strProvincia    = Funciones.CheckStr(dr["PROVV_DESCRIPCION"]);
                    strDistrito     = Funciones.CheckStr(dr["DISTV_DESCRIPCION"]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (dr != null && dr.IsClosed == false)
                {
                    dr.Close();
                }
                objRequest.Parameters.Clear();
                objRequest.Factory.Dispose();
            }
        }
Example #5
0
        public ArrayList ListarNivelesDeAprobacionMeses(string v_tipo)
        {
            DataTable dtResultado = new DataTable();

            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("V_NAC_TIPO", DbType.String, ParameterDirection.Input),
                new DAABRequest.Parameter("cv_1",       DbType.Object, ParameterDirection.Output)
            };

            arrParam[0].Value = v_tipo;

            IDataReader dr    = null;
            ArrayList   lista = new ArrayList();

            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.Parameters.Clear();
            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.SISACT_PKG_MANT_LIMITE_AUT + ".SISACTSS_NIV_APROB_X_TIPO";
            obRequest.Parameters.AddRange(arrParam);
            try
            {
                dr = obRequest.Factory.ExecuteReader(ref obRequest).ReturnDataReader;

                NivelAprobacion item;

                while (dr.Read())
                {
                    item = new NivelAprobacion();

                    item.CODIGO     = Funciones.CheckStr(dr["NAN_PERFIL_VINCULADO"]);
                    item.ESTADO     = Funciones.CheckStr(dr["NAC_ESTADO"]);
                    item.CANAL      = Funciones.CheckStr(dr["NAV_PERFIL_DESC"]);
                    item.DIASMINIMO = Funciones.CheckStr(dr["NAC_CANTIDAD"]);
                    lista.Add(item);
                }
            }
            catch (Exception)
            {
            }
            finally
            {
                obRequest.Factory.Dispose();
            }
            return(lista);
        }
Example #6
0
        /// <summary>
        /// Recupera el Nombre de archivo digitalizado de un Documento SEC
        /// </summary>
        /// <param name="pIDDOcumentoSEC"></param>
        /// <returns></returns>
        public string ObtenerNombreArchivo(long pIDDOcumentoSEC)
        {
            //--inicializa dato a  devolver
            string strNombreArchivo = "";

            //--define parametros
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_ID_DOCUMENTO_SEC", DbType.Int64,  ParameterDirection.Input),
                new DAABRequest.Parameter("P_NOMBRE_ARCHIVO",   DbType.String, ParameterDirection.Output)
            };
            int i;

            for (i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            if (!pIDDOcumentoSEC.Equals(-1))
            {
                arrParam[0].Value = pIDDOcumentoSEC;
            }

            BDSISACT    obj        = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest objRequest = obj.CreaRequest();

            objRequest.CommandType = CommandType.StoredProcedure;
            objRequest.Command     = BaseDatos.PKG_SISACT_ACUERDO + ".DOCUMENTO_SEC_DeterminaArchivo";
            objRequest.Parameters.AddRange(arrParam);

            try
            {
                Funciones.CheckStr(objRequest.Factory.ExecuteScalar(ref objRequest));
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                IDataParameter parSalida1;
                parSalida1       = (IDataParameter)objRequest.Parameters[1];
                strNombreArchivo = Funciones.CheckStr(parSalida1.Value);
                objRequest.Factory.Dispose();
                objRequest.Parameters.Clear();
            }
            return(strNombreArchivo);
        }
Example #7
0
        public string ObtenerRUC_Asociado(long pCOD_SEC)
        {
            //--inicializa dato a  devolver
            string sRUC;

            //--define parametros
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_COD_SEC", DbType.Int64,  ParameterDirection.Input),
                new DAABRequest.Parameter("P_RUC",     DbType.String, ParameterDirection.Output)
            };
            for (int i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            if (pCOD_SEC > 0)
            {
                arrParam[0].Value = pCOD_SEC;
            }

            BDSISACT    obj        = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest objRequest = obj.CreaRequest();

            objRequest.CommandType = CommandType.StoredProcedure;
            objRequest.Command     = BaseDatos.PKG_SISACT_ACUERDO + ".CLIENTE_Obt_RUC_Asociado";
            objRequest.Parameters.AddRange(arrParam);

            try
            {
                Funciones.CheckInt(objRequest.Factory.ExecuteScalar(ref objRequest));
                //---
                IDataParameter parSalida1;
                parSalida1 = (IDataParameter)objRequest.Parameters[1];
                sRUC       = Funciones.CheckStr(parSalida1.Value);
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                objRequest.Factory.Dispose();
                objRequest.Parameters.Clear();
            }
            //---
            return(sRUC);
        }
Example #8
0
//		public void ConsultaCierreCajaPVU(string pFecha,string pUsuario, string poficina, out string CierreReal)
//		{
//			DAABRequest.Parameter[] arrParam =
//				{
//					new DAABRequest.Parameter("P_FECHA", DbType.String, ParameterDirection.Input),
//					new DAABRequest.Parameter("P_USUARIO", DbType.String, ParameterDirection.Input),
//				    new DAABRequest.Parameter("P_OFICINA", DbType.String, ParameterDirection.Input),
//					new DAABRequest.Parameter("C_DATOS", DbType.Object, ParameterDirection.Output) };
//			int i = 0;
//			for (i=0; i < arrParam.Length; i++)
//				arrParam[i].Value = DBNull.Value;
//
//			arrParam[0].Value = pFecha;
//			arrParam[1].Value = pUsuario;
//			arrParam[2].Value = poficina;
//
//			BDSICAR obj = new BDSICAR(BaseDatos.BD_SICAR);
//			DAABRequest obRequest = obj.CreaRequest();
//			obRequest.CommandType = CommandType.StoredProcedure;
//			obRequest.Command = BaseDatos.PCK_SICAR_OFF_SAP + ".MIG_ObtenerCajaAsignada";
//			obRequest.Parameters.AddRange(arrParam);
//			CierreReal = "";
//			ItemGenerico item = new ItemGenerico();
//			IDataReader dr = null;
//			try
//			{
//				dr = obRequest.Factory.ExecuteReader(ref obRequest).ReturnDataReader;
//				if (dr != null)
//				{
//					while (dr.Read())
//					{
//						item.Codigo = Funciones.CheckStr(dr["CAJA_CERRADA"]);
//					}
//					CierreReal =item.Codigo;
//				}
//			}
//			catch (Exception ex)
//			{
//				throw (ex);
//			}
//			finally
//			{
//				if (dr != null && dr.IsClosed == false)
//					dr.Close();
//				obRequest.Parameters.Clear();
//				obRequest.Factory.Dispose();
//			}
//		}

        public ArrayList ConsultaEquiposAlternativos()
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_RESULT_SET", DbType.Object, ParameterDirection.Output)
            };

            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.PKG_MATERIAL_LISTA + ".SSAPSS_MATERIAL_LISTA_T";
            obRequest.Parameters.AddRange(arrParam);


            ArrayList filas = new ArrayList();

            IDataReader dr = null;

            try
            {
                dr = obRequest.Factory.ExecuteReader(ref obRequest).ReturnDataReader;
                if (dr != null)
                {
                    while (dr.Read())
                    {
                        ItemGenerico item = new ItemGenerico();
                        item.Codigo      = Funciones.CheckStr(dr["MATEC_CODMATERIAL"]);
                        item.Descripcion = Funciones.CheckStr(dr["MATEV_DESCMATERIAL"]);
                        filas.Add(item);
                    }
                }
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (dr != null && dr.IsClosed == false)
                {
                    dr.Close();
                }
                obRequest.Parameters.Clear();
                obRequest.Factory.Dispose();
            }
            return(filas);
        }
Example #9
0
        public int Manten_Periodo_Renov(int Cantidad, int Periodo)
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_RESULTADO", DbType.Int32, ParameterDirection.Output),
                new DAABRequest.Parameter("P_CANTIDAD",  DbType.Int32, ParameterDirection.Input),
                new DAABRequest.Parameter("P_PERIODO",   DbType.Int32, ParameterDirection.Input)
            };

            int i = 0;

            for (i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            arrParam[0].Value = 0;
            arrParam[1].Value = Cantidad;
            arrParam[2].Value = Periodo;

            int salida;

            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.PKG_SISACT_MANT_PLN + ".SISACT_MANT_PERIODO_RENOV";
            obRequest.Parameters.AddRange(arrParam);
            obRequest.Transactional = true;
            try
            {
                obRequest.Factory.ExecuteNonQuery(ref obRequest);
                IDataParameter parSalida1;
                parSalida1 = (IDataParameter)obRequest.Parameters[0];
                salida     = Funciones.CheckInt16(parSalida1.Value);
            }
            catch (Exception ex)
            {
                obRequest.Factory.RollBackTransaction();
                throw ex;
            }
            finally
            {
                obRequest.Parameters.Clear();
                obRequest.Factory.Dispose();
            }
            return(salida);
        }
Example #10
0
        public ArrayList ConsultarDetalleDecoxKIT(string idKIT)
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_CUR_EQUIPO", DbType.Object, ParameterDirection.Output),
                new DAABRequest.Parameter("P_KIT",        DbType.Int64,  ParameterDirection.Input)
            }

            ;
            arrParam[1].Value = idKIT;

            BDSISACT    obj        = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest objRequest = obj.CreaRequest();

            objRequest.CommandType = CommandType.StoredProcedure;
            objRequest.Command     = BaseDatos.PKG_SISACT_CONSULTA_BRMS + ".SP_CON_EQUIPO_DECO_KIT";
            objRequest.Parameters.AddRange(arrParam);

            ArrayList   objLista = new ArrayList();
            EquipoBRMS  objItem;
            IDataReader dr = null;

            try
            {
                dr = objRequest.Factory.ExecuteReader(ref objRequest).ReturnDataReader;
                while (dr.Read())
                {
                    objItem            = new EquipoBRMS();
                    objItem.kit        = Funciones.CheckStr(dr["KITV_DESCRIPCION"]);
                    objItem.modelo     = Funciones.CheckStr(dr["MATV_DESCRIPCION"]);
                    objItem.tipoDeDeco = Funciones.CheckStr(dr["TIPO_DECO"]);
                    objLista.Add(objItem);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (dr != null && dr.IsClosed == false)
                {
                    dr.Close();
                }
                objRequest.Factory.Dispose();
            }
            return(objLista);
        }
Example #11
0
        public bool InsertarPlanEqui3Play(PlanServ3Play oPlanServ3Play)
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_RESULTADO",   DbType.Int32,  ParameterDirection.Output),
                new DAABRequest.Parameter("P_PLNV_CODIGO", DbType.String,                          4,ParameterDirection.Input),
                new DAABRequest.Parameter("P_CADENA",      DbType.String,                       4000,ParameterDirection.Input)
            };

            int i = 0;

            for (i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            arrParam[1].Value = oPlanServ3Play.PLNV_CODIGO;
            arrParam[2].Value = oPlanServ3Play.SERVV_CODIGO;

            bool     salida    = false;
            BDSISACT oBDSISACT = new BDSISACT(BaseDatos.BD_SISACT);

            DAABRequest obRequest = oBDSISACT.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.PKG_SISACT_MANTENIMIENTO_3PLAY + ".MANTSS_INS_MATERIAL3P_X_PLAN";
            obRequest.Parameters.AddRange(arrParam);
            obRequest.Transactional = true;

            try
            {
                obRequest.Factory.ExecuteNonQuery(ref obRequest);
                obRequest.Factory.CommitTransaction();
                salida = true;
            }
            catch (Exception ex)
            {
                obRequest.Factory.RollBackTransaction();
                string rMsg = "Error al Insertar en Plan Equipo 3Play. \nMensaje : " + ex.Message;
                throw ex;
            }
            finally
            {
                obRequest.Factory.Dispose();
            }
            return(salida);
        }
Example #12
0
        //**************************************** INICIO WHZR ****************************************************

        public string ListarOpcionVas(int intCodigoVas)
        {
            string strOpcionVas = "";

            DAABRequest.Parameter[] arrParam = { new DAABRequest.Parameter("P_CODIGO_VAS", DbType.Int32,  ParameterDirection.Input),
                                                 new DAABRequest.Parameter("P_CURSOR",     DbType.Object, ParameterDirection.Output) };
            for (int i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            arrParam[0].Value = intCodigoVas;

            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.PKG_SISACT_SERVICIO_VAS + ".SISACT_OPCION_VAS";
            obRequest.Parameters.AddRange(arrParam);

            ArrayList   filas = new ArrayList();
            IDataReader dr    = null;

            try
            {
                dr = obRequest.Factory.ExecuteReader(ref obRequest).ReturnDataReader;
                while (dr.Read())
                {
                    //ServicioVas itm = new ServicioVas();
                    strOpcionVas = Funciones.CheckStr(dr["VPAQV_NOM_OPCION"]);
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                if (dr != null && dr.IsClosed == false)
                {
                    dr.Close();
                }
                obRequest.Parameters.Clear();
                obRequest.Factory.Dispose();
            }
            return(strOpcionVas);
        }
Example #13
0
        public ArrayList ListarParametroGeneral(string strCodigo)
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_CODIGO", DbType.String, ParameterDirection.Input),
                new DAABRequest.Parameter("P_CURSOR", DbType.Object, ParameterDirection.Output)
            };
            arrParam[0].Value = strCodigo;

            BDSISACT    obj        = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest objRequest = obj.CreaRequest();

            objRequest.CommandType = CommandType.StoredProcedure;
            objRequest.Command     = BaseDatos.PKG_SISACT_GENERAL + ".SP_CON_PARAM_GENERAL";
            objRequest.Parameters.AddRange(arrParam);

            ArrayList    objLista = new ArrayList();
            ItemGenerico objItem;
            IDataReader  dr = null;

            try
            {
                dr = objRequest.Factory.ExecuteReader(ref objRequest).ReturnDataReader;
                while (dr.Read())
                {
                    objItem             = new ItemGenerico();
                    objItem.Codigo      = Funciones.CheckStr(dr["PCONI_CODIGO"]);
                    objItem.Descripcion = Funciones.CheckStr(dr["PCONV_DESCRIPCION"]);
                    //objItem.Valor = Funciones.CheckStr(dr["PCONV_VALOR"]); PENDIENTE LUIS
                    objItem.Valor2 = Funciones.CheckStr(dr["PCONV_VALOR"]);                     //JAZ
                    objLista.Add(objItem);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (dr != null && dr.IsClosed == false)
                {
                    dr.Close();
                }
                objRequest.Factory.Dispose();
            }
            return(objLista);
        }
Example #14
0
        public virtual long ExisteSolicitud(long pNroSolicitudSEC)
        {
            //--inicializa dato a  devolver
            long intExiste = 0;             //- 0= NO existe

            //--define parametros
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_NroSolicitud", DbType.Int64, ParameterDirection.Input),
                new DAABRequest.Parameter("P_Existe",       DbType.Int32, ParameterDirection.Output)
            };
            for (int i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            if (!pNroSolicitudSEC.Equals(-1))
            {
                arrParam[0].Value = pNroSolicitudSEC;
            }

            BDSISACT    obj        = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest objRequest = obj.CreaRequest();

            objRequest.CommandType = CommandType.StoredProcedure;
            objRequest.Command     = BaseDatos.PKG_SISACT_ACUERDO + ".SECT_SOLICITUD_Existe";
            objRequest.Parameters.AddRange(arrParam);

            try
            {
                intExiste = Funciones.CheckInt(objRequest.Factory.ExecuteScalar(ref objRequest));
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                IDataParameter parSalida1;
                parSalida1 = (IDataParameter)objRequest.Parameters[1];
                intExiste  = Funciones.CheckInt64(parSalida1.Value);
                objRequest.Factory.Dispose();
                objRequest.Parameters.Clear();
            }
            return(intExiste);
        }
Example #15
0
        public int Validar_BlackWhiteList(string strTipDoc, string strDocumento, string strTipoOper, string strFecha, string strTipoLista)
        {
            int intValidar = 0;

            DAABRequest.Parameter[] arrParam = { new DAABRequest.Parameter("P_VALIDAR",  DbType.Int32,  ParameterDirection.Output),
                                                 new DAABRequest.Parameter("P_TIPODOCU", DbType.String, ParameterDirection.Input),
                                                 new DAABRequest.Parameter("P_NRODOCU",  DbType.String, ParameterDirection.Input),
                                                 new DAABRequest.Parameter("P_FECHA",    DbType.String, ParameterDirection.Input),
                                                 new DAABRequest.Parameter("P_OPCION",   DbType.String, ParameterDirection.Input),
                                                 new DAABRequest.Parameter("P_TFLUJO",   DbType.String, ParameterDirection.Input) };

            for (int i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            arrParam[0].Value = System.DBNull.Value;
            arrParam[1].Value = strTipDoc;
            arrParam[2].Value = strDocumento;
            arrParam[3].Value = strFecha;
            arrParam[4].Value = strTipoLista;
            arrParam[5].Value = strTipoOper;

            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.SISACT_VALIDARWHITEBLACKLIST;
            obRequest.Parameters.AddRange(arrParam);
            try
            {
                obRequest.Factory.ExecuteNonQuery(ref obRequest);
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                IDataParameter parSalida1;
                parSalida1 = (IDataParameter)obRequest.Parameters[0];
                intValidar = Funciones.CheckInt(parSalida1.Value);
                obRequest.Factory.Dispose();
            }
            return(intValidar);
        }
Example #16
0
        public Usuario ConsultaDatosUsuario(string p_cta_red)
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_CTA_RED", DbType.String, 20, ParameterDirection.Input),
                new DAABRequest.Parameter("P_CURSOR",  DbType.Object, ParameterDirection.Output)
            };

            for (int i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            arrParam[0].Value = p_cta_red;

            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.PKG_SISACT_EVALUACION_UNI + ".SP_CONSULTA_PDV_USUARIO";
            obRequest.Parameters.AddRange(arrParam);

            Usuario     oUsuario = new Usuario();
            IDataReader dr       = null;

            try
            {
                dr = obRequest.Factory.ExecuteReader(ref obRequest).ReturnDataReader;
                while (dr.Read())
                {
                    oUsuario.UsuarioId     = Funciones.CheckInt64(dr["USUAN_CODIGO"]);
                    oUsuario.TipoOficinaId = Funciones.CheckStr(dr["TOFIC_CODIGO"]);
                    oUsuario.OficinaId     = Funciones.CheckStr(dr["OVENC_CODIGO"]);
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                obRequest.Parameters.Clear();
                obRequest.Factory.Dispose();
            }
            return(oUsuario);
        }
Example #17
0
        public bool EnvioMPxSec(int intSec, string strUsuario)
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_SOLIN_CODIGO",       DbType.Int64,  ParameterDirection.Input),
                new DAABRequest.Parameter("P_SOPOV_USUARIO_CREA", DbType.String, ParameterDirection.Input),
                new DAABRequest.Parameter("P_RESPUESTA",          DbType.Int32,  ParameterDirection.Output)
            };
            for (int i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            arrParam[0].Value = intSec;
            arrParam[1].Value = strUsuario;

            bool        salida    = false;
            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.PKG_PORTABILIDAD + ".SP_ENVIO_MP_X_SEC";
            obRequest.Parameters.AddRange(arrParam);
            obRequest.Transactional = true;

            try
            {
                obRequest.Factory.ExecuteNonQuery(ref obRequest);
                obRequest.Factory.CommitTransaction();
                salida = true;
            }
            catch (Exception ex)
            {
                obRequest.Factory.RollBackTransaction();
                //rMsg = "Error al AutoAsignarSEC. \nMensaje : " + ex.Message;
                throw ex;
            }
            finally
            {
                IDataParameter parSalida1;
                parSalida1 = (IDataParameter)obRequest.Parameters[2];
                //sEstado = Funciones.CheckInt(parSalida1.Value);
                obRequest.Factory.Dispose();
            }
            return(salida);
        }
Example #18
0
        public string ListaPrefijosApellidoCompuesto()
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("K_CUR_SALIDA", DbType.Object, ParameterDirection.Output)
            };

            BDSISACT    obj        = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest objRequest = obj.CreaRequest();

            objRequest.CommandType = CommandType.StoredProcedure;
            objRequest.Command     = BaseDatos.PKG_SISACT_CONSULTAS + ".SISACT_LIST_PREFIJO_APELLIDO";
            objRequest.Parameters.AddRange(arrParam);

            string      cadTokens = "";
            IDataReader dr        = null;

            try
            {
                dr = objRequest.Factory.ExecuteReader(ref objRequest).ReturnDataReader;
                while (dr.Read())
                {
                    if (cadTokens.Length == 0)
                    {
                        cadTokens = cadTokens + Funciones.CheckStr(dr["PREFIJOAP"]);
                    }
                    else
                    {
                        cadTokens = cadTokens + "," + Funciones.CheckStr(dr["PREFIJOAP"]);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (dr != null && dr.IsClosed == false)
                {
                    dr.Close();
                }
                objRequest.Factory.Dispose();
            }
            return(cadTokens);
        }
Example #19
0
        public ArrayList ListarTipoDocumento()
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_CURSOR", DbType.Object, ParameterDirection.Output)
            };

            BDSISACT    obj        = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest objRequest = obj.CreaRequest();

            objRequest.CommandType = CommandType.StoredProcedure;
            objRequest.Command     = BaseDatos.PKG_SISACT_GENERAL + ".SP_CON_TIPO_DOCUMENTO";
            objRequest.Parameters.AddRange(arrParam);

            ArrayList     objLista = new ArrayList();
            TipoDocumento objItem;
            IDataReader   dr = null;

            try
            {
                dr = objRequest.Factory.ExecuteReader(ref objRequest).ReturnDataReader;
                while (dr.Read())
                {
                    objItem                   = new TipoDocumento();
                    objItem.ID_SISACT         = Funciones.CheckStr(dr["DOCC_CODIGO"]) == AppSettings.Key_codigoDocPasaporte08 ? AppSettings.Key_codigoDocPasaporte07 : Funciones.CheckStr(dr["DOCC_CODIGO"]);             /*PROY-31636 - RENTESEG*/
                    objItem.TDOCV_DESCRIPCION = Funciones.CheckStr(dr["DOCV_DESCRIPCION"]);
                    objItem.ID_BSCS           = Funciones.CheckInt(dr["DOCC_COD_BSCS"]);
                    objItem.COD_SGA           = Funciones.CheckStr(dr["DOCC_COD_SGA"]);
                    objItem.ID_DC_CORP        = Funciones.CheckStr(dr["DOCC_COD_DC"]);
                    objLista.Add(objItem);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (dr != null && dr.IsClosed == false)
                {
                    dr.Close();
                }
                objRequest.Factory.Dispose();
            }
            return(objLista);
        }
Example #20
0
        public DataTable ConsultaVentaCuotas(string strTipoDocumento, string strNroDocumento, string strIMEI, string strLinea)
        {
            DataTable dtResultado = new DataTable();

            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_CURSOR",  DbType.Object, ParameterDirection.Output),
                new DAABRequest.Parameter("P_TIPODOC", DbType.String, ParameterDirection.Input),
                new DAABRequest.Parameter("P_NRODOC",  DbType.String, ParameterDirection.Input),
                new DAABRequest.Parameter("P_LINEA",   DbType.String, ParameterDirection.Input),
                new DAABRequest.Parameter("P_IMEI",    DbType.String, ParameterDirection.Input)
            };

            int i = 0;

            for (i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            arrParam[1].Value = strTipoDocumento;
            arrParam[2].Value = strNroDocumento;
            arrParam[3].Value = strLinea;
            arrParam[4].Value = strIMEI;

            BDSISACT    obj        = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest objRequest = obj.CreaRequest();

            objRequest.CommandType = CommandType.StoredProcedure;
            objRequest.Command     = BaseDatos.PKG_SISACT_REPORTE + ".sp_con_venta_cuotas";
            objRequest.Parameters.AddRange(arrParam);

            try
            {
                dtResultado = objRequest.Factory.ExecuteDataset(ref objRequest).Tables[0];
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objRequest.Factory.Dispose();
            }
            return(dtResultado);
        }
Example #21
0
        public PuntoVenta ValidarOficinaVenta(string strOficinaVenta)
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_OFICINA_VENTA", DbType.String, 20, ParameterDirection.Input),
                new DAABRequest.Parameter("P_RESULTADO",     DbType.Object, ParameterDirection.Output)
            };

            for (int i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            arrParam[0].Value = strOficinaVenta;

            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.PKG_SISACT_VENTA_EXPRESS + ".SP_VALIDAR_OFICINA";
            obRequest.Parameters.AddRange(arrParam);

            PuntoVenta  oPuntoVenta = new PuntoVenta();
            IDataReader dr          = null;

            try
            {
                dr = obRequest.Factory.ExecuteReader(ref obRequest).ReturnDataReader;
                while (dr.Read())
                {
                    oPuntoVenta.OVENC_PDV_RENOV   = Funciones.CheckStr(dr["OVENC_PDV_RENOV"]);
                    oPuntoVenta.OVENC_PDV_REPOS   = Funciones.CheckStr(dr["OVENC_PDV_REPOS"]);
                    oPuntoVenta.OVENV_DESCRIPCION = Funciones.CheckStr(dr["OVENV_DESCRIPCION"]);
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                obRequest.Parameters.Clear();
                obRequest.Factory.Dispose();
            }
            return(oPuntoVenta);
        }
        //Renovacion

        //Validación BlackList Cliente Comisiones
        public string ConsultaClienteBlackList(string p_tipo_doc, string p_nro_doc)
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_EXISTE",   DbType.String, ParameterDirection.Output),
                new DAABRequest.Parameter("P_TIPO_DOC", DbType.String,                          2,ParameterDirection.Input),
                new DAABRequest.Parameter("P_NRO_DOC",  DbType.String,                         16,ParameterDirection.Input)
            };
            string retorno = "0";

            for (int i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            arrParam[1].Value = p_tipo_doc;
            arrParam[2].Value = p_nro_doc;

            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.CommandType   = CommandType.StoredProcedure;
            obRequest.Transactional = true;
            obRequest.Parameters.Clear();
            obRequest.Command = BaseDatos.PKG_SISACT_EVALUACION_UNI + ".SP_CON_BLACKLIST_COMISIONES";
            obRequest.Parameters.AddRange(arrParam);

            try
            {
                obRequest.Factory.ExecuteNonQuery(ref obRequest);
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                IDataParameter parSalida1;
                parSalida1 = (IDataParameter)obRequest.Parameters[0];
                retorno    = (Funciones.CheckInt(parSalida1.Value) > 0)? "S" : "N";
                obRequest.Factory.Dispose();
                obRequest.Parameters.Clear();
            }
            return(retorno);
        }
Example #23
0
        public string ObtieneUsrSisact(string vUsrNT)
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("K_CUR_SALIDA",   DbType.Object, ParameterDirection.Output),
                new DAABRequest.Parameter("P_USUAC_CTARED", DbType.String, ParameterDirection.Input)
            };

            string codigo_usuario = "";
            int    i = 0;

            arrParam[i].Value = DBNull.Value;

            arrParam[1].Value = vUsrNT;
            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.PKG_SISACT_DATAENTRY + ".SISACT_DATOSUSUARIO";
            obRequest.Parameters.AddRange(arrParam);
            IDataReader dr = null;

            try
            {
                dr = obRequest.Factory.ExecuteReader(ref obRequest).ReturnDataReader;
                while (dr.Read())
                {
                    codigo_usuario = Funciones.CheckStr(dr["usuan_codigo"]).Trim();
                }
            }
            catch (Exception ex)
            {
                obRequest.Factory.RollBackTransaction();
                throw ex;
            }
            finally
            {
                if (dr != null)
                {
                    dr.Close();
                }
                obRequest.Factory.Dispose();
            }
            return(codigo_usuario);
        }
Example #24
0
        public string ObtienePeriodoRenov()
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("K_CUR_SALIDA", DbType.Object, ParameterDirection.Output)
            };

            string lista = "";
            int    i     = 0;

            arrParam[i].Value = DBNull.Value;

            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.PKG_SISACT_MANT_PLN + ".SISACT_CONSULTA_PER_RENOV";
            obRequest.Parameters.AddRange(arrParam);
            IDataReader dr = null;

            try
            {
                dr = obRequest.Factory.ExecuteReader(ref obRequest).ReturnDataReader;
                while (dr.Read())
                {
                    string cantidad = Funciones.CheckStr(dr["TABLN_CANTIDAD"]).Trim();
                    string periodo  = Funciones.CheckStr(dr["TABLN_PERIODO"]).Trim();
                    lista = cantidad + "," + periodo;
                }
            }
            catch (Exception ex)
            {
                obRequest.Factory.RollBackTransaction();
                throw ex;
            }
            finally
            {
                if (dr != null)
                {
                    dr.Close();
                }
                obRequest.Factory.Dispose();
            }
            return(lista);
        }
Example #25
0
        public bool Guardar_CodigoSMS(string strNroTelefonico, string strClaveSMS, DateTime dttFecha)
        {
            DAABRequest.Parameter[] arrParam = { new DAABRequest.Parameter("K_RESULTADO",    DbType.String,                           1, ParameterDirection.Output),
                                                 new DAABRequest.Parameter("P_TELEFONO",     DbType.String,   ParameterDirection.Input),
                                                 new DAABRequest.Parameter("P_CLAVESMS",     DbType.String,   ParameterDirection.Input),
                                                 new DAABRequest.Parameter("P_FEC_REGISTRO", DbType.DateTime, ParameterDirection.Input) };
            for (int i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            arrParam[0].Value = DBNull.Value;
            arrParam[1].Value = strNroTelefonico;
            arrParam[2].Value = strClaveSMS;
            arrParam[3].Value = dttFecha;

            bool        salida     = false;
            BDSISACT    obj        = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest objRequest = obj.CreaRequest();

            objRequest.CommandType = CommandType.StoredProcedure;
            objRequest.Command     = BaseDatos.SISACT_ENVIARSMS;
            objRequest.Parameters.AddRange(arrParam);
            objRequest.Transactional = true;

            try
            {
                objRequest.Factory.ExecuteNonQuery(ref objRequest);
                objRequest.Factory.CommitTransaction();
                salida = true;
            }
            catch (Exception e)
            {
                throw  e;
            }
            finally
            {
                IDataParameter parSalida1;
                parSalida1 = (IDataParameter)objRequest.Parameters[0];
                salida     = Funciones.CheckBoo(Funciones.CheckInt(parSalida1.Value));
                objRequest.Factory.Dispose();
            }
            return(salida);
        }
Example #26
0
        public ArrayList ListarTipoCuota()
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_CURSOR", DbType.Object, ParameterDirection.Output)
            };

            BDSISACT    obj        = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest objRequest = obj.CreaRequest();

            objRequest.CommandType = CommandType.StoredProcedure;
            objRequest.Command     = BaseDatos.PKG_SISACT_GENERAL + ".SP_CON_TIPO_CUOTA";
            objRequest.Parameters.AddRange(arrParam);

            ArrayList   objLista = new ArrayList();
            Cuota       objItem  = null;
            IDataReader dr       = null;

            try
            {
                dr = objRequest.Factory.ExecuteReader(ref objRequest).ReturnDataReader;
                while (dr.Read())
                {
                    objItem          = new Cuota();
                    objItem.idCuota  = Funciones.CheckStr(dr["CUOC_CODIGO"]);
                    objItem.cuota    = Funciones.CheckStr(dr["CUOV_DESCRIPCION"]);
                    objItem.nroCuota = Funciones.CheckInt(dr["CUON_VIGENCIA"]);
                    objLista.Add(objItem);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (dr != null && dr.IsClosed == false)
                {
                    dr.Close();
                }
                objRequest.Factory.Dispose();
            }
            return(objLista);
        }
Example #27
0
        //ldrz
        public DataTable ListarPaquete3Play(string P_PRDC, string P_PAQTV_CODIGO, string P_PAQTV_DESCRIPCION, string P_ESTADO)
        {
            DataTable dtResultado = new DataTable();

            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_PRDC",              DbType.String, ParameterDirection.Input),
                new DAABRequest.Parameter("P_PAQTV_CODIGO",      DbType.String, ParameterDirection.Input),
                new DAABRequest.Parameter("P_PAQTV_DESCRIPCION", DbType.String, ParameterDirection.Input),
                new DAABRequest.Parameter("P_ESTADO",            DbType.String, ParameterDirection.Input),
                new DAABRequest.Parameter("K_CUR_SALIDA",        DbType.Object, ParameterDirection.Output)
            };
            for (int i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            arrParam[0].Value = P_PRDC;
            arrParam[1].Value = P_PAQTV_CODIGO;
            arrParam[2].Value = P_PAQTV_DESCRIPCION;
            arrParam[3].Value = P_ESTADO;

            BDSISACT    oBDSISACT    = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest oDAABRequest = oBDSISACT.CreaRequest();

            oDAABRequest.CommandType = CommandType.StoredProcedure;
            oDAABRequest.Command     = BaseDatos.PKG_SISACT_MANTENIMIENTO_3PLAY + ".SISACT_SEL_PAQUETE_3PLAY";
            oDAABRequest.Parameters.AddRange(arrParam);

            try
            {
                dtResultado = oDAABRequest.Factory.ExecuteDataset(ref oDAABRequest).Tables[0];
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                oDAABRequest.Parameters.Clear();
                oDAABRequest.Factory.Dispose();
            }
            return(dtResultado);
        }
        //Renovacion
        public void Actualizar_DC_Historico(string numOperacion, string validarCliente)
        {
            DAABRequest.Parameter[] arrParam = { new DAABRequest.Parameter("P_NUM_OPERACION",   DbType.String, ParameterDirection.Input),
                                                 new DAABRequest.Parameter("P_VALIDAR_CLIENTE", DbType.String, ParameterDirection.Input) };
            int intCont = 0;

            for (intCont = 0; intCont < arrParam.Length; intCont++)
            {
                arrParam[intCont].Value = DBNull.Value;
            }

            if (!numOperacion.Equals(""))
            {
                arrParam[0].Value = numOperacion;
            }
            if (!validarCliente.Equals(""))
            {
                arrParam[1].Value = validarCliente;
            }

            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.PKG_SISACT_EVALUACION_CONS_2 + ".SISACT_UPD_VALIDAR_NOMBRES";
            obRequest.Parameters.AddRange(arrParam);
            obRequest.Transactional = true;

            try
            {
                obRequest.Factory.ExecuteNonQuery(ref obRequest);
                obRequest.Factory.CommitTransaction();
            }
            catch (Exception e)
            {
                obRequest.Factory.RollBackTransaction();
                throw e;
            }
            finally
            {
                obRequest.Factory.Dispose();
                obRequest.Parameters.Clear();
            }
        }
Example #29
0
        /// <summary>
        /// Actualiza la operaciòn de canje de puntos Claro Club, cuando se efectuo el pago de la nota de crèdito.
        /// </summary>
        /// <remarks>
        /// Autor: E77568
        /// PS - Automatización de canje y nota de crédito
        /// RF-04
        /// </remarks>
        public void ActualizarCanjePuntos(CanjePuntos objCanjePuntos)
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_NRO_DOC_SAP_NC", DbType.String, ParameterDirection.Input),
                new DAABRequest.Parameter("P_USUARIO_CANJE",  DbType.String, ParameterDirection.Input),
                new DAABRequest.Parameter("P_FLAG_CANJE",     DbType.String, ParameterDirection.Input)
            };

            int i = 0;

            for (i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }

            arrParam[0].Value = objCanjePuntos.NRO_DOC_SAP_NC;
            arrParam[1].Value = objCanjePuntos.USUARIO_CANJE;
            arrParam[2].Value = objCanjePuntos.FLAG_CANJE;


            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.SISACT_PKG_PROCESOS + ".MANTSU_UPDATE_CANJE_PUNTOS";
            obRequest.Parameters.AddRange(arrParam);
            obRequest.Transactional = true;

            try
            {
                obRequest.Factory.ExecuteNonQuery(ref obRequest);
                obRequest.Factory.CommitTransaction();
            }
            catch (Exception ex)
            {
                obRequest.Factory.RollBackTransaction();
                throw ex;
            }
            finally
            {
                obRequest.Factory.Dispose();
            }
        }
Example #30
0
        public string ObtenerValorContingenciaDC(int codParametro)
        {
            DAABRequest.Parameter[] arrParam =
            {
                new DAABRequest.Parameter("P_CODPARAMETRO", DbType.Int64,  ParameterDirection.Input),
                new DAABRequest.Parameter("K_VALOR",        DbType.String, ParameterDirection.Output)
            };
            int i = 0;

            for (i = 0; i < arrParam.Length; i++)
            {
                arrParam[i].Value = DBNull.Value;
            }
            i = 0;
            arrParam[i].Value = codParametro;
            string      salida    = "";
            BDSISACT    obj       = new BDSISACT(BaseDatos.BD_SISACT);
            DAABRequest obRequest = obj.CreaRequest();

            obRequest.CommandType = CommandType.StoredProcedure;
            obRequest.Command     = BaseDatos.PCK_MANT_TABLAS + ".MANTSS_OBTENER_VALOR_CONT_DC";
            obRequest.Parameters.AddRange(arrParam);
            obRequest.Transactional = true;
            int bb;

            try
            {
                bb = Convert.ToInt16(obRequest.Factory.ExecuteScalar(ref obRequest));
                obRequest.Factory.CommitTransaction();
            }
            catch (Exception ex)
            {
                obRequest.Factory.RollBackTransaction();
                throw ex;
            }
            finally
            {
                IDataParameter parSalida1;
                parSalida1 = (IDataParameter)obRequest.Parameters[1];
                salida     = Funciones.CheckStr(parSalida1.Value);
                obRequest.Factory.Dispose();
            }
            return(salida);
        }