//-----------------------
        //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;
        }
Example #2
0
 //-----------------------
 // Obtener Fecha Servidor
 //-----------------------
 public string Get_FechaServidor(BE_ReqFechaServidor Request)
 {
     string Item = "";
     DA_Sistema Obj = new DA_Sistema();
     Item = Obj.Get_FechaServidor(Request);
     return Item;
     //return Obj.Get_FechaServidor
 }
Example #3
0
 //------------------------------
 // Obtener Empresas del Sistema
 //------------------------------
 public DataTable Get_SysEmpresa(BE_ReqFechaServidor Request)
 {
     //Recuperando registros
     DataTable dt = new DataTable();
     DA_Sistema Obj = new DA_Sistema();
     return Obj.Get_SysEmpresa(Request);
 }
Example #4
0
        //---------------------------------------------------------
        //Obtengo List Empresa del Sistema (90000) -Peridentifica-
        //---------------------------------------------------------
        public DataTable Get_SysEmpresa(BE_ReqFechaServidor 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_PerSysJuridica]";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cPerCodigo", Request.dFechaServer);
                        cm.Connection = cn;

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

                    }
                }

            }
            catch (Exception)
            {
                throw;
            }
            return dt;
        }