/// <summary> /// Get dose route all. /// </summary> /// <param name="passKey">The pass key.</param> /// <returns>List<LexiData.DoseRoute>.</returns> public List <DoseRoute> rx_GetDoseRouteAll(string passKey) { if (!ValidationAndEncryptDecrypt.ValidateKey(passKey)) { return(null); } SqlConnection dbConn = new SqlConnection(); GenericDAL myDal = null; try { dbConn = OpenLexidataConnection(); myDal = GetLexidataDAL(dbConn); var route = myDal.GetDoseRouteAll(); return(route); } catch (Exception e) { StringBuilder sb = new StringBuilder(); sb.AppendLine("Method: rx_GetDoseRouteAll"); sb.AppendLine(""); sb.AppendLine(e.ExceptionToString()); WriteEventLogEntry(sb.ToString()); sb.Clear(); sb.Destroy(); throw; } finally { myDal.Destroy(); CloseConnection(dbConn); } }