Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void EnviarDatos<T>(string url, T data, EmpresaData empresa)
- {
- try
- {
- using (HttpClient client = new HttpClient())
- {
- string json = JsonConvert.SerializeObject(data);
- var stringContent = new StringContent(json, UnicodeEncoding.UTF8, "application/json");
- var result = client.PostAsync(url + "?identificador=" + empresa.Identificador, stringContent).Result;
- }
- }
- catch (Exception e)
- {
- }
- }
- [HttpPost]
- public IHttpActionResult Turnos(List<Turnos> Turnos, string identificador)
- { ...... }
- [HttpPost]
- public IHttpActionResult Sectores(List<Sectores> Sectoress, string identificador)
- { ..... }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement