private int GetDatosGenericosProy(int t301_idproyecto, bool bModoLectura) { EXPPROF oExpProf = EXPPROF.Datos(null, t301_idproyecto); this.txtDen.Text = oExpProf.denProyecto; this.txtDes.Text = oExpProf.t808_descripcion; if (oExpProf.t808_idexpprof != -1) { if (nIdProy != "-1") { txtProyRef.Text = oExpProf.denProyecto; } else { lblProyRef.Style.Add("display", "none"); txtProyRef.Style.Add("display", "none"); txtDes.Style.Add("height", "262px"); } } else { hdnCliProy.Value = oExpProf.t302_idcliente_proyecto.ToString(); } return(oExpProf.t808_idexpprof); }
private void GetDatos(int idExpProf, int idProfesional) { #region Datos de la experiencia profesional EXPPROF oExpProf = EXPPROF.DatosExpProf(null, idExpProf, idProfesional); if (idExpProf != -1) { this.txtDen.Text = oExpProf.t808_denominacion; this.txtDes.Text = oExpProf.t808_descripcion; this.txtCliente.Text = oExpProf.t302_denominacion; if (oExpProf.t808_enibermatica) { this.hdnEnIb.Value = "S"; } if (oExpProf.bTieneProyecto) { this.hdnTieneProy.Value = "S"; } this.hdnProfVal.Value = oExpProf.idValidador.ToString(); this.txtValidador.Text = oExpProf.denValidador; } else { SetValidador(int.Parse(this.hdnProf.Value)); } #endregion }
private void GetDatosExperiencia(int idExpProf, bool bModoLectura) { EXPPROF oExpProf = EXPPROF.DatosExpProf(null, idExpProf); this.txtDen.Text = oExpProf.t808_denominacion; this.txtDes.Text = oExpProf.t808_descripcion; lblProyRef.Style.Add("display", "none"); txtProyRef.Style.Add("display", "none"); txtDes.Style.Add("height", "262px"); GetConTec(idExpProf, bModoLectura); GetConSec(idExpProf, bModoLectura); GetProfesionales(idExpProf, bModoLectura); }
protected string Grabar(string idProyNew, int idEP, int idPSN, string strDatosGen, string strDatosACT, string strDatosACS, string strProf) { string sResul = ""; string sEPNewMasInsertados = "-1"; try { if (idProyNew == "") { sEPNewMasInsertados = EXPPROF.Grabar(idPSN, idEP, idPSN, strDatosGen, strDatosACT, strDatosACS, strProf); } else { sEPNewMasInsertados = EXPPROF.Grabar(int.Parse(idProyNew), idEP, idPSN, strDatosGen, strDatosACT, strDatosACS, strProf); } sResul = "OK@#@" + sEPNewMasInsertados; } catch (Exception ex) { sResul = "Error@#@" + SUPER.Capa_Negocio.Errores.mostrarError("Error al grabar.", ex, false);// +"@#@" + sDesc; } return(sResul); }
private void GetDatos(int idFicepi, int idExpProf, int idExpProfFicepi, int idExpFicepiPerfil) { #region Datos de la experiencia profesional EXPPROF oExpProf = EXPPROF.DatosExpProfDetPerfil(null, idExpProf); //EXPPROF oExpProf = EXPPROF.DatosExpProf(null, idExpProf, idFicepi); if (idExpProf != -1) { this.txtDen.Value = oExpProf.t808_denominacion; if (oExpProf.t808_enibermatica) { this.hdnEnIb.Value = "S"; } this.nbrACS.InnerText = oExpProf.ACS; this.nbrACT.InnerText = oExpProf.ACT; this.hdnACS.Value = oExpProf.idACS; this.hdnACT.Value = oExpProf.idACT; //Cliente (Dentro de Iber) this.cboSectorC.SelectedValue = oExpProf.idSectorCliente.ToString(); //if (oExpProf.idSectorCliente != null) if (oExpProf.idSectorCliente != 0) //Un entero (no nullable) se inicializa a cero, por lo que siempre será distinto de nulo { GetSegmentosCli((int)oExpProf.idSectorCliente); } this.cboSegmentoC.SelectedValue = oExpProf.idSegmentoCliente.ToString(); if (oExpProf.idCliente != null) { this.hdnCli.Value = oExpProf.idCliente.ToString(); } else { this.hdnCli.Value = "null"; } if (hdnCli.Value != "null") { cboSectorC.Enabled = false; cboSegmentoC.Enabled = false; } this.hdnTipo.Value = oExpProf.Dentro; this.txtCliente.Value = oExpProf.Cliente; //Empresa Contratante (Fuera de Iber) this.cboSectorEC.SelectedValue = oExpProf.idSectorEmpresaC.ToString(); //if (oExpProf.idSectorEmpresaC != null) if (oExpProf.idSectorEmpresaC != 0) //Un entero (no nullable) se inicializa a cero, por lo que siempre será distinto de nulo { GetSegmentosEC((int)oExpProf.idSectorEmpresaC); } this.cboSegmentoEC.SelectedValue = oExpProf.idSegmentoEmpresaC.ToString(); if (oExpProf.idEmpresaC != null) { this.hdnEC.Value = (-1 * oExpProf.idEmpresaC).ToString(); } else { this.hdnEC.Value = "null"; } if (hdnEC.Value != "null") { cboSectorEC.Enabled = false; cboSegmentoEC.Enabled = false; } this.txtEmpresaC.Value = oExpProf.EmpresaC; this.hdnSegmentoC.Value = oExpProf.idSegmentoEmpresaC.ToString(); //Cliente (Fuera de Iber) this.cboSectorClienteP.SelectedValue = oExpProf.idSectorP.ToString(); //if (oExpProf.idSectorP != null) if (oExpProf.idSectorP != 0) //Un entero (no nullable) se inicializa a cero, por lo que siempre será distinto de nulo { GetSegmentosCliP((int)oExpProf.idSectorP); } this.cboSegmentoClienteP.SelectedValue = oExpProf.idSegmentoP.ToString(); if (oExpProf.idClienteP != null) { this.hdnCliP.Value = (-1 * oExpProf.idClienteP).ToString(); } else { this.hdnCliP.Value = "null"; } if (hdnCliP.Value != "null") { cboSectorClienteP.Enabled = false; cboSegmentoClienteP.Enabled = false; } this.txtClienteP.Value = oExpProf.ClienteP; this.txtDescripcion.Text = oExpProf.t808_descripcion; //si la experiencia es de Tipo L (Ligada a un proyecto super) los datos de la experiencia no se pueden modificar if (oExpProf.Tipo == "L") { this.txtDen.Disabled = true; this.lblACS.Attributes.Remove("onclick"); this.lblACS.Attributes.Remove("class"); this.lblACT.Attributes.Remove("onclick"); this.lblACT.Attributes.Remove("class"); this.txtCliente.Disabled = true; //this.txtDescripcion.Enabled = false; this.txtDescripcion.Attributes.Add("ReadOnly", "true"); this.txtDescripcion.Style.Add("color", "gray"); GetDatosFechaExpProfFicepi(idExpProfFicepi); this.imgInfoExpProy.Visible = true; } //if (oExpProf.idValidador != null) //{ // this.hdnProfVal.Value = oExpProf.idValidador.ToString(); // idFicepiValidador = oExpProf.idValidador; //} } #endregion #region Datos del profesional en la experiencia profesional SUPER.BLL.EXPPROFFICEPI oEPF = new SUPER.BLL.EXPPROFFICEPI(null, idExpProfFicepi); if (idExpProfFicepi == -1) { oEPF.t001_idficepi = int.Parse(Session["IDFICEPI_CVT_ACTUAL"].ToString()); oEPF.t808_idexpprof = idExpProf; } if (oEPF.t001_idficepi_validador != null && idFicepiValidador == null) { idFicepiValidador = oEPF.t001_idficepi_validador; } this.hdnProfVal.Value = oEPF.t001_idficepi_validador.ToString(); #endregion #region Datos del perfil del profesional en la experiencia if (idExpFicepiPerfil != -1) { SUPER.BLL.EXPFICEPIPERFIL oEFP = new SUPER.BLL.EXPFICEPIPERFIL(null, idExpFicepiPerfil); if (oEFP.t813_finicio != null) { this.txtFI.Text = DateTime.Parse(oEFP.t813_finicio.ToString()).ToShortDateString(); } if (oEFP.t813_ffin != null) { this.txtFF.Text = DateTime.Parse(oEFP.t813_ffin.ToString()).ToShortDateString(); } this.cboPerfil.SelectedValue = oEFP.t035_idcodperfil.ToString(); this.cboIdioma.SelectedValue = oEFP.t020_idcodidioma.ToString(); if (oEFP.t839_idestado == "S" || oEFP.t839_idestado == "T")//|| oEFP.t839_idestado == "R" { imgEstado.Attributes.Add("onmouseover", "showTTE(\"" + Utilidades.escape(oEFP.t838_motivort.ToString()) + "\",\"Motivo\",null,300)"); imgEstado.Attributes.Add("onmouseout", "hideTTE()"); imgInfoEstado.Style.Add("visibility", "visible"); imgInfoEstado.Attributes.Add("onmouseover", "showTTE(\"" + Utilidades.escape(oEFP.t838_motivort.ToString()) + "\",\"Motivo\",null,300)"); imgInfoEstado.Attributes.Add("onmouseout", "hideTTE()"); } if (oEFP.t839_idestado != "V") { imgEstado.Attributes.Add("onmouseover", "showTTE(\"" + Utilidades.escape(Curvit.ToolTipEstados(oEFP.t839_idestado)) + "\",\"Información\",null,300)"); imgEstado.Attributes.Add("onmouseout", "hideTTE()"); } this.hdnEstadoInicial.Value = oEFP.t839_idestado; this.txtFun.Text = oEFP.t813_funcion; this.txtObs.Text = oEFP.t813_observa; } #endregion }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsCallback) { try { //string[] sFiltros = Regex.Split(Session["FILTROS_HTML"].ToString(), "{filtro}"); //string[] sArbol = Regex.Split(sFiltros[1], "{valor}");//desglose //string strFormato = sFiltros[18];//Formato a exportar int idFicepi = int.Parse(Utilidades.decodpar(Request.QueryString["idficepi"].ToString())); string[] sDatos = Regex.Split(Curriculum.MiCVPersonalHtml(idFicepi), "#@@#");//ficepi #region Datos Personales this.strTablaDpHTML = sDatos[0];//Datos Personales #endregion #region Datos Organizativos //if (sArbol[0] == "0") divDatosO.Style.Add("display", "none");//Datos Organizativos //else //{ this.strTablaDoHTML = sDatos[1];//Datos Organizativos //} #endregion #region Sinopsis //if (sArbol[10] == "0") divSinopsis.Style.Add("display", "none");//Sinopsis //else //{ this.strTablaSinopsHTML = sDatos[2];//Sinopsis //} #endregion #region Documentos Asociados al Profesional this.strTablaDAPHTML = sDatos[3]; //Documentos Asociados al Profesional #endregion #region Formacion //if (sArbol[2] == "0") //Si en el arbol Formacion no hay que mostrar no cargo las subsecciones // divForma.Style.Add("display", "none");//Formacion //else //{ #region Formacion Academica //bool? bTic = null; //if (sFiltros[7] != "") //{ // if (sFiltros[7].ToUpper()=="TRUE") // bTic=true; // else // bTic=false; //} ////if (sArbol[1] == "0") divFormaAcad.Style.Add("display", "none");//Formacion Academica //else //{ //string datos = TituloFicepi.MiCvTitulacionHTML(int.Parse(sFiltros[0]),//ficepi // int.Parse(sFiltros[2]),//Utilizar criterios // (sFiltros[3] == "") ? null : sFiltros[3],//t019_descripcion // (sFiltros[4] == "") ? null: (int?)int.Parse(sFiltros[4]),//t019_idCodTitulo // (sFiltros[5] == "") ? null : (int?)int.Parse(sFiltros[5]),//t019_tipo // bTic,//(sFiltros[7] == "") ? null : (byte?)byte.Parse(sFiltros[7]),//t019_tic // (sFiltros[6] == "") ? null : (int?)int.Parse(sFiltros[6])//t019_modalidad // ); string datosTit = TituloFicepi.MiCvTitulacionHTML(idFicepi, //ficepi 0, //Utilizar criterios null, //t019_descripcion null, //t019_idCodTitulo null, //t019_tipo null, //(sFiltros[7] == "") ? null : (byte?)byte.Parse(sFiltros[7]),//t019_tic null //t019_modalidad ); //Si no hay datos se oculta if (datosTit != "") { this.strTablaFormAcadHTML = datosTit; } else { divFormaAcad.Style.Add("display", "none"); } //} #endregion //} #endregion #region Experiencia Profesional //if (sArbol[7] == "0")//Si en el arbol Experiencia no hay que mostrar no cargo las subsecciones //{ // divExp.Style.Add("display", "none");//Experiencia profesional //} //else //{ #region Secciones Experiencia profesional #region Experiencia Profesional En Ibermatica //if (sArbol[9] == "0") divExpIber.Style.Add("display", "none");//Experiencia en Ibermatica //else //{ //string datos = EXPPROF.MiCVExpProfEnIbermaticaHTML(int.Parse(sFiltros[0]),//ficepi // int.Parse(sFiltros[2]),//Utilizar criterios // (sFiltros[13] == "") ? null : sFiltros[13].ToString(),//Nombrecuenta // (sFiltros[14] == "") ? null : (int?)int.Parse(sFiltros[14]),//idcuenta // (sFiltros[15] == "") ? null : (int?)int.Parse(sFiltros[15]),//t483_idsector // (sFiltros[16] == "") ? null : (int?)int.Parse(sFiltros[16]),//t035_codperfile // (sFiltros[17] == "") ? null : sFiltros[17].ToString()//Cadena IDs Entornos tecnologicos // ); string datosExpIb = EXPPROF.MiCVExpProfEnIbermaticaHTML(idFicepi, //ficepi 0, //Utilizar criterios null, //Nombrecuenta null, //idcuenta null, //t483_idsector null, //t035_codperfile null //Cadena IDs Entornos tecnologicos ); //Si no hay datos se oculta if (datosExpIb != "") { this.strTablaExpIberHTML = datosExpIb; } else { divExpIber.Style.Add("display", "none"); } //} #endregion #region Experiencia Profesional Fuera Ibermatica //if (sArbol[8] == "0") divExpFuera.Style.Add("display", "none");//Experiencia Fuera de Ibermatica //else //{ string datosExpF = EXPPROF.MiCVExpProfFueraIbermaticaHTML(idFicepi, //ficepi 0, //Utilizar criterios null, //Nombrecuenta null, //idcuenta null, //t483_idsector null, //t035_codperfile null //Cadena IDs Entornos tecnologicos ); //Si no hay datos se oculta if (datosExpF != "") { this.strTablaExpFueraHTML = datosExpF; } else { divExpFuera.Style.Add("display", "none"); } //} #endregion #endregion //} #endregion //if (sArbol[1] == "0") //Si en el arbol Formacion no hay que mostrar no cargo las subsecciones // divAccionesForma.Style.Add("display", "none");//Formacion //else //{ #region Cursos Recibidos //if (sArbol[3] == "0") divCurRec.Style.Add("display", "none");//Cursos Recibidos //else //{ string datosFRec = Curso.MiCVFormacionRecibidaHTML(idFicepi, //ficepi 0, //Utilizar criterios null //Cadena IDs Entornos tecnologicos ); //Si no hay datos se oculta if (datosFRec != "") { this.strTablaCurRecHTML = datosFRec; } else { divCurRec.Style.Add("display", "none"); } //} #endregion #region Cursos Impartidos //if (sArbol[4] == "0") divCurImp.Style.Add("display", "none");//Cursos Impartidos //else //{ string datosFImp = Curso.MiCVFormacionImpartidaHTML(idFicepi, //ficepi 0, //Utilizar criterios null //Cadena IDs Entornos tecnologicos ); //string datos = Curso.MiCVFormacionImpartidaHTML(int.Parse(sFiltros[0]),//ficepi // int.Parse(sFiltros[2]),//Utilizar criterios // (sFiltros[10] == "") ? null : sFiltros[10]//Cadena IDs Entornos tecnologicos // ); //Si no hay datos se oculta if (datosFImp != "") { this.strTablaCurImpHTML = datosFImp; } else { divCurImp.Style.Add("display", "none"); } //} #endregion //} #region Certificados/Examenes //if (sArbol[5] == "0" && sArbol[11] == "0") DivCEREXAM.Style.Add("display", "none");//Certificados/Examenes //else //{ string datosCertEx = Examen.MiCVFormacionCertExamHTML(idFicepi, //ficepi 0, //Utilizar criterios null, //IDs Certificado null, //Nombre certificado null, //Cadena IDs Entornos tecnologicos null //origenConsulta ); //Si no hay datos se oculta if (datosCertEx != "") { this.strTablaCertExamHTML = datosCertEx; } else { divCertExam.Style.Add("display", "none"); } //} #endregion #region Idiomas/Titulos Idiomas //if (sArbol[6] == "0") divIDIOM.Style.Add("display", "none");//Idiomas //else //{ string datosId = Idioma.MiCvIdiomasHTML(idFicepi, //ficepi 0, //Utilizar criterios null, //t020_IdCodIdioma null //nivelidioma ); //Si no hay datos se oculta if (datosId != "") { this.strTablaIdiomasHTML = datosId; } else { divIdiomas.Style.Add("display", "none"); } //} #endregion //Si todas las secciones de Formacion estan vacias se oculta la cabecera: // if ((this.strTablaFormAcadHTML == "") && (this.strTablaCurRecHTML == "") && (this.strTablaCurImpHTML == "") && (this.strTablaCertExamHTML == "") && (this.strTablaIdiomasHTML == "")) //if ( (this.strTablaCurRecHTML == "") && (this.strTablaCurImpHTML == "") ) // divAccionesForma.Style.Add("display", "none");//Acciones formativas } catch (Exception ex) { hdnErrores.Value = Errores.mostrarError("Error al cargar la pagina", ex); } } }
private void GetDatos(int idFicepi, int idExpProf) { #region Datos de la experiencia profesional EXPPROF oExpProf = EXPPROF.DatosExpProfFuera(null, idExpProf, idFicepi); if (idExpProf != -1) { this.txtDen.Text = oExpProf.t808_denominacion; this.txtDes.Text = oExpProf.t808_descripcion; //Inicio Empresa contratante if (oExpProf.t811_idcuenta_ori != null) { this.hdnCtaOri.Value = (-1 * oExpProf.t811_idcuenta_ori).ToString(); } else { this.hdnCtaOri.Value = "null"; } this.txtEmpresaC.Value = oExpProf.ctaOrigen; this.cboSectorC.SelectedValue = oExpProf.idSector_ori.ToString(); if (oExpProf.idSector_ori != null) { GetSegmentosOri((int)oExpProf.idSector_ori); } this.cboSegmentoC.SelectedValue = oExpProf.idSegmento_ori.ToString(); if (hdnCtaOri.Value != "null" && oExpProf.idSector_ori != null && oExpProf.idSegmento_ori != null) { cboSectorC.Enabled = false; cboSegmentoC.Enabled = false; } //Fin Empresa contratante //Inicio Cliente if (oExpProf.t811_idcuenta_para != null) { this.hdnCtaDes.Value = (-1 * oExpProf.t811_idcuenta_para).ToString(); } else { this.hdnCtaDes.Value = "null"; } this.txtEmpresaD.Value = oExpProf.ctaDestino; this.cboSectorD.SelectedValue = oExpProf.idSector_des.ToString(); if (oExpProf.idSector_des != null) { GetSegmentosDes((int)oExpProf.idSector_des); } this.cboSegmentoD.SelectedValue = oExpProf.idSegmento_des.ToString(); if (hdnCtaDes.Value != "null" && oExpProf.idSector_des != null && oExpProf.idSegmento_des != null) { cboSectorD.Enabled = false; cboSegmentoD.Enabled = false; } if (oExpProf.t808_enibermatica) { this.hdnEnIb.Value = "S"; } this.hdnProfVal.Value = oExpProf.idValidador.ToString(); this.txtValidador.Text = oExpProf.denValidador; } else { SetValidador(idFicepi); } #endregion }
private void GetDatos(int idFicepi, int idExpProf, int idExpProfFicepi, int idExpFicepiPerfil) { #region Datos de la experiencia profesional EXPPROF oExpProf = EXPPROF.DatosExpProf(null, idExpProf, idFicepi); if (idExpProf != -1) { this.txtDen.Text = oExpProf.t808_denominacion; if (oExpProf.t808_enibermatica) { this.hdnEnIb.Value = "S"; } this.hdnSegmentoC.Value = oExpProf.idSegmento_ori.ToString(); this.hdnProfVal.Value = oExpProf.idValidador.ToString(); this.txtValidador.Text = oExpProf.denValidador; } else { SetValidador(idFicepi); } #endregion #region Datos del profesional en la experiencia profesional SUPER.BLL.EXPPROFFICEPI oEPF = new SUPER.BLL.EXPPROFFICEPI(null, idExpProfFicepi); if (idExpProfFicepi == -1) { //oEPF.t812_visiblecv = true; oEPF.t001_idficepi = int.Parse(Session["IDFICEPI_CVT_ACTUAL"].ToString()); oEPF.t808_idexpprof = idExpProf; } else { if (oEPF.t001_idficepi_validador != null) { idFicepiValidador = oEPF.t001_idficepi_validador; } //this.hdnProfVal.Value = oEPF.idValidador.ToString(); //this.txtValidador.Text = oEPF.denValidador; } //this.hdnVisibleCV.Value = "1"; //this.hdnProfVal.Value = oEPF.t001_idficepi_validador.ToString(); this.hdnPlant.Value = oEPF.t819_idplantillacvt.ToString(); #endregion #region Datos del perfil/Plantilla del profesional en la experiencia if (hdnPlantilla.Value == "P") { PLANTILLACVT oPl = new PLANTILLACVT(); oPl = PLANTILLACVT.Detalle(int.Parse(hdnPlant.Value), int.Parse(hdnProf.Value)); this.txtFI.Text = oPl.t812_finicio; this.txtFF.Text = oPl.t812_ffin; this.cboPerfil.SelectedValue = oPl.t035_idcodperfil.ToString(); this.cboIdioma.SelectedValue = oPl.t020_idcodidioma.ToString(); this.hdnEstadoInicial.Value = "V"; this.txtFun.Text = oPl.t819_funcion; this.txtObs.Text = oPl.t819_observa; this.TipoPerfil = "Plantilla"; } else if (idExpFicepiPerfil != -1) { this.TipoPerfil = "Perfil"; SUPER.BLL.EXPFICEPIPERFIL oEFP = new SUPER.BLL.EXPFICEPIPERFIL(null, idExpFicepiPerfil); if (oEFP.t813_finicio != null) { this.txtFI.Text = DateTime.Parse(oEFP.t813_finicio.ToString()).ToShortDateString(); } if (oEFP.t813_ffin != null) { this.txtFF.Text = DateTime.Parse(oEFP.t813_ffin.ToString()).ToShortDateString(); } this.cboPerfil.SelectedValue = oEFP.t035_idcodperfil.ToString(); this.cboIdioma.SelectedValue = oEFP.t020_idcodidioma.ToString(); if (oEFP.t839_idestado == "S" || oEFP.t839_idestado == "T")//|| oEFP.t839_idestado == "R" { imgInfoEstado.Style.Add("visibility", "visible"); imgInfoEstado.Attributes.Add("onmouseover", "showTTE(\"" + Utilidades.escape(oEFP.t838_motivort.ToString()) + "\",\"Motivo\",null,300)"); imgInfoEstado.Attributes.Add("onmouseout", "hideTTE()"); } if (oEFP.t839_idestado != "V") { imgEstado.Attributes.Add("onmouseover", "showTTE(\"" + Utilidades.escape(Curvit.ToolTipEstados(oEFP.t839_idestado)) + "\",\"Información\",null,300)"); imgEstado.Attributes.Add("onmouseout", "hideTTE()"); } this.hdnEstadoInicial.Value = oEFP.t839_idestado; this.txtFun.Text = oEFP.t813_funcion; this.txtObs.Text = oEFP.t813_observa; } #endregion }
/// <summary> /// /// </summary> /// <param name="o">Origen: F-> experiencia no asociada a proyecto relativa a fuera de Ibermática /// D-> experiencia no asociada a proyecto relativa a Ibermática /// </param> /// <param name="iE">Código de experiencia profesional (para entrar a registros ya existentes)</param> /// <param name="m">Modo de acceso R-> lectura, eoc-> escritura</param> protected void Page_Load(object sender, EventArgs e) { if (!Page.IsCallback) { try { if (Session["IDRED"] == null) { try { Response.Redirect("~/SesionCaducadaModal.aspx", true); } catch (System.Threading.ThreadAbortException) { return; } } bool bLectura = true; #region recojo parámetros if (Request.QueryString["iF"] != null) {//Código del profesional this.hdnProf.Value = SUPER.Capa_Negocio.Utilidades.decodpar(Request.QueryString["iF"].ToString()); } this.hdnUserAct.Value = Session["IDFICEPI_CVT_ACTUAL"].ToString(); //Compruebo si estoy en mi propio curriculum if (this.hdnProf.Value == Session["IDFICEPI_CVT_ACTUAL"].ToString()) { this.hdnEsMiCV.Value = "S"; } if (Request.QueryString["o"] != null) { this.hdnOrigen.Value = Request.QueryString["o"].ToString(); } if (Request.QueryString["iE"] != null) {//Código de experiencia profesional this.hdnEP.Value = SUPER.Capa_Negocio.Utilidades.decodpar(Request.QueryString["iE"].ToString()); //CargarDatosExpProf(int.Parse(this.hdnEP.Value)); } else { if (Request.Form["iE"] != null) { this.hdnEP.Value = SUPER.Capa_Negocio.Utilidades.decodpar(Request.Form["iE"].ToString()); //CargarDatosExpProf(int.Parse(this.hdnEP.Value)); } } if (this.hdnEP.Value != "" && this.hdnEP.Value != "-1") {//Compruebo si es una Experiencia Profesional en IBERMATICA o fuera CargarDatosExpProf(int.Parse(this.hdnEP.Value)); } if (Request.QueryString["dE"] != null) {//Denominación de la Experiencia profesional this.txtDen.Text = SUPER.Capa_Negocio.Utilidades.decodpar(Request.QueryString["dE"].ToString()); } if (Request.QueryString["iEF"] != null) {//Código de la experiencia profesional del profesional (t812_idexpprofficepi) this.hdnEPF.Value = SUPER.Capa_Negocio.Utilidades.decodpar(Request.QueryString["iEF"].ToString()); } if (Request.QueryString["iP"] != null) {//Código del perfil del profesional en la experiencia profesional (t813_idexpficepiperfil) this.hdnEFP.Value = SUPER.Capa_Negocio.Utilidades.decodpar(Request.QueryString["iP"].ToString()); } if (Request.QueryString["tipo"] != null) {//Plantilla del profesional en la experiencia profesional (t819_plantillacvt) this.hdnPlantilla.Value = SUPER.Capa_Negocio.Utilidades.decodpar(Request.QueryString["tipo"].ToString()); } if (Request.QueryString["eA"] != null) {//Es Administrador this.hdnEsAdmin.Value = SUPER.Capa_Negocio.Utilidades.decodpar(Request.QueryString["eA"].ToString()); } if (int.Parse(Session["IDFICEPI_CVT_ACTUAL"].ToString()) == int.Parse(this.hdnProf.Value)) { bEsMiCV = true; } GetPerfiles((this.hdnEsAdmin.Value != "N" && bEsMiCV == false) ? byte.Parse("1") : byte.Parse("0")); GetIdiomas(); if (this.hdnProf.Value == "-1") { throw (new Exception("Es necesario indicar el profesional de la experiencia")); } else { this.txtDenProf.Text = SUPER.Capa_Negocio.USUARIO.GetNombreProfesional(int.Parse(this.hdnProf.Value)); } #endregion #region inicializo datos if (this.hdnEFP.Value != "" && this.hdnEFP.Value != "-1") {//Entramos en una Experiencia Profesional ya existente GetDatos(int.Parse(this.hdnProf.Value), int.Parse(this.hdnEP.Value), int.Parse(this.hdnEPF.Value), int.Parse(this.hdnEFP.Value)); } else { #region Datos de la experiencia profesional if (this.hdnEP.Value != "" && this.hdnProf.Value != "") { EXPPROF oExpProf = EXPPROF.DatosExpProf(null, int.Parse(this.hdnEP.Value), int.Parse(this.hdnProf.Value)); if (int.Parse(this.hdnEP.Value) != -1) { this.txtDen.Text = oExpProf.t808_denominacion; if (oExpProf.t808_enibermatica) { this.hdnEnIb.Value = "S"; } this.hdnSegmentoC.Value = oExpProf.idSegmento_ori.ToString(); this.hdnProfVal.Value = oExpProf.idValidador.ToString(); this.txtValidador.Text = oExpProf.denValidador; } else { SetValidador(int.Parse(this.hdnProf.Value)); } } else { SetValidador(int.Parse(this.hdnProf.Value)); } #endregion } EXPPROFFICEPI oEPF = new EXPPROFFICEPI(null, int.Parse(this.hdnEPF.Value)); if (oEPF.t812_idexpprofficepi != -1) { imgInfoPerfil.Style.Add("visibility", "visible"); imgInfoPerfil.Attributes.Add("onmouseover", "showTTE(\"" + "<label style='width:70px'>Fecha alta:</label>" + ((oEPF.t812_finicio.HasValue) ? ((DateTime)oEPF.t812_finicio).ToShortDateString() : "") + "<br><label style='width:70px'>Fecha baja:</label>" + ((oEPF.t812_ffin.HasValue)? ((DateTime)oEPF.t812_ffin).ToShortDateString() : "") + "\",\"Asociación a la experiencia profesional\",null,250)"); imgInfoPerfil.Attributes.Add("onmouseout", "hideTTE()"); if (oEPF.t812_ffin != null) { if (this.hdnLigadoProy.Value == "S") { if (oEPF.t812_ffin < DateTime.Now) { lblFFin.Style.Add("visibility", "visible"); } else { lblFFin.Style.Add("visibility", "hidden"); } } else { lblFFin.Style.Add("visibility", "hidden"); } } else { lblFFin.Style.Add("visibility", "hidden"); } } //if (Request.QueryString["LSuper"] != null && SUPER.Capa_Negocio.Utilidades.decodpar(Request.QueryString["LSuper"]) == "LS") GetDatosFechaExpProfFicepi(int.Parse(this.hdnEPF.Value)); if (hdnEFP.Value == "-1") { txtFI.Text = hdnFechaIni.Value; } switch (hdnEstadoInicial.Value) { case "S": //Pte. cumplimentar (origen ECV) case "T": //Pte. cumplimentar (origen Validador) imgEstado.ImageUrl = "~/Images/imgEstadoCVTPenCumplimentar.png"; break; case "O": //Pte. validar (origen ECV) case "P": //Pte. validar (origen Validador) //imgEstado.ImageUrl = "~/Images/imgEstadoCVTPenValidar.png"; imgEstado.ImageUrl = "~/Images/imgSeparador.gif"; break; case "Y": //Pseudovalidado (origen ECV) case "X": //Pseudovalidado (origen Validador) //imgEstado.ImageUrl = "~/Images/imgEstadoCVTPseudovalidado.png"; imgEstado.ImageUrl = "~/Images/imgSeparador.gif"; break; case "B": //Borrador imgEstado.ImageUrl = "~/Images/imgEstadoCVTBorrador.png"; //imgHistorial.Style.Add("visibility", "hidden"); break; case "R": //No Interesante //imgEstado.ImageUrl = "~/Images/imgEstadoCVTNoInteresante.png"; imgEstado.ImageUrl = "~/Images/imgSeparador.gif"; break; case "V": //Validado //imgEstado.ImageUrl = "~/Images/imgEstadoCVTValidado.png"; imgEstado.ImageUrl = "~/Images/imgSeparador.gif"; break; } if (hdnEstadoInicial.Value == "R") { SUPER.Capa_Negocio.ModoLectura.Poner(this.Controls); btnNewET.Disabled = true; //btnDelET.Disabled = true; } #endregion #region Establezco si es Mantenedor de CVs y/o Validador de CVs //Si el registro de la T812_EXPPROFFICEPI no tiene indicado validador, miro si el usuario actual es responsable Progress del profesional if (idFicepiValidador == null) { //string sRes = SUPER.Capa_Negocio.Ficepi.GetResponsableProgress(int.Parse(this.hdnProf.Value)); //if (sRes != "") //{ // string[] aD = Regex.Split(sRes, "@#@"); // if (aD[0] == Session["IDFICEPI"].ToString()) // this.hdnValidador.Value = "S"; //} if (this.hdnProfVal.Value == Session["IDFICEPI_CVT_ACTUAL"].ToString()) { this.hdnValidador.Value = "S"; } } else {//Si el validador indicado en el registro de la T812_EXPPROFFICEPI es el usuario actual -> es validador if (idFicepiValidador == int.Parse(Session["IDFICEPI_CVT_ACTUAL"].ToString())) { this.hdnValidador.Value = "S"; } } if (User.IsInRole("ECV") && this.hdnProf.Value != Session["IDFICEPI_CVT_ACTUAL"].ToString()) { this.hdnMantenedor.Value = (User.IsInRole("ECV")) ? "S" : "N"; } //Si es un perfil nuevo y es mi curriculum, el estado inicial será Borrador //Sino es mi curriculum el estado será Pendiente de validar con origen según el usuario actual if (this.hdnEFP.Value == "-1") { if (bEsMiCV) { this.hdnEstadoNuevo.Value = "B"; } else { if (this.hdnMantenedor.Value == "S") { this.hdnEstadoNuevo.Value = "O"; } else { this.hdnEstadoNuevo.Value = "P"; } } } #endregion #region Establezco si el acceso es en lectura o en escritura //if (this.hdnEPF.Value == "-1" || this.hdnEPF.Value == "")//Si es un registro nuevo, debe ser en escritura // this.hdnModo.Value = "W"; //else //{ // if (this.hdnEstadoNuevo.Value != "R")//Si el perfil está rechazado -> modo lectura // { // if (bEsMiCV)//Es mi curriculum // this.hdnModo.Value = "W"; // else // { // if (this.hdnMantenedor.Value == "S")//Es mantenedor de CVs // this.hdnModo.Value = "W"; // } // } //} #endregion #region Establezco los botones visibles bool bEsValidador = false; if (Request.QueryString["v"] != null) { if (Request.QueryString["v"] == "1") { bEsValidador = true; } else { bEsValidador = false; } } if (this.hdnValidador.Value == "S") { bEsValidador = true; } bool bEstaDeBaja = SUPER.BLL.Profesional.EstaDeBaja(int.Parse(hdnProf.Value)); //ArrayList aBotones = Curriculum.getBotonesAMostrar((this.hdnModo.Value != "W" || hdnPlant.Value != "") ? "Lectura" : hdnEstadoInicial.Value, // (int.Parse(hdnProf.Value) == (int)Session["IDFICEPI_CVT_ACTUAL"]) ? true : false, // bEsValidador, false); ArrayList aBotones = Curriculum.getBotonesAMostrar((this.hdnModo.Value != "W") ? "Lectura" : hdnEstadoInicial.Value, (int.Parse(hdnProf.Value) == (int)Session["IDFICEPI_CVT_ACTUAL"]) ? true : false, bEsValidador, false); for (int i = 0; i < aBotones.Count; i++) { switch ((int)aBotones[i]) { //case (int)CVT.Accion.Aparcar: btnAparcar.Style.Add("display", "inline-block"); break; case (int)CVT.Accion.Enviar: if (bEsValidador) { btnValidar.Style.Add("display", "inline-block"); } else { btnEnviar.Style.Add("display", "inline-block"); } break; case (int)CVT.Accion.Cumplimentar: if (!bEstaDeBaja) { btnCumplimentar.Style.Add("display", "inline-block"); } break; case (int)CVT.Accion.Validar: btnValidar.Style.Add("display", "inline-block"); break; //case (int)CVT.Accion.Pseudovalidar: btnPseudovalidar.Style.Add("display", "inline-block"); break; case (int)CVT.Accion.Rechazar: btnRechazar.Style.Add("display", "inline-block"); break; case (int)CVT.Accion.Lectura: btnSalir.Style.Add("display", "inline-block"); btnCancelar.Style.Add("display", "none"); break; } } #endregion #region Resto de datos //if (this.hdnModo.Value == "R" || hdnPlant.Value != "") if (this.hdnModo.Value == "R") { SUPER.Capa_Negocio.ModoLectura.Poner(this.Controls); //if (hdnPlant.Value != "") //{ // btnNewET.Visible = false; // btnDelET.Visible = false; // //imgHistorial.Style.Add("visibility", "hidden"); //} } else { bLectura = false; SUPER.Capa_Negocio.Utilidades.SetEventosFecha(this.txtFI); SUPER.Capa_Negocio.Utilidades.SetEventosFecha(this.txtFF); } if (hdnPlant.Value == "") { GetEntTec(int.Parse(this.hdnEFP.Value), bLectura); } else { GetEntTecPlantilla(int.Parse(this.hdnPlant.Value)); } //if (User.IsInRole("DIS") || ConfigurationManager.AppSettings["MOSTRAR_SOLODIS"] == "0") // sTareasPendientes = Curriculum.MiCVTareasPendientes(2, int.Parse(this.hdnProf.Value), int.Parse(this.hdnEFP.Value),null); //Compruebo si en el historial la última acción fué enviar a cumplimentar, en cuyo caso cargo el mensaje //que el validador le quiere hacer llegar al profesional //sMsgCumplimentar = SUPER.BLL.Historial.GetMsgPdteValidar("T838_EXPFICEPIPERFILCRONO", int.Parse(this.hdnEFP.Value), null); this.hdnMsgCumplimentar.Value = SUPER.BLL.Historial.GetMsgPdteValidar("T838_EXPFICEPIPERFILCRONO", int.Parse(this.hdnEFP.Value), null); #endregion } catch (Exception ex) { sErrores += SUPER.Capa_Negocio.Errores.mostrarError("Error al obtener los datos", ex); } //} string cbRespuesta = Page.ClientScript.GetCallbackEventReference(this, "arg", "RespuestaCallBack", "context", false); string cbLlamada = "function RealizarCallBack(arg, context)" + "{" + cbRespuesta + ";" + "}"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "RealizarCallBack", cbLlamada, true); } }