protected void Empresas() { BL_RO obj = new BL_RO(); DataTable dtResultado = new DataTable(); dtResultado = obj.listar_empresa(); if (dtResultado.Rows.Count > 0) { ddlEmpresas.DataSource = dtResultado; ddlEmpresas.DataTextField = dtResultado.Columns["DES_NOMBRE"].ToString(); ddlEmpresas.DataValueField = dtResultado.Columns["ID_EMPRESA"].ToString(); ddlEmpresas.DataBind(); proyectos(); } }
protected void IndicadoresPEP() { BL_RO obj = new BL_RO(); DataTable dtResultado = new DataTable(); dtResultado = obj.previsto_ListaR(ddlPrevisto.SelectedValue); if (dtResultado.Rows.Count > 0) { ddlIndicador.DataSource = dtResultado; ddlIndicador.DataTextField = dtResultado.Columns["DES_PREVISTO"].ToString(); ddlIndicador.DataValueField = dtResultado.Columns["IDE_PREVISTO"].ToString(); ddlIndicador.DataBind(); Listar_IndicadoresPEP(); } }
protected void Previstos() { BL_RO obj = new BL_RO(); DataTable dtResultado = new DataTable(); dtResultado = obj.previsto_Tipo(); if (dtResultado.Rows.Count > 0) { ddlPrevisto.DataSource = dtResultado; ddlPrevisto.DataTextField = dtResultado.Columns["TIPO_PREVISTO"].ToString(); ddlPrevisto.DataValueField = dtResultado.Columns["DES_TIPO_PREVISTO"].ToString(); ddlPrevisto.DataBind(); IndicadoresPEP(); } }
protected void btnEliminar_Click(object sender, ImageClickEventArgs e) { int intContador = 0; if (GridProyectos.Rows.Count == 0) { string cleanMessage = "No existe Registros"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } foreach (GridViewRow Fila in GridProyectos.Rows) { CheckBox ChkBoxCell = ((CheckBox)Fila.FindControl("chkEliminar")); if (ChkBoxCell.Checked == true) { intContador += 1; } } if (intContador == 0) { string cleanMessage = "Debe seleccionar al menos un registro."; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else { string Cod; foreach (GridViewRow row in GridProyectos.Rows) { BL_RO obj = new BL_RO(); DataTable dtResultado = new DataTable(); CheckBox ChkBoxCell = ((CheckBox)row.FindControl("chkEliminar")); if (ChkBoxCell.Checked) { Cod = GridProyectos.DataKeys[row.RowIndex].Value.ToString(); // extrae key obj.Eliminar_Proyectos(Cod); } ChkBoxCell = null; } ListarProyectos(); string Message = "Proyectos Eliminados"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + Message + "');", true); } }
protected void Actualizar_Indicador(object sender, ImageClickEventArgs e) { BL_RO obj = new BL_RO(); DataTable dtResultado = new DataTable(); ImageButton btnSave = ((ImageButton)sender); GridViewRow row = btnSave.NamingContainer as GridViewRow; string pk = GridPEP.DataKeys[row.RowIndex].Values[0].ToString(); DropDownList ddlGridIndicador = (DropDownList)row.FindControl("ddlGridIndicador"); TextBox txtDescripcionPep = (TextBox)row.FindControl("txtDescripcionPep"); obj.actualizar_Indicador_PEP(Convert.ToInt32(pk), Convert.ToInt32(ddlGridIndicador.SelectedValue), txtDescripcionPep.Text); Listar_IndicadoresPEP(); UC_MessageBox.Show(Page, Page.GetType(), txtDescripcionPep.Text + " : Se actualizo al indicador " + ddlGridIndicador.SelectedItem); return; }
protected void Listar_IndicadoresPEP() { BL_RO obj = new BL_RO(); DataTable dtResultado = new DataTable(); dtResultado = obj.Listar_PEP(Convert.ToInt32(ddlIndicador.SelectedValue)); if (dtResultado.Rows.Count > 0) { GridPEP.DataSource = dtResultado; GridPEP.DataBind(); } else { GridPEP.DataSource = null; GridPEP.DataBind(); } }
protected void ListarProyectos() { BL_RO obj = new BL_RO(); DataTable dtResultado = new DataTable(); dtResultado = obj.ListarProyectos_RO(Convert.ToInt32(ddlEmpresas.SelectedValue)); if (dtResultado.Rows.Count > 0) { GridProyectos.DataSource = dtResultado; GridProyectos.DataBind(); } else { GridProyectos.DataSource = null; GridProyectos.DataBind(); // string cleanMessage = "No se registra informacion"; //ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } }
protected void Listar_IndicadoresPEP() { BL_RO obj = new BL_RO(); DataTable dtResultado = new DataTable(); dtResultado = obj.Listar_PEP(Convert.ToInt32(ddlIndicador.SelectedValue)); if (dtResultado.Rows.Count > 0) { CheckDetalle.Visible = true; ddlDetalle.DataSource = dtResultado; ddlDetalle.DataTextField = dtResultado.Columns["DES_NOMBRE_PEP"].ToString(); ddlDetalle.DataValueField = dtResultado.Columns["IDE_PEP"].ToString(); ddlDetalle.DataBind(); } else { CheckDetalle.Visible = false; ddlDetalle.Visible = false; } }