protected string GetAreaInfo(Object obj) { int areaID = 0; string name = ""; try { areaID = (int)obj; } catch { return("-"); } if (areaID > 0) { Area theClass = null; try { theClass = AreaBLL.GetAreaById(areaID); } catch { } if (theClass != null) { name = " - " + theClass.Name; } } return(name); }
public void cargarDatosArea() { Area theData = null; try { theData = AreaBLL.GetAreaById(Convert.ToInt32(AreaIdHiddenField.Value)); if (theData == null) { Response.Redirect("~/Administracion/Area/ListaArea.aspx"); } if (theData.AreaId != 0) { descripcionTextBox.Text = theData.Descripcion; SaveArea.Visible = false; UpdateAreaButton.Visible = true; } } catch { log.Error("Error al obtener la información del Usuario"); } }
private void LoadArea() { if (AreaId > 0) { Area theData = null; try { theData = AreaBLL.GetAreaById(AreaId); } catch (Exception exc) { SystemMessages.DisplaySystemErrorMessage(exc.Message); } if (theData != null) { if (DataTypeHiddenField.Value.Equals("KPI")) { pnlAddArea.Style["display"] = "none"; pnlKPIArea.Style["display"] = "inline"; KPIAreaText.Text = theData.Name; AreaTextBox.Enabled = !ReadOnly; RemoveAreaButton.Visible = !ReadOnly; } else { AreaTextBox.Text = theData.Name; } } } KPIActivityText.Enabled = !ReadOnly; }
protected void ListaModulos_GV_RowDataBound(object sender, GridViewRowEventArgs e) { try { string celda = e.Row.Cells[1].Text; int id = Convert.ToInt32(celda); if (AreaBLL.GetAreaById(id) != null) { e.Row.Cells[1].Text = AreaBLL.GetAreaById(id).Descripcion; } } catch (Exception) { } }
private void LoadArea() { if (AreaId > 0) { Area theData = null; try { theData = AreaBLL.GetAreaById(AreaId); } catch (Exception exc) { SystemMessages.DisplaySystemErrorMessage(exc.Message); } if (theData != null) { AreaTextBox.Enabled = !ReadOnly; AreaTextBox.Text = theData.Name; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { tituloLiteral.Text = "Nuevo rol"; try { string id = Request["id"]; if (!string.IsNullOrEmpty(id)) { Area obj = AreaBLL.GetAreaById(Convert.ToInt32(id)); if (obj != null) { tituloLiteral.Text = "Editar rol"; Id_Txt.Text = obj.AreaId.ToString(); Descripcion_Txt.Text = obj.Descripcion; } } } catch (Exception) { } } }