Ejemplo n.º 1
0
        protected async void btnInsert_Click(object sender, EventArgs e)
        {
            if (Page.IsValid) { 
                int idRest = Convert.ToInt16(Session["idRest"]);
                HttpClient httpClient = new HttpClient();

                httpClient.BaseAddress = new Uri(ip);
                Models.Cardapio f = new Models.Cardapio
                {
                    Descricao = textBoxDesc.Text,
                    Restaurante_id = idRest
                };

                string s = JsonConvert.SerializeObject(f);
                var content = new StringContent(s, Encoding.UTF8, "application/json");
                await httpClient.PostAsync("/20131011110061/api/cardapio", content);

                Reload();
            }
        }
Ejemplo n.º 2
0
 public Fila ComCardapio(Cardapio c)
 {
     this.Cardapio = c;
     return this;
 }
Ejemplo n.º 3
0
 public Produto comCardapioFila(Cardapio c, Fila f)
 {
     this.cardapio = c;
     this.fila = f;
     return this;
 }