protected void GridView_HOJA_DE_TRABAJO_RowCommand(object sender, GridViewCommandEventArgs e) { int filaSeleccionada = Convert.ToInt32(e.CommandArgument); tools _tools = new tools(); SecureQueryString QueryStringSeguro = new SecureQueryString(_tools.byteParaQueryStringSeguro(), Request["data"]); Decimal ID_LIQ_NOMINA_EMPLEADOS = Convert.ToDecimal(GridView_HOJA_DE_TRABAJO.DataKeys[filaSeleccionada].Values["ID_REQUERIMIENTO"]); String Filtro = Session["idEmpresa"].ToString(); if (e.CommandName == "Asignar") { BtnEditar.Visible = false; BtnBorrarRequicicion.Visible = false; GrabarSolicitudPorProductividad.Visible = true; Reclutamiento ConstructorReclutamiento = new Reclutamiento(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString()); DataTable ConceptoGVT = ConstructorReclutamiento.FiltroPorRequerimiento(Session["idEmpresa"].ToString(), Convert.ToString(ID_LIQ_NOMINA_EMPLEADOS)); DropDownListEmpresa.Enabled = false; DropDownListCargo.Enabled = false; DropDownList1regional.Enabled = false; DropDownListCiudad.Enabled = false; DropDownListEmpresa.SelectedItem.Text = ConceptoGVT.Rows[0]["RAZ_SOCIAL"].ToString(); DropDownListEmpresa.SelectedValue = ConceptoGVT.Rows[0]["ID_EMPRESA"].ToString(); DropDownListCargo.SelectedItem.Text = ConceptoGVT.Rows[0]["NOM_OCUPACION"].ToString(); DropDownListCargo.SelectedValue = ConceptoGVT.Rows[0]["ID_OCUPACION"].ToString(); DropDownList1regional.SelectedItem.Text = ConceptoGVT.Rows[0]["NOMBRE_REGIONAL"].ToString(); DropDownList1regional.SelectedValue = ConceptoGVT.Rows[0]["ID_REGIONAL"].ToString(); DropDownListCiudad.SelectedItem.Text = ConceptoGVT.Rows[0]["NOMBRE_CIUDAD"].ToString(); DropDownListCiudad.SelectedValue = ConceptoGVT.Rows[0]["ID_CIUDAD"].ToString(); Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, "Asigne un usuario reclutador que atenderá la requisición número" + ID_LIQ_NOMINA_EMPLEADOS + ".", Proceso.Correcto); AsignacionReclutador.Visible = true; TextBoxIdRequerimiento.Text = Convert.ToString(ID_LIQ_NOMINA_EMPLEADOS); TextBoxIdRequerimiento.Enabled = false; TextBoxCantidadSolicitada.Focus(); PanelSeguimientoAsistencia.Visible = false; } if (e.CommandName == "Modificar") { BtnEditar.Visible = true; BtnBorrarRequicicion.Visible = true; GrabarSolicitudPorProductividad.Visible = false; Reclutamiento ConstructorReclutamiento = new Reclutamiento(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString()); DataTable ConceptoGVT = ConstructorReclutamiento.FiltroPorRequerimiento(Session["idEmpresa"].ToString(), Convert.ToString(ID_LIQ_NOMINA_EMPLEADOS)); DropDownListEmpresa.Enabled = false; DropDownListCargo.Enabled = false; DropDownList1regional.Enabled = false; DropDownListCiudad.Enabled = false; DropDownListEmpresa.SelectedItem.Text = ConceptoGVT.Rows[0]["RAZ_SOCIAL"].ToString(); DropDownListEmpresa.SelectedValue = ConceptoGVT.Rows[0]["ID_EMPRESA"].ToString(); DropDownListCargo.SelectedItem.Text = ConceptoGVT.Rows[0]["NOM_OCUPACION"].ToString(); DropDownListCargo.SelectedValue = ConceptoGVT.Rows[0]["ID_OCUPACION"].ToString(); DropDownList1regional.SelectedItem.Text = ConceptoGVT.Rows[0]["NOMBRE_REGIONAL"].ToString(); DropDownList1regional.SelectedValue = ConceptoGVT.Rows[0]["ID_REGIONAL"].ToString(); DropDownListCiudad.SelectedItem.Text = ConceptoGVT.Rows[0]["NOMBRE_CIUDAD"].ToString(); DropDownListCiudad.SelectedValue = ConceptoGVT.Rows[0]["ID_CIUDAD"].ToString(); HiddenField_ID_SOLICITUD.Value = ConceptoGVT.Rows[0]["Id_solicitud"].ToString(); HiddenField_Reclutador_Temporal.Value = ConceptoGVT.Rows[0]["Id_usuario_Asignado"].ToString(); TextBoxCantidadSolicitada.Text = ConceptoGVT.Rows[0]["Cantidad"].ToString(); TextBoxFechaRequerida.Text = ConceptoGVT.Rows[0]["Fecha_Requerida"].ToString(); Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, "Asigne un usuario reclutador que atenderá la requisición número" + ID_LIQ_NOMINA_EMPLEADOS + ".", Proceso.Correcto); AsignacionReclutador.Visible = true; TextBoxIdRequerimiento.Text = Convert.ToString(ID_LIQ_NOMINA_EMPLEADOS); TextBoxIdRequerimiento.Enabled = false; TextBoxCantidadSolicitada.Focus(); PanelSeguimientoAsistencia.Visible = false; } }
protected void GridViewHojaDeTrabajoReclutador_RowCommand(object sender, GridViewCommandEventArgs e) { int filaSeleccionada = Convert.ToInt32(e.CommandArgument); tools _tools = new tools(); SecureQueryString QueryStringSeguro = new SecureQueryString(_tools.byteParaQueryStringSeguro(), Request["data"]); Decimal ID_LIQ_NOMINA_EMPLEADOS = Convert.ToDecimal(GridView_HOJA_DE_TRABAJO.DataKeys[filaSeleccionada].Values["ID_REQUERIMIENTO"]); String Filtro = Session["idEmpresa"].ToString(); if (e.CommandName == "Agregar_Contacto") { Reclutamiento ConstructorReclutamiento = new Reclutamiento(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString()); DataTable ConceptoGVT = ConstructorReclutamiento.FiltroPorRequerimiento(Session["idEmpresa"].ToString(), Convert.ToString(ID_LIQ_NOMINA_EMPLEADOS)); this.TextBoxResumenSolicitud.Enabled = false; TextBoxResumenRequerimiento.Enabled = false; TextBoxResumenCantidad.Enabled = false; TextBoxRequerimientoCliente.Enabled = false; TextBoxResumenCargo.Enabled = false; lbl_DescripcionResumenRequerimiento.Enabled = false; DropDownListEmpresa.SelectedItem.Text = ConceptoGVT.Rows[0]["RAZ_SOCIAL"].ToString(); DropDownListEmpresa.SelectedValue = ConceptoGVT.Rows[0]["ID_EMPRESA"].ToString(); DropDownListCargo.SelectedItem.Text = ConceptoGVT.Rows[0]["NOM_OCUPACION"].ToString(); DropDownListCargo.SelectedValue = ConceptoGVT.Rows[0]["ID_OCUPACION"].ToString(); DropDownList1regional.SelectedItem.Text = ConceptoGVT.Rows[0]["NOMBRE_REGIONAL"].ToString(); DropDownList1regional.SelectedValue = ConceptoGVT.Rows[0]["ID_REGIONAL"].ToString(); DropDownListCiudad.SelectedItem.Text = ConceptoGVT.Rows[0]["NOMBRE_CIUDAD"].ToString(); DropDownListCiudad.SelectedValue = ConceptoGVT.Rows[0]["ID_CIUDAD"].ToString(); Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, "Asigne un usuario reclutador que atenderá la requisición número" + ID_LIQ_NOMINA_EMPLEADOS + ".", Proceso.Correcto); AsignacionReclutador.Visible = true; TextBoxIdRequerimiento.Text = Convert.ToString(ID_LIQ_NOMINA_EMPLEADOS); TextBoxIdRequerimiento.Enabled = false; TextBoxCantidadSolicitada.Focus(); } }