Ejemplo n.º 1
0
        protected void Alterar(object sender, EventArgs e)
        {
            try
            {
                ProcessoDAL pDAL = new ProcessoDAL();
                Processo    p    = pDAL.ObterDadosPorId(Convert.ToInt32(Request.QueryString["idPrc"]));

                p.DSProcesso    = Util.formataTexto(txtDescricao.Text);
                p.DSEmail       = Util.formataTexto(txtEmail.Text);
                p.NRPrazoMaximo = Convert.ToInt32(txtPrazoMaximo.Text);

                if (radAtivo_N.Checked == true)
                {
                    p.BTAtivo = false;
                }
                else
                {
                    p.BTAtivo = true;
                }

                pDAL.Alterar(p);

                Response.Write("<script language='JavaScript'>alert('Processo alterado com sucesso');window.parent.location='ListarProcessos.aspx';</script>");
            }
            catch (Exception)
            { throw; }
        }
Ejemplo n.º 2
0
        protected void Alterar(object sender, EventArgs e)
        {
            try
            {
                ProcessoDAL pDAL = new ProcessoDAL();
                Processo    p    = pDAL.CarregarDadosPorIdProcesso(Convert.ToInt32(Request.QueryString["idPrc"]));

                p.Nome        = txtNome.Text;
                p.Email       = txtEmail.Text;
                p.PrazoMaximo = Convert.ToInt32(txtPrazoMaximo.Text);

                if (radAtivo_N.Checked == true)
                {
                    p.Ativo = "0";
                }
                else
                {
                    p.Ativo = "1";
                }

                pDAL.Alterar(p);

                Response.Write("<script language='JavaScript'>alert('Processo alterado com sucesso');window.parent.location='ListarProcessos.aspx';</script>");
            }
            catch (Exception)
            { throw; }
        }