Example #1
0
        public static DBConnectionInfo LoadDbConnectionInfo()
        {
            DBConnectionInfo connectioninfo = new DBConnectionInfo();

            try
            {
                DBProfileInfo dbProfileInfo = new DBProfileInfo();


                if (File.Exists(ApplicationInfo.DBProfileName))
                {
                    XMLSerializer <DBProfileInfo> .DeSerializeInputs <DBProfileInfo>(ApplicationInfo.DBProfileName, ref dbProfileInfo);

                    connectioninfo.AuthenticationType = dbProfileInfo.AuthenticationType;
                    connectioninfo.DatabaseName       = ApplicationInfo.DatabaseName;
                    connectioninfo.DatabaseType       = dbProfileInfo.DatabaseType;
                    connectioninfo.DBPath             = ApplicationInfo.ApplicationDocumentPath;
                    connectioninfo.Password           = dbProfileInfo.Password;
                    connectioninfo.UserName           = dbProfileInfo.UserName;
                    connectioninfo.ServerName         = dbProfileInfo.ServerName;
                }
            }
            catch (Exception ex)
            {
                AMTLogger.WriteToLog(ex.Message, MethodBase.GetCurrentMethod().Name, 0, AMTLogger.LogInfo.Error);
            }
            return(connectioninfo);
        }
Example #2
0
        public static DBProfileInfo GetDBProfileInfo()
        {
            DBProfileInfo dbProfileInfo = new DBProfileInfo();

            try
            {
                if (File.Exists(ApplicationInfo.DBProfileName))
                {
                    XMLSerializer <DBProfileInfo> .DeSerializeInputs <DBProfileInfo>(ApplicationInfo.DBProfileName, ref dbProfileInfo);
                }
            }
            catch (Exception ex)
            {
                AMTLogger.WriteToLog(ex.Message, MethodBase.GetCurrentMethod().Name, 0, AMTLogger.LogInfo.Error);
            }
            return(dbProfileInfo);
        }
Example #3
0
        public static List <RemoteActionInfo> LoadRemoteActions()
        {
            List <RemoteActionInfo> remoteActionInfo = new List <RemoteActionInfo>();

            try
            {
                if (File.Exists(ApplicationInfo.RemoteActionFile))
                {
                    XMLSerializer <List <RemoteActionInfo> > .DeSerializeInputs(ApplicationInfo.RemoteActionFile, ref remoteActionInfo);
                }
            }
            catch (Exception ex)
            {
                AMTLogger.WriteToLog(ex.Message, MethodBase.GetCurrentMethod().Name, 0, AMTLogger.LogInfo.Error);
            }

            return(remoteActionInfo);
        }