28 lines
716 B
C#
28 lines
716 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using MySql.Data.MySqlClient;
|
|
|
|
namespace AvtoMaster
|
|
{
|
|
class BD
|
|
{
|
|
public MySqlConnection connector = new MySqlConnection
|
|
("server = cfif31.ru; user = ISPr24-38_ErofeevAS; password = ISPr24-38_ErofeevAS;" +
|
|
" database = ISPr24-38_ErofeevAS_Avto_Master");
|
|
public void OpenConection()
|
|
{
|
|
if (connector.State == System.Data.ConnectionState.Open); connector.Open();
|
|
|
|
}
|
|
public void ClouseConection()
|
|
{
|
|
if (connector.State == System.Data.ConnectionState.Closed); connector.Close();
|
|
|
|
}
|
|
|
|
}
|
|
}
|