private DataTable ObtenerTablaConDatosDePendientes(Decimal ID_EMPLEADO) { DataTable tablaParaGrilla = new DataTable(); registroContrato _registroContrato = new registroContrato(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString()); DataTable tablaInformacionContrato = _registroContrato.ObtenerInformacionCotratoParaEntregas(ID_EMPLEADO); if(tablaInformacionContrato.Rows.Count <= 0) { if(_registroContrato.MensajeError != null) { Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, _registroContrato.MensajeError, Proceso.Error); } else { Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, "No se encontró información del contrato del empleado seleccionado.", Proceso.Error); } } else { tablaParaGrilla = ObtenerTablaFinalDePendientes(tablaInformacionContrato, ID_EMPLEADO); } return tablaParaGrilla; }
private void CargarDatosEmpleado(Decimal ID_EMPLEADO) { Boolean correcto = true; registroContrato _registro = new registroContrato(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString()); DataTable tablaInformacionEmpleado = _registro.ObtenerInformacionCotratoParaEntregas(ID_EMPLEADO); if (_registro.MensajeError != null) { Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, _registro.MensajeError, Proceso.Error); correcto = false; } else { if (tablaInformacionEmpleado.Rows.Count <= 0) { Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, "No se encontró información del Empleado seleccionado.", Proceso.Error); correcto = false; } else { DataRow filaEmpleado = tablaInformacionEmpleado.Rows[0]; Label_NombresEmpleado.Text = filaEmpleado["NOMBRE_EMPLEADO"].ToString(); Label_NumDocIdentidadEmpleado.Text = filaEmpleado["DOCUMENTO_IDENTIDAD"].ToString(); Label_Empresa.Text = filaEmpleado["RAZ_SOCIAL"].ToString(); Label_Cargo.Text = filaEmpleado["NOM_OCUPACION"].ToString(); Label_TallaCamisa.Text = filaEmpleado["TALLA_CAMISA"].ToString(); Label_TallaPantalon.Text = filaEmpleado["TALLA_PANTALON"].ToString(); Label_TallaZapatos.Text = filaEmpleado["TALLA_ZAPATOS"].ToString(); } } if (correcto == false) { Label_NombresEmpleado.Text = "Desconocido"; Label_NumDocIdentidadEmpleado.Text = "Desconocido"; Label_Empresa.Text = "Desconocida"; Label_Cargo.Text = "Desconocido"; Label_TallaCamisa.Text = "Desconocida"; Label_TallaPantalon.Text = "Desconocida"; Label_TallaZapatos.Text = "Desconocida"; } }