Exemplo n.º 1
0
 private void BtnUploadData_Click(object sender, EventArgs e)
 {
     if (ExceptionLog.IsNetworkConected(this))
     {
         ExceptionLog.LogDetails(this, "Upload server started.." + DateTime.Now);
         ExceptionLog.LogDetails(this, IpAddress + " " + siteId + " " + deviceId);
         UploadDetailsToServer();
     }
     else
     {
         Toast.MakeText(this, "Check with Internet Connectivity", ToastLength.Short).Show();
     }
 }
Exemplo n.º 2
0
 private void BtnDownloadData_Click(object sender, EventArgs e)
 {
     if (ExceptionLog.IsNetworkConected(this))
     {
         if (!AppPreferences.GetBool(this, Utilities.IsDownloaded))
         {
             ExceptionLog.LogDetails(this, IpAddress + " " + siteId + " " + deviceId);
             ExceptionLog.LogDetails(this, "Download button Clicked.." + DateTime.Now);
             SyncButton_Click();
         }
         else
         {
             Toast.MakeText(this, "Please Upload Data and Try again..", ToastLength.Short).Show();
         }
     }
     else
     {
         Toast.MakeText(this, "Check with Internet Connectivity", ToastLength.Short).Show();
     }
 }