using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace AVS
{
    class ConnectionClass
    {
        public string connectionString = "Server=192.168.90.75;Database=world;Uid=utopia;Pwd=Utopia01";
        public string SERVER_URL = "https://cosmos.utopiadeals.com/cosmos/rest/website/product-detail?data=";
        public string SERVER_URL_CONTAINER = "https://cosmos.utopiadeals.com/cosmos/rest/get-container-items?containerNo=";


        public string SERVER_URL_MOEDEL_NO = "https://cosmos.utopiadeals.com/cosmos/rest/get-product-details?modelNo=";



        public void OpenConnectionMysql(MySqlConnection connection)
        {
            try
            {

                connection.Open();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error opening connection: " + ex.Message);
            }
        }

        public void CloseConnectionMysql(MySqlConnection connection)
        {
            try
            {
                connection.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error opening connection: " + ex.Message);
            }
        }
    }
}
