public MirthResponseDTO NewRequest(RichiestaLISDTO rich, List <AnalisiDTO> anals, ref string errorString) { Stopwatch tw = new Stopwatch(); tw.Start(); log.Info(string.Format("Starting ...")); MirthResponseDTO data = null; if (errorString == null) { errorString = ""; } try { if (!bll.StoreNewRequest(rich, anals, ref errorString)) { throw new Exception(errorString); } data = bll.SubmitNewRequest(rich.richidid, ref errorString); } catch (Exception ex) { string msg = "An Error occured! Exception detected!"; log.Info(msg); log.Error(msg + "\n" + ex.Message); } if (errorString == "") { errorString = null; } tw.Stop(); log.Info(string.Format("Completed! Elapsed time {0}", LibString.TimeSpanToTimeHmsms(tw.Elapsed))); return(data); }