Esempio n. 1
0
        //public bool loadDB()
        //{
        //    try
        //    {
        //        FileInfo info = new FileInfo(ApplicationPath);

        //        string dbFile = info.Directory.FullName + "\\" + ProjectDBName;


        //    if (!File.Exists(dbFile))
        //        return false;


        //    SQLiteDBHelper.ConnString = dbFile;

        //    return true;

        //    }
        //    catch(Exception ex)
        //    {
        //        MessageBox.Show(ex.Message);

        //    }

        //    return false;

        //}



        private bool LoadDB()
        {
            bool ret = false;

            try
            {
                CLog.WriteSysLog(BaseVariable.DBConnStr);

                ret = MySqlDBHelper.ModifyConnectionInfo(BaseVariable.DBConnStr);

                CLog.WriteSysLog(ret.ToString());

                return(ret);
            }
            catch (Exception ex)
            {
                CLog.WriteErrLog(ex.Message.ToString());
            }

            return(false);
        }