Exemple #1
0
        protected async void btnInsert_Click(object sender, EventArgs e)
        {
            if (Page.IsValid) { 
                HttpClient httpClient = new HttpClient();
                httpClient.BaseAddress = new Uri(ip);
                Models.Fila f = new Models.Fila
                {
                    Descricao = textBoxDesc.Text,
                    Cardapio_id = int.Parse(Cardapios.SelectedValue)
                };

                string s = JsonConvert.SerializeObject(f);

                var content = new StringContent(s, Encoding.UTF8, "application/json");

                await httpClient.PostAsync("/20131011110061/api/fila", content);

                Reload();
            }

        }
Exemple #2
0
 public Produto comCardapioFila(Cardapio c, Fila f)
 {
     this.cardapio = c;
     this.fila = f;
     return this;
 }