Exemplo n.º 1
0
 protected void btnBuscarPosi_Click(object sender, EventArgs e)
 {
     try
     {
         posicao       = ctrl.BuscaIdPosi(Convert.ToInt32(txtBuscaPosicao.Text));
         txtPosi.Value = posicao.Funcao.ToString();
         txtDesc.Text  = posicao.DescTati.ToString();
         ViewState.Add("IdPosi", posicao.Id);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 2
0
        protected void btnExcluir_Click(object sender, EventArgs e)
        {
            PosicaoController posicao = new PosicaoController();
            Posicao           PosICaoParaSerExcluida = new Posicao();

            PosICaoParaSerExcluida = posicao.BuscaIdPosi(Convert.ToInt32(txtBuscaPosicao.Text));
            try
            {
                posicao.Excluir(PosICaoParaSerExcluida);
            }
            catch (Exception)
            {
                throw;
            }
        }