Browse Source

PRS MOBILE - DB Settings to Remote com-al

Nick-PRSDigital@bitbucket.org 2 years ago
parent
commit
6a414b0d42
1 changed files with 12 additions and 3 deletions
  1. 12 3
      prs.mobile/comal.timesheets/Main/App.xaml.cs

+ 12 - 3
prs.mobile/comal.timesheets/Main/App.xaml.cs

@@ -76,12 +76,11 @@ namespace comal.timesheets
                     if (string.IsNullOrWhiteSpace(Settings.URL))
                         MobileUtils.LoadDemoSettings(DBSettings);
                     else
-                    {
-                        DBSettings.URLs[0] = Settings.URL + ":" + Settings.Port;
+                    {                        
                         if (Settings.URL.ToUpper().Contains("COM-AL"))
                         {
                             List<string> list = new List<string>();
-                            list.Add(DBSettings.URLs[0]);
+                            list.Add("http://remote.com-al.com.au:)" + Settings.Port);
                             list.Add("http://remote2.com-al.com.au:" + Settings.Port);
                             list.Add("http://remote3.com-al.com.au:" + Settings.Port);
 
@@ -91,8 +90,18 @@ namespace comal.timesheets
                         DBSettings.Password = Settings.Password;
                     }                    
                 }
+                
                 if (DBSettings.URLs.Count() > 0)
                 {
+                    if (DBSettings.URLs[0].ToUpper().Contains("COM-AL"))
+                    {
+                        List<string> list = new List<string>();
+                        list.Add("http://remote.com-al.com.au:)" + Settings.Port);
+                        list.Add("http://remote2.com-al.com.au:" + Settings.Port);
+                        list.Add("http://remote3.com-al.com.au:" + Settings.Port);
+
+                        DBSettings.URLs = list.ToArray();
+                    }
                     new LocalConfiguration<DatabaseSettings>().Save(DBSettings);
                     MobileUtils.SaveToSecureStorage();
                 }