Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- {
- string url = Constants.requestUrl + "Host=" + host + "&Database=" + database + "&Request=Fsq6Tr";
- string contentType = "application/json";
- JObject json = new JObject
- {
- { "CAF", caf },
- { "CustomerID", retailerCode },
- { "EmployeeNumber", employeeNumber },
- { "Street", street },
- { "Barangay", barangay },
- { "Town", town },
- { "District", district },
- { "Province", province },
- { "Country", country },
- { "Landmark", landmark },
- { "Telephone1", telephone1 },
- { "Telephone2", telephone2 },
- { "Mobile", mobile },
- { "Email", email },
- { "Location", location },
- { "Date", Convert.ToDateTime(date) },
- { "StartTime", Convert.ToDateTime(startTime) },
- { "EndTime", Convert.ToDateTime(endTime) },
- { "Photo1", photo1 },
- { "Photo2", photo2 },
- { "Photo3", photo3 },
- { "Video", video },
- { "MobilePhoto1", photo1url },
- { "MobilePhoto2", photo2url },
- { "MobilePhoto3", photo3url },
- { "MobileVideo", videourl },
- { "Rekorida", rekorida },
- { "Merchandizing", merchandizing },
- { "TradeCheck", tradecheck },
- { "Others", others },
- { "OtherConcern", otherconcern },
- { "Remarks", remarks },
- { "LastSync", Convert.ToDateTime(current_datetime) },
- { "MobileUpdate", Convert.ToDateTime(current_datetime) }
- };
- HttpClient client = new HttpClient();
- var response = await client.PostAsync(url, new StringContent(json.ToString(), Encoding.UTF8, contentType));
- await DisplayAlert("Success!", "Form sent successfully!", "Got it");
- }
- catch (Exception ex)
- {
- await DisplayAlert(" Sending Error ", ex.Message, "Got it");
- }
Add Comment
Please, Sign In to add comment