Esempio n. 1
0
        public static CCRMConfigData CreateInitialData(string path)
        {
            CCRMConfigData _CCRMConfigData = new CCRMConfigData();


            _CCRMConfigData.ServerAddress = "www.coachescrm.com";

            _CCRMConfigData.DataSavedLocation = path;

            return(_CCRMConfigData);
        }
Esempio n. 2
0
        public CCRMConfigData Copy()
        {
            CCRMConfigData thiscopy = new CCRMConfigData();

            thiscopy._ServerAddress     = this._ServerAddress;
            thiscopy._DataSavedLocation = this._DataSavedLocation;
            thiscopy._VictoryDBPath     = this._VictoryDBPath;
            thiscopy._LoginName         = this._LoginName;
            thiscopy._LoginPassword     = this._LoginPassword;
            return(thiscopy);
        }
Esempio n. 3
0
        public static void SaveConfigFiles(CCRMConfigData ccrmData, string i_fileName)
        {
            try
            {
                if (System.IO.File.Exists(i_fileName))
                {
                    System.IO.File.Delete(i_fileName);
                }

                if (ccrmData == null)
                {
                    return;
                }

                using (Stream m_stream = File.Open(i_fileName, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None))
                {
                    M_BinaryFormatter.Serialize(m_stream, ccrmData);
                }
            }
            catch (Exception ex)
            {
                Webb.Utilities.MessageBoxEx.ShowError("Failed to save Data\n" + ex.Message);
            }
        }