protected void LlenarDatos() { string cleanMessage = string.Empty; BL_ASIGNACION_RECURSOS obj = new BL_ASIGNACION_RECURSOS(); DataTable dtResultado = new DataTable(); DataTable dtEncargados = new DataTable(); dtResultado = obj.Datos_requerimiento_Ticket(Session["NRO_TICKET"].ToString()); if (dtResultado.Rows.Count > 0) { PanelEstados.Visible = true; int CodAsignacion = Convert.ToInt32(dtResultado.Rows[0]["IDE_ASIGNACION"].ToString()); dtEncargados = obj.Datos_requerimiento_encargados(CodAsignacion, ""); if (dtEncargados.Rows.Count > 0) { DataListRecursos.DataSource = dtEncargados; DataListRecursos.DataBind(); LlenarEstados(); } } else { PanelEstados.Visible = false; } }
protected void LlenarDatos() { string cleanMessage = string.Empty; BL_ASIGNACION_RECURSOS obj = new BL_ASIGNACION_RECURSOS(); DataTable dtResultado = new DataTable(); DataTable dtEncargados = new DataTable(); dtResultado = obj.Datos_requerimiento_Ticket(txtNroTicket.Text); if (dtResultado.Rows.Count > 0) { PanelTicket.Visible = true; lblcandidato.Text = dtResultado.Rows[0]["CANDIDATO"].ToString(); lblProyecto.Text = dtResultado.Rows[0]["PROYECTO"].ToString(); lblEmpresa.Text = dtResultado.Rows[0]["EMPRESA"].ToString(); lblCentro.Text = dtResultado.Rows[0]["CENTROCOSTO"].ToString(); lblCargo.Text = dtResultado.Rows[0]["CARGO"].ToString(); lblFechaIngreso.Text = dtResultado.Rows[0]["FECHA_INGRESO"].ToString(); lblDni.Text = dtResultado.Rows[0]["DNI"].ToString(); lblUbicacion.Text = dtResultado.Rows[0]["UBICACION"].ToString(); txtObserva.Text = dtResultado.Rows[0]["OBSERVA"].ToString(); int CodAsignacion = Convert.ToInt32(dtResultado.Rows[0]["IDE_ASIGNACION"].ToString()); int FLG_ESTADO = Convert.ToInt32(dtResultado.Rows[0]["REQ_ESTADO"].ToString()); if (FLG_ESTADO == 4) { lblMensaje.Visible = true; lblMensaje.Text = "Requerimiento Anulado"; btnGuardar.Visible = false; } { lblMensaje.Text = ""; btnGuardar.Visible = true; } dtEncargados = obj.Datos_requerimiento_encargados(CodAsignacion, Session["Usuario"].ToString()); if (dtEncargados.Rows.Count > 0) { DataListRecursos.DataSource = dtEncargados; DataListRecursos.DataBind(); LlenarEstados(); } } else { PanelTicket.Visible = false; cleanMessage = "No existe el Numero de Atención ingresado"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } }
protected void LlenarDatos() { String estado = string.Empty; DataTable dtRecursos = new DataTable(); BL_ASIGNACION_RECURSOS obj = new BL_ASIGNACION_RECURSOS(); if (CheckEstados.SelectedIndex != -1) { foreach (ListItem li in CheckEstados.Items) { if (li.Selected) { estado += li.Value + ","; } } } if (estado == string.Empty) { string cleanMessage = "Seleccionar algun estado"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else { dtRecursos = obj.Datos_requerimiento_encargadosTotal(Session["Usuario"].ToString(), estado); if (dtRecursos.Rows.Count > 0) { PanelDatos.Visible = true; DataListRecursos.DataSource = dtRecursos; DataListRecursos.DataBind(); LlenarEstados(); } else { PanelDatos.Visible = false; } } }