public RefertoDTO GetReportByRichIdExt(string richid_) { Stopwatch tw = new Stopwatch(); tw.Start(); log.Info(string.Format("Starting ...")); RefertoDTO refe = null; refe = bll.GetRefertoByIdRichiestaExt(richid_); tw.Stop(); log.Info(string.Format("Completed! Elapsed time {0}", LibString.TimeSpanToTimeHmsms(tw.Elapsed))); return(refe); }
public RefertoDTO Check4Report(string richid) { Stopwatch tw = new Stopwatch(); tw.Start(); log.Info(string.Format("Starting ...")); RefertoDTO refe = null; refe = bll.GetRefertoByEsamId(richid); tw.Stop(); log.Info(string.Format("Completed! Elapsed time {0}", LibString.TimeSpanToTimeHmsms(tw.Elapsed))); return(refe); }
public bool CheckIfCancelingIsAllowed(string richid, ref string errorString) { Stopwatch tw = new Stopwatch(); tw.Start(); log.Info(string.Format("Starting ...")); bool res = true; if (errorString == null) { errorString = ""; } RichiestaLISDTO rich = this.GetRichiestaLISByIdExt(richid); if (rich == null) { if (errorString == "") { errorString = null; } string msg = string.Format("Error! No Rich found with IDExt: {0}", richid); log.Info(string.Format(msg)); log.Error(string.Format(msg)); if (errorString != "") { errorString += "\r\n" + msg; } else { errorString += msg; } tw.Stop(); log.Info(string.Format("Completed! Elapsed time {0}", LibString.TimeSpanToTimeHmsms(tw.Elapsed))); return(false); } string id = rich.id.Value.ToString(); log.Info("External Request ID " + richid + " - Internal Request ID " + id); RefertoDTO refe = this.GetRefertoByIdRichiestaExt(richid); if (refe == null) { List <AnalisiDTO> anals = this.GetAnalisisByRichiestaExt(richid); foreach (AnalisiDTO anal in anals) { List <RisultatoDTO> riss = this.GetRisultatiByAnalId(anal.analidid.Value.ToString()); if (riss != null) { string report = string.Format("Analisi {0} già eseguita! Impossibile Cancellare!", anal.analidid.Value.ToString()); res = false; if (errorString != "") { errorString += "\r\n" + report; } else { errorString += report; } } } } else { string report = string.Format("Rich {0} (IDExt: {1}) già refertato! Id referto {2}!", id, richid, refe.refeidid); res = false; if (errorString != "") { errorString += "\r\n" + report; } else { errorString += report; } } if (errorString == "") { errorString = null; } tw.Stop(); log.Info(string.Format("Completed! Elapsed time {0}", LibString.TimeSpanToTimeHmsms(tw.Elapsed))); return(res); }
public bool CheckIfCancelingIsAllowed(string richid, ref string errorString) { Stopwatch tw = new Stopwatch(); tw.Start(); log.Info(string.Format("Starting ...")); bool res = true; if (errorString == null) { errorString = ""; } RefertoDTO refe = bll.GetRefertoByEsamId(richid); if (refe == null) { List <AnalisiDTO> anals = bll.GetAnalisisByRichiesta(richid); foreach (AnalisiDTO anal in anals) { List <RisultatoDTO> riss = bll.GetRisultatiByAnalId(anal.analidid.Value.ToString()); if (riss != null) { string report = string.Format("Analisi {0} già eseguita! Impossibile Cancellare!", anal.analidid.Value.ToString()); res = false; if (errorString != "") { errorString += "\r\n" + report; } else { errorString += report; } } } } else { string report = string.Format("Esame {0} già refertato! Id referto {1}!", richid, refe.refeidid); res = false; if (errorString != "") { errorString += "\r\n" + report; } else { errorString += report; } } if (errorString == "") { errorString = null; } tw.Stop(); log.Info(string.Format("Completed! Elapsed time {0}", LibString.TimeSpanToTimeHmsms(tw.Elapsed))); return(res); }