Пример #1
0
    //RowCommand da Grid Investidor Editar
    protected void grvInvestidorEditar_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Visualizar")
        {
            Mod_modelos mod = Mod_modelosDB.Select(Convert.ToInt32(e.CommandArgument));
            Descricao.Text = Function.QuebrarLinha(mod.DescricaoModelo, 70);
            ModalPopupExtenderDesc.Show();
            ModalInvestidor.Show();
        }

        if (e.CommandName == "Editar")
        {
            int         id  = Convert.ToInt32(e.CommandArgument);
            Mod_modelos mod = Mod_modelosDB.Aplicar(id);


            Session.Remove("modelo");

            if (mod != null)
            {
                Session["modelo"] = mod;
                Session["editar"] = true;
                Response.Redirect("ConfirmarModelo.aspx");
            }
            else
            {
                lblTotalInvestidorEditar.Text = "Erro ao selecionar chamado";
            }
        }
    }
Пример #2
0
    //RowCommand da Grid Investidor
    protected void grvInvestidor_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Visualizar")
        {
            Mod_modelos mod = Mod_modelosDB.Select(Convert.ToInt32(e.CommandArgument));
            lblDescricao.Text = Function.QuebrarLinha(mod.DescricaoModelo, 70);
            ModalPopupExtenderDesc.Show();
            ModalInvestidor.Show();
        }

        ModalInvestidor.Show();
    }
Пример #3
0
    //RowCommand da Grid Investidor Habilitar
    protected void grvInvestidorHabilitar_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Visualizar")
        {
            Mod_modelos mod = Mod_modelosDB.Select(Convert.ToInt32(e.CommandArgument));
            Descricao.Text = Function.QuebrarLinha(mod.DescricaoModelo, 70); //Function.QuebrarLinha(mod.DescricaoModelo, 20);
            ModalPopupExtenderDesc.Show();
            ModalInvestidor.Show();
        }

        if (e.CommandName == "Alterar")
        {
            Mod_modelos mod = new Mod_modelos();
            mod = Mod_modelosDB.Select(Convert.ToInt32(e.CommandArgument));
            Mod_modelosDB mod_db = new Mod_modelosDB();
            if (mod.AtivoModelo == true)
            {
                switch (mod_db.Habilitar(mod, 0))
                {
                case -2:
                    ClientScript.RegisterStartupScript(GetType(), "alerta", "alert('Status não Alterado.');", true);
                    break;

                case 0:

                    ClientScript.RegisterStartupScript(GetType(), "alerta", "alert('Modelo Desabilitado com sucesso!');", true);
                    CarregaGrid();
                    break;
                }
            }
            else if (mod.AtivoModelo == false)
            {
                switch (mod_db.Habilitar(mod, 1))
                {
                case -2:
                    ClientScript.RegisterStartupScript(GetType(), "alerta", "alert('Status não Alterado.');", true);
                    break;

                case 0:
                    ClientScript.RegisterStartupScript(GetType(), "alerta", "alert('Modelo Habilitado com sucesso.');", true);
                    CarregaGrid();
                    break;
                }
            }
        }
        ModalInvestidor.Show();
    }
Пример #4
0
 //Investidor pagina
 protected void grvInvestidor_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     grvInvestidor.PageIndex = e.NewPageIndex;
     CarregaGridInvestidor();
     ModalInvestidor.Show();
 }
Пример #5
0
 protected void btnInvestidor_Click(object sender, ImageClickEventArgs e)
 {
     ModalInvestidor.Show();
 }
Пример #6
0
 protected void btnBuscarInvestidor_Click(object sender, EventArgs e)
 {
     buscarModelo(txtBuscaInvestidor, grvInvestidor, lblTotalInvestidor, 1);
     ModalInvestidor.Show();
 }
Пример #7
0
 protected void btn_falso_Click(object sender, EventArgs e)
 {
     ModalPopupExtenderDesc.Show();
     ModalInvestidor.Show();
 }