Exemplo n.º 1
0
        private void inserir()
        {
            seguradora = new seguradora_tb();

            carregarEntidade();

            new API_GESCOM().Inserir <seguradora_tb>(API, seguradora);
        }
Exemplo n.º 2
0
        public void gvSeguradora_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                seguradora_tb obj = ((seguradora_tb)e.Row.DataItem);

                ((HyperLink)e.Row.FindControl("lnkEditar")).NavigateUrl = string.Concat("SeguradoraDetalhe?id=", obj.seguradora_id);
                ((HyperLink)e.Row.FindControl("lnkEditar")).Text        = obj.seguradora_id.ToString();
            }
        }
Exemplo n.º 3
0
        private void RecuperarDados()
        {
            System.Net.Http.HttpResponseMessage response = new API_GESCOM().RecuperarPelaChave(string.Format("api/seguradora/RecuperarPelaChave/{0}", Convert.ToInt32(Request["id"])));

            //se retornar com sucesso busca os dados
            if (response.IsSuccessStatusCode)
            {
                seguradora = response.Content.ReadAsAsync <seguradora_tb>().Result;
            }
            else
            {
                Response.Write(response.StatusCode.ToString() + " - " + response.ReasonPhrase);
            }
        }