using MySql.Data.MySqlClient;
using MySqlX.XDevAPI.Common;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace prj_wfrm_centreCall_tickets
{
    public class Global
    {
        public static DataTable connexion(string sql)
        {
            string serveur = "server=localhost;port=3306;database=bdcentrecall;uid=root;pwd=;";
            MySqlConnection connexion = new MySqlConnection(serveur);
            connexion.Open();
            DataTable resultat = new DataTable();
            MySqlDataAdapter executeSql = new MySqlDataAdapter(sql, connexion);

            executeSql.Fill(resultat);
            return resultat;

        }
    }
}
