当前位置: 首页>>代码示例>>C#>>正文


C# clsConection.GetConexionString方法代码示例

本文整理汇总了C#中clsConection.GetConexionString方法的典型用法代码示例。如果您正苦于以下问题:C# clsConection.GetConexionString方法的具体用法?C# clsConection.GetConexionString怎么用?C# clsConection.GetConexionString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在clsConection的用法示例。


在下文中一共展示了clsConection.GetConexionString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ObtenerInstitucionesBycPerCodigo

        public DataTable ObtenerInstitucionesBycPerCodigo(BE_Req_UniOrgPerExt Request)
        {
            DataTable lista = new DataTable();

            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "sp_get_Instituciones_BycPerCodigo";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cPerCodigo", Request.cPerCodigo);
                        cm.Connection = cn;
                        using (SqlDataReader dr = cm.ExecuteReader())
                        {
                            lista.Load(dr);
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return lista;
        }
开发者ID:eincioch,项目名称:SistemaColegioContadoresLaLibertad,代码行数:32,代码来源:DAUniOrgPerExt.cs

示例2: getDocAcuerdoAvanceByPersona

        public DataTable getDocAcuerdoAvanceByPersona(BE_Req_Documento Request)
        {
            BE_Res_Documento Item = new BE_Res_Documento();
            DataTable Rs = new DataTable();
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "sp_get_Acuerdo_Anvance_By_Persona";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cDocCodigo", Request.cDocCodigo);
                        cm.Parameters.AddWithValue("cPerCodigo", Request.cPerCodigo);
                        cm.Connection = cn;
                        using (SqlDataReader dr = cm.ExecuteReader())
                        {
                            Rs.Load(dr);
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return Rs;
        }
开发者ID:eincioch,项目名称:SistemaColegioContadoresLaLibertad,代码行数:33,代码来源:DADocumento.cs

示例3: get_PeriodoActual_ByActividad

        public BE_Res_Periodo get_PeriodoActual_ByActividad(BE_Req_Periodo Request)
        {
            BE_Res_Periodo Item = new BE_Res_Periodo();
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "sp_get_PeriodoActual_ByActividad";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("nPrdActividad", Request.nPrdActividad);
                        cm.Connection = cn;
                        using (SqlDataReader dr = cm.ExecuteReader())
                        {
                            while (dr.Read())
                            {
                                Item.cPrdDescripcion = dr.GetString(dr.GetOrdinal("cPrdDescripcion")).Trim();
                                Item.nPrdCodigo = dr.GetInt32(dr.GetOrdinal("nPrdCodigo"));
                            }
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return Item;
        }
开发者ID:eincioch,项目名称:SistemaColegioContadoresLaLibertad,代码行数:35,代码来源:DAPeriodo.cs

示例4: getUbigeoBycUbiGeoCodigo

        public DataTable getUbigeoBycUbiGeoCodigo(BE_Req_Ubigeo Request)
        {
            DataTable Rs = new DataTable();
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "sp_getUbigeoBycUbiGeoCodigo";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cUbiGeoCodigo", Request.cUbiGeoCodigo);
                        cm.Connection = cn;

                        using (SqlDataReader dr = cm.ExecuteReader())
                        {
                            Rs.Load(dr);
                        }
                    }
                }

            }
            catch (Exception)
            {
                throw;
            }

            return Rs;
        }
开发者ID:eincioch,项目名称:ProyectoMedica,代码行数:34,代码来源:DAUbigeo.cs

示例5: Get_ReportCuadraCaja

        //----------------------------
        // SELECT Get_ReportCuadraCaja
        //----------------------------
        public DataTable Get_ReportCuadraCaja(BE_ReqRptCuadreCaja Request)
        {
            DataTable dt = new DataTable();
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "[usp_Get_ReportCuadreCaja]";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cFlag", Request.cFlag);
                        cm.Parameters.AddWithValue("dCtaCteComFecIni", Request.dCtaCteComFecIni);
                        cm.Parameters.AddWithValue("dCtaCteComFecFin", Request.dCtaCteComFecFin);
                        cm.Connection = cn;

                        using (SqlDataReader dr = cm.ExecuteReader())
                            dt.Load(dr);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return dt;
        }
开发者ID:eincioch,项目名称:SistemaColegioContadoresLaLibertad,代码行数:35,代码来源:DA_RptCuadreCaja.cs

示例6: Get_Interface

        //-----------------------------------------------
        // Select: Interface por (nIntClase and nIntTipo)
        //-----------------------------------------------
        public DataTable Get_Interface(BE_ReqInterface Request)
        {
            DataTable dt = new DataTable();
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "[usp_Get_Interface]";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("nIntClase", Request.nIntClase);
                        cm.Parameters.AddWithValue("nIntTipo", Request.nIntTipo);
                        cm.Parameters.AddWithValue("cFlag", Request.cFlag);
                        cm.Connection = cn;

                        using (SqlDataReader dr = cm.ExecuteReader())
                            dt.Load(dr);

                    }
                }

            }
            catch (Exception)
            {
                throw;
            }
            return dt;
        }
开发者ID:eincioch,项目名称:ProyectoMedica,代码行数:37,代码来源:DA_Interface.cs

示例7: Get_DiasxMes

        //---------------------------------------------------
        //Obtener Lista de dias por mes (form tipo de cambio)
        //---------------------------------------------------
        public DataTable Get_DiasxMes(BE_ReqGetDias Request)
        {
            DataTable dt = new DataTable();
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "usp_Get_ListaFechaporMes";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("sMes", Request.sMes);
                        cm.Connection = cn;

                        using (SqlDataReader dr = cm.ExecuteReader())
                            dt.Load(dr);

                    }
                }

            }
            catch (Exception)
            {
                throw;
            }
            return dt;
        }
开发者ID:eincioch,项目名称:ProyectoMedica,代码行数:35,代码来源:DA_Sistema.cs

示例8: Get_CtasCtes_Get_LibroVentas_Electronico

        //Get_CtasCtes_Get_LibroVentas_Electronico
        public DataTable Get_CtasCtes_Get_LibroVentas_Electronico(BE_ReqBookElectronicoVta Request)
        {
            DataTable dt = new DataTable();
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "[usp_CtasCtes_Get_LibroVentas_Electronico]";
                        //cm.CommandTimeout = 0;
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("Year", Request.Year);
                        cm.Parameters.AddWithValue("Month", Request.Month);
                        cm.Parameters.AddWithValue("Empresa", Request.Empresa);
                        cm.Connection = cn;

                        using (SqlDataReader dr = cm.ExecuteReader())
                            dt.Load(dr);
                    }
                }

            }
            catch (Exception)
            {
                throw;
            }
            return dt;
        }
开发者ID:eincioch,项目名称:ProyectoMedica,代码行数:35,代码来源:DA_BookElectronicoVta.cs

示例9: InsDocContenido

        public bool InsDocContenido(BE_ReqDocContenido Request)
        {
            bool exito = false;
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "[usp_Ins_DocContenido]";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cDocCodigo", Request.cDocCodigo);
                        cm.Parameters.AddWithValue("nDocConTipo", Request.nDocConTipo);
                        cm.Parameters.AddWithValue("tDocConContenido", Request.tDocConContenido);
                        cm.Connection = cn;
                        if (cm.ExecuteNonQuery() > 0)
                        {
                            exito = true;
                        }
                        else throw new ApplicationException("se ha producido un error procedimiento almacenado: [usp_Ins_DocContenido]; Consulte al administrador del sistema");
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return exito;
        }
开发者ID:eincioch,项目名称:SistemaColegioContadoresLaLibertad,代码行数:34,代码来源:DA_DocContenido.cs

示例10: Get_Comprobante_Venta_by_cPerJurCodigo_nCtaCteComCodigo_cCtaCteComNumero

        //------------------------------
        // Get Comprobante(s) de venta
        //-------------------------------
        public DataTable Get_Comprobante_Venta_by_cPerJurCodigo_nCtaCteComCodigo_cCtaCteComNumero(BE_ReqBuscaComprobante Request)
        {
            DataTable dt = new DataTable();
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "[usp_Get_Comprobante_Venta]";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cPerJurCodigo", Request.cPerJurCodigo);
                        cm.Parameters.AddWithValue("nCtaCteComCodigo", Request.nCtaCteComCodigo);
                        cm.Parameters.AddWithValue("cCtaCteComNumero", Request.cCtaCteComNumero);
                        cm.Parameters.AddWithValue("fecini", Request.dFecIni);
                        cm.Parameters.AddWithValue("fecfin", Request.dFecFin);
                        cm.Parameters.AddWithValue("Flag", Request.cFlag);
                        cm.Connection = cn;

                        using (SqlDataReader dr = cm.ExecuteReader())
                            dt.Load(dr);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return dt;
        }
开发者ID:eincioch,项目名称:ProyectoMedica,代码行数:38,代码来源:DA_AnularComprobante.cs

示例11: Get_CtaCteItem_for_cCtaCteRecibo_by_range_fechas

        //----------------------------------------------------------------
        // SELECT usp_Get_CtaCteItem_for_cCtaCteRecibo_by_range_fechas
        //----------------------------------------------------------------
        public DataTable Get_CtaCteItem_for_cCtaCteRecibo_by_range_fechas(BE_ReqBuscaComprobante Request)
        {
            DataTable dt = new DataTable();
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "[usp_Get_CtaCteItem_for_cCtaCteRecibo_by_range_fechas]";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cFlag", Request.cFlag);
                        cm.Parameters.AddWithValue("dFecIni", Request.dFecIni);
                        cm.Parameters.AddWithValue("dFecFin", Request.dFecFin);
                        cm.Parameters.AddWithValue("cCtaCteRecibo", Request.cCtaCteRecibo);
                        cm.Connection = cn;

                        using (SqlDataReader dr = cm.ExecuteReader())
                            dt.Load(dr);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return dt;
        }
开发者ID:eincioch,项目名称:SistemaColegioContadoresLaLibertad,代码行数:36,代码来源:DA_AnularComprobante.cs

示例12: GetPeriodosByActividad

        public DataTable GetPeriodosByActividad(BE_Req_Periodo Request)
        {
            DataTable Rs = new DataTable();
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "sp_get_PeriodosByActividad";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("nPrdActividad", Request.nPrdActividad);
                        cm.Connection = cn;

                        using (SqlDataReader dr = cm.ExecuteReader())
                        {
                            Rs.Load(dr);
                        }
                    }
                }

            }
            catch (Exception)
            {
                throw;
            }

            return Rs;
        }
开发者ID:eincioch,项目名称:ProyectoMedica,代码行数:34,代码来源:DAPeriodo.cs

示例13: Get_FechaServidor

        //-----------------------
        //fecha servidor (global)
        //-----------------------
        public string Get_FechaServidor(BE_ReqFechaServidor Request)
        {
            string Item = "";
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "SET LANGUAGE 'Español' SELECT CONVERT(CHAR(10),GETDATE(),103) FechaServerSQL ";
                        cm.CommandType = CommandType.Text;
                        //cm.Parameters.AddWithValue("cPerJurCodigo", Request.cPerCodigo);
                        cm.Connection = cn;
                        using (SqlDataReader dr = cm.ExecuteReader())
                        {
                            while (dr.Read())
                            {
                                Item = dr.GetString(dr.GetOrdinal("FechaServerSQL")).Trim();
                            }
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return Item;
        }
开发者ID:eincioch,项目名称:SistemaColegioContadoresLaLibertad,代码行数:37,代码来源:DA_Sistema.cs

示例14: Get_AdmSolicitudAcademica

        //-------------------------------------
        //Buscar AdmSolicitud - para actualizar
        //--------------------------------------
        public DataTable Get_AdmSolicitudAcademica(BE_ReqSolRegistro Request)
        {
            DataTable dt = new DataTable();
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "usp_Get_AdmSolicitudAcademica";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("nSolAdmNumero", Request.nSolAdmNumero);
                        cm.Connection = cn;
                        using (SqlDataReader dr = cm.ExecuteReader())
                            dt.Load(dr);

                    }
                }

            }
            catch (Exception)
            {
                throw;
            }
            return dt;
        }
开发者ID:eincioch,项目名称:ProyectoMedica,代码行数:34,代码来源:DA_Solicitud.cs

示例15: Get_SysConfParametrosServ

        //-----------------------------
        // SELECT SysConfParametrosServ
        //-----------------------------
        public DataTable Get_SysConfParametrosServ(BE_ReqCtaCteSysConfigParamterServicio Request)
        {
            DataTable dt = new DataTable();
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "[usp_Get_SysConfParametrosServ]";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cPerJurCodigo", Request.cPerJurCodigo);
                        cm.Parameters.AddWithValue("nSisModulo", Request.nSisModulo);
                        cm.Parameters.AddWithValue("nParCodigo_nProCodigo", Request.nParCodigo_nProCodigo);
                        cm.Parameters.AddWithValue("cFlag", Request.cFLag);
                        cm.Connection = cn;

                        using (SqlDataReader dr = cm.ExecuteReader())
                            dt.Load(dr);

                    }
                }

            }
            catch (Exception)
            {
                throw;
            }
            return dt;
        }
开发者ID:eincioch,项目名称:ProyectoMedica,代码行数:38,代码来源:DA_CtaCteSysConfigParamterServicio.cs


注:本文中的clsConection.GetConexionString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。