コード例 #1
0
 /// <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;
 }
コード例 #2
0
ファイル: Connection.cs プロジェクト: mrk29vn/vna-accounting
 /// <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;
 }
コード例 #3
0
ファイル: frmSQL.cs プロジェクト: Gack113/PTUDCSDL1-DOAN
        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
            { }
        }
コード例 #4
0
ファイル: frmSQL.cs プロジェクト: mrk29vn/vna-accounting
        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
            { }
        }