public Paciente InsertHistory(string Historial, int IdUser, int IdPortal, string UIPaciente) { Paciente p = new Paciente("error", "error", DateTime.Now, "error", "error", "error", "error", 0, "error", "error", false); Paciente t_P = ConnectionDispensario.Modelos.Paciente.Select_Paciente_by_GUI(UIPaciente); if (t_P != null) { DotNetNuke.Entities.Users.UserController UC = new DotNetNuke.Entities.Users.UserController(); DotNetNuke.Entities.Users.UserInfo t_UI = UC.GetUser(IdPortal, IdUser); if (t_UI != null) { Historial H = new Historial(Historial.Replace("\n", "[LineJump]"), IdUser, t_P.ID); if (H.Guardar() == true) { ConnectionDispensario.Statics.LogCatcher.AddLog("Se inserto correctamente", "Se inserto correctamente", null, null); return(t_P); } else { ConnectionDispensario.Statics.LogCatcher.AddLog("No se pudo Guardar", "No se pudo Guardar", null, null); return(p); } } else { ConnectionDispensario.Statics.LogCatcher.AddLog("No existe el usuario", "No existe el usuario", null, null); return(p); } } else { ConnectionDispensario.Statics.LogCatcher.AddLog("No existe el Paciente", "No existe el Paciente", null, null); return(p); } }