Example #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";
            }
        }
    }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         CarregaGridInvestidor();
         CarregaGridEd();
         CarregaGridEmp();
         ModalInvestidor.Hide();
     }
 }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         CarregaGrid();
         ModalInvestidor.Hide();
         ModalEd.Hide();
         ModalEmpresarial.Hide();
         ModalPopupExtenderDesc.Hide();
     }
 }
Example #4
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();
    }
Example #5
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();
    }
Example #6
0
 //Investidor pagina
 protected void grvInvestidor_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     grvInvestidor.PageIndex = e.NewPageIndex;
     CarregaGridInvestidor();
     ModalInvestidor.Show();
 }
Example #7
0
 protected void btnInvestidor_Click(object sender, ImageClickEventArgs e)
 {
     ModalInvestidor.Show();
 }
Example #8
0
 protected void btnBuscarInvestidor_Click(object sender, EventArgs e)
 {
     buscarModelo(txtBuscaInvestidor, grvInvestidor, lblTotalInvestidor, 1);
     ModalInvestidor.Show();
 }
Example #9
0
 protected void btn_falso_Click(object sender, EventArgs e)
 {
     ModalPopupExtenderDesc.Show();
     ModalInvestidor.Show();
 }