public static void firmarFinalizarEvaluado(VALORACIONESPROGRESS.formulario_id1 form1) { VALORACIONESPROGRESS.formulario_id1 evaluacion = null; IB.Progress.BLL.VALORACIONESPROGRESS evaluacionBLL = null; try { string supervisado = String.Empty; StringBuilder sb = new StringBuilder(); IB.Progress.BLL.VALORACIONESPROGRESS valpro = new IB.Progress.BLL.VALORACIONESPROGRESS(); valpro.UpdateEvaluado(form1); valpro.Dispose(); int idficepiConectado = int.Parse(((IB.Progress.Models.Profesional)HttpContext.Current.Session["PROFESIONAL"]).t001_idficepi.ToString()); evaluacionBLL = new IB.Progress.BLL.VALORACIONESPROGRESS(); evaluacion = evaluacionBLL.Select(idficepiConectado, form1.t930_idvaloracion); evaluacionBLL.Dispose(); //Envío de correos if (form1.t930_fecfirmaevaluado != null) { if (((IB.Progress.Models.Profesional)HttpContext.Current.Session["PROFESIONAL"]).Sexo.ToString() == "V") { supervisado = "evaluado"; } else { supervisado = "evaluada"; } sb.Append(evaluacion.Nombreevaluador + ", " + ((IB.Progress.Models.Profesional)HttpContext.Current.Session["PROFESIONAL"]).nombrelargo.ToString() + " ha realizado el cierre de la valoración."); Correo.Enviar("PROGRESS: Firma de tu " + supervisado + "", sb.ToString(), evaluacion.Correoevaluador); } } catch (Exception ex) { if (evaluacionBLL != null) { evaluacionBLL.Dispose(); } Smtp.SendSMTP("Error en la aplicación PROGRESS", ex.ToString()); } }
public static void updatearEvaluado(VALORACIONESPROGRESS.formulario_id2 form2) { VALORACIONESPROGRESS.formulario_id2 evaluacion = null; IB.Progress.BLL.VALORACIONESPROGRESS evaluacionBLL = null; try { string responsable = String.Empty; StringBuilder sb = new StringBuilder(); int idficepiConectado = int.Parse(((IB.Progress.Models.Profesional)HttpContext.Current.Session["PROFESIONAL"]).t001_idficepi.ToString()); IB.Progress.BLL.VALORACIONESPROGRESS valpro = new IB.Progress.BLL.VALORACIONESPROGRESS(); valpro.UpdateEvaluado(form2); valpro.Dispose(); evaluacionBLL = new IB.Progress.BLL.VALORACIONESPROGRESS(); evaluacion = evaluacionBLL.Select2(idficepiConectado, form2.t930_idvaloracion); evaluacionBLL.Dispose(); //Envío de correos if (form2.t930_fecfirmaevaluado != null) { if (((IB.Progress.Models.Profesional)HttpContext.Current.Session["PROFESIONAL"]).Sexo.ToString() == "V") { responsable = "evaluado"; } else { responsable = "evaluada"; } sb.Append(evaluacion.Nombreevaluador + ", " + ((IB.Progress.Models.Profesional)HttpContext.Current.Session["PROFESIONAL"]).nombrelargo.ToString() + " ha realizado el cierre de la valoración."); Correo.Enviar("PROGRESS: Firma de tu " + responsable + "", sb.ToString(), evaluacion.Correoevaluador); } } catch (Exception ex) { IB.Progress.Shared.Smtp.SendSMTP("Error al actualizar al evaluado del colectivo TAU", ex.ToString()); throw ex; } }