/// <summary> /// load file xml /// </summary> public Connection() { Entities.SQL sql = new Entities.SQL(); Common.Utilities com = new Common.Utilities(); sql = com.ConnectionsName(); strConnect = "Data Source=" + sql.ServerName + ";User ID=" + sql.UserName + ";password="******";Initial Catalog=" + sql.DatabaseName; }
/// <summary> /// lay gia tri tu file xml /// </summary> public Connection() { Entities.SQL sql = new Entities.SQL(); Common.Utilities com = new Common.Utilities(); sql = com.ConnectionsName(); strConnect = "Data Source=" + sql.ServerName + ";User ID=" + sql.UserName + ";password="******";Initial Catalog=" + sql.DatabaseName; }
private void frmSQL_Paint(object sender, PaintEventArgs e) { try { if (i == 0) { i = 1; if (Luu.Server == "server") { Common.Constants.Sql data = new Common.Constants.Sql(); string Links = Application.StartupPath.ToString() + data.ConfigXML; Common.Utilities com = new Common.Utilities(); if (com.CheckFile(Links) == true) { Entities.SQL sql = new SQL(); sql = com.ConnectionsName(); _connectionString = "Data Source=" + sql.ServerName + ";User ID=" + sql.UserName + ";password="******";Initial Catalog=" + sql.DatabaseName; if (CheckDatabase("SupermarketManagementDHT") == true) { if (!Luu.KFULL) { loginOK(); } } else { SelectServerName(); } } else { SelectServerName(); } } else { if (Luu.Server == "client") { loginOK(); } else { MessageBox.Show("Kiểm tra lại file xml"); } } } } catch { } }