Boton para la modificacion de columnas

This commit is contained in:
HECTOR RODRIGUEZ
2021-04-14 13:15:34 -07:00
parent fbd9e32492
commit 8de16c928c
2 changed files with 107 additions and 3 deletions

View File

@@ -196,6 +196,12 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
GVRepAcercamientosDetalle.DataSource = ObjRepA.DtResultados;
ObjRepA.Dispose();
GVRepAcercamientosDetalle.DataBind();
this.GVRepAcercamientosDetalle.Columns[9].Visible = false;
this.GVRepAcercamientosDetalle.Columns[10].Visible = false;
this.GVRepAcercamientosDetalle.Columns[11].Visible = false;
this.GVRepAcercamientosDetalle.Columns[12].Visible = false;
this.GVRepAcercamientosDetalle.Columns[13].Visible = false;
this.GVRepAcercamientosDetalle.Columns[14].Visible = false;
upDatosRepA.Update();
}
@@ -225,4 +231,45 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
RcveProbabilidadAcercamiento = DdlProbabilidad.SelectedValue.ToEntero();
cargarDatos();
}
protected void GVRepAcercamientosDetalle_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.FCLabel("lblPrioridad").Text.ToEntero() == 1)
{
e.Row.FCLabel("lblPrioridad").Text = "Baja";
}
else if (e.Row.FCLabel("lblPrioridad").Text.ToEntero() == 2)
{
e.Row.FCLabel("lblPrioridad").Text = "Media";
}
else if (e.Row.FCLabel("lblPrioridad").Text.ToEntero() == 3)
{
e.Row.FCLabel("lblPrioridad").Text = "Alta";
}
}
}
protected void LnkEditargv_Click(object sender, EventArgs e)
{
RegistraScript("$('#ModalEditar').modal('show')");
}
protected void GuardarEditargv_Click(object sender, EventArgs e)
{
foreach (ListItem item in CBLEditargv.Items)
{
if (item.Value.ToEntero() == 1) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[9].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[9].Visible = false; } }
if (item.Value.ToEntero() == 2) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[10].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[10].Visible = false; } }
if (item.Value.ToEntero() == 3) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[11].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[11].Visible = false; } }
if (item.Value.ToEntero() == 4) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[12].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[12].Visible = false; } }
if (item.Value.ToEntero() == 5) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[13].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[13].Visible = false; } }
if (item.Value.ToEntero() == 6) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[14].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[14].Visible = false; } }
}
upDatosRepA.Update();
RegistraScript("$('#ModalEditar').modal('hide')");
}
}