protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { if (ObjUsuario != null) { if (ObjUsuario.isAdmEmp_DptoSeg() || ObjUsuario.isAdm_SucSeg()) { #region codigo if (e.Row.RowType == DataControlRowType.Header) { e.Row.Cells[8].Visible = false; } if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[8].Visible = false; } #endregion } else if (ObjUsuario.isAdm_SucSalud() || ObjUsuario.isAdmEmp_DptoSalud() || ObjUsuario.isResponsable())//Adm Emp { #region codigo if (e.Row.RowType == DataControlRowType.Header) { e.Row.Cells[7].Visible = false; e.Row.Cells[8].Visible = false; } if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[7].Visible = false; e.Row.Cells[8].Visible = false; } #endregion } } }
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { if (ObjUsuario != null) { if (ObjUsuario.isAdm_Sucursal() || ObjUsuario.isAdm_SucSalud() || ObjUsuario.isAdm_SucSeg() || ObjUsuario.isResponsable()) { GridView1.Columns[5].Visible = false; GridView1.Columns[6].Visible = false; } } }
public static int Set_IdSucursal(Model_UsuarioSistema ObjUsuario, int valor) { int IdSucursal = 0; if (ObjUsuario.isAdm_Sucursal() || ObjUsuario.isAdm_SucSeg() || ObjUsuario.isAdm_SucSalud() || ObjUsuario.isResponsable()) { IdSucursal = ObjUsuario.Id_sucursal; } else { IdSucursal = valor; } return(IdSucursal); }
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); if (ObjUsuario.isAdmEmp_DptoSeg() || ObjUsuario.isAdm_SucSeg() || ObjUsuario.isAdmEmp_DptoSalud() || ObjUsuario.isAdm_SucSalud() || ObjUsuario.isResponsable()) { if (e.Row.RowType == DataControlRowType.Header) { e.Row.Cells[5].Visible = false; e.Row.Cells[6].Visible = false; } if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[5].Visible = false; e.Row.Cells[6].Visible = false; } } }