public async Task <List <IntervencionNoTerminadaMotivosCE> > getMotivosIntervencionNoTerminada() { List <IntervencionNoTerminadaMotivosCE> lstMotivos = new List <IntervencionNoTerminadaMotivosCE>(); try { string metodo = "intervencion/getMotivosIntervencionNoTerminada"; //string jsonResult = base.callMethod(metodo); string jsonResult = await SingleHttpCliente.getMethod(metodo); JArray oJsonArray = JArray.Parse(jsonResult); if (oJsonArray.Count >= 1) { var settings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, MissingMemberHandling = MissingMemberHandling.Ignore }; lstMotivos = oJsonArray.ToObject <List <IntervencionNoTerminadaMotivosCE> >(); } } catch { throw; } return(lstMotivos); }
public async Task <List <ImagenCE> > getImagenesFirmaByIntervencion(int idIntervencion) { List <ImagenCE> lstImagenesCE = new List <ImagenCE>(); try { string metodo = "intervencion/getImagenesFirmaByIntervencion?idIntervencion=" + idIntervencion; //string jsonResult = base.callMethod(metodo); string jsonResult = await SingleHttpCliente.getMethod(metodo); JArray oJsonArray = JArray.Parse(jsonResult); if (oJsonArray.Count >= 1) { var settings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, MissingMemberHandling = MissingMemberHandling.Ignore }; lstImagenesCE = oJsonArray.ToObject <List <ImagenCE> >(); } } catch { throw; } return(lstImagenesCE); }
public async Task <(UsuariosCE, IntervencionCE)> getUsuarioIntervencionLogin(string username, string intervencion) { UsuariosCE oUsuarioCE = null; IntervencionCE oIntervencionCE = null; try { string metodo = "user/getUsuarioIntervencionLoginTabla?user="******"&codigointervencion=" + intervencion; string jsonResult = (await SingleHttpCliente.getMethod(metodo)).Replace("[", "").Replace("]", ""); //string jsonResult = base.callMethod(metodo).Replace("[", "").Replace("]", ""); JObject jsonObject = JObject.Parse(jsonResult); if (jsonObject.Count >= 1) { var settings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, MissingMemberHandling = MissingMemberHandling.Ignore }; oUsuarioCE = JsonConvert.DeserializeObject <UsuariosCE>(jsonResult, settings); oIntervencionCE = JsonConvert.DeserializeObject <IntervencionCE>(jsonResult, settings); } return(oUsuarioCE, oIntervencionCE); } catch { throw; } }
public async Task <List <MedidaTiposCE> > getMedidasTipos() { List <MedidaTiposCE> lstMedidasTiposCE = new List <MedidaTiposCE>(); try { string metodo = "replanteo/getMedidasTipos"; //string jsonResult = base.callMethod(metodo); string jsonResult = await SingleHttpCliente.getMethod(metodo); JArray oJsonArray = JArray.Parse(jsonResult); if (oJsonArray.Count >= 1) { var settings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, MissingMemberHandling = MissingMemberHandling.Ignore }; lstMedidasTiposCE = oJsonArray.ToObject <List <MedidaTiposCE> >(); } } catch { throw; } return(lstMedidasTiposCE); }
public async Task <IntervencionFinalizacionCE> getReplanteoFinalizacionByIntervencion(int idIntervencion) { IntervencionFinalizacionCE oFinalizacion = new IntervencionFinalizacionCE(); try { string metodo = "replanteo/getReplanteoFinalizacionByIntervencion?idIntervencion=" + idIntervencion; //string jsonResult = base.callMethod(metodo); string jsonResult = (await SingleHttpCliente.getMethod(metodo)); JObject jsonObject = JObject.Parse(jsonResult); if (jsonObject.Count >= 1) { var settings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, MissingMemberHandling = MissingMemberHandling.Ignore }; oFinalizacion = JsonConvert.DeserializeObject <IntervencionFinalizacionCE>(jsonResult, settings); } } catch { throw; } return(oFinalizacion); }
public async Task <IntervencionCE> actualizarIntervencionEstado(int idIntervencion, int idEstado) { try { IntervencionCE oIntervencionCE = null; string jsonResult = (await SingleHttpCliente.getMethod("intervencion/actualizarEstado?idIntervencion=" + idIntervencion.ToString() + "&idEstado=" + idEstado.ToString())).Replace("[", "").Replace("]", ""); JObject jsonObject = JObject.Parse(jsonResult); if (jsonObject.Count >= 1) { var settings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, MissingMemberHandling = MissingMemberHandling.Ignore }; oIntervencionCE = JsonConvert.DeserializeObject <IntervencionCE>(jsonResult, settings); } return(oIntervencionCE); } catch { throw; } }