コード例 #1
0
 private void MappingThisFromAnother(Pago_Web retorno)
 {
     this.Id           = retorno.Id;
     this.Alumno       = retorno.Alumno;
     this.Total_Cuenta = retorno.Total_Cuenta;
     this.Valor_Pago   = retorno.Valor_Pago;
     this.Fecha_Pago   = retorno.Fecha_Pago;
 }
コード例 #2
0
        public async Task <bool> Read(int id)
        {
            try
            {
                HttpResponseMessage responseMessage = await client.GetAsync(string.Format("{0}/{1}/{2}", url, "pago", id));

                if (responseMessage.IsSuccessStatusCode)
                {
                    var      responseData = responseMessage.Content.ReadAsStringAsync().Result;
                    Pago_Web retorno      = JsonConvert.DeserializeObject <Pago_Web>(responseData);

                    MappingThisFromAnother(retorno);
                    return(true);
                }
                return(false);
            }
            catch (Exception)
            {
                return(false);

                throw;
            }
        }