Beispiel #1
0
 public long CopyLayout(long layoutId, string lang)
 {
     try
     {
         TraceMethodCall(layoutId, AvrDbHelper.GetLayoutNameForLog(layoutId), lang);
         EidssAvrServiceInitializer.CheckAndInitEidssCore();
         return(VirtualLayoutCopier.CreateLayoutCopyInAvrService(layoutId, lang, m_Container));
     }
     catch (Exception ex)
     {
         m_Trace.TraceMethodException(ex, Utils.GetCurrentMethodName(), m_TraceTitle);
         string format = EidssMessages.Get("msgCouldNotCreateLayoutCopy", "Could not create layout copy. Layout ID={0}, Language={1}");
         throw new AvrDataException(String.Format(format, layoutId, lang), ex);
     }
 }
Beispiel #2
0
        public void InvalidateViewCache(long layoutId)
        {
            try
            {
                TraceMethodCall(layoutId, AvrDbHelper.GetLayoutNameForLog(layoutId));

                AvrDbHelper.InvalidateViewCache(layoutId);
            }
            catch (Exception ex)
            {
                m_Trace.TraceMethodException(ex, Utils.GetCurrentMethodName(), m_TraceTitle, layoutId);

                string format = EidssMessages.Get("msgCouldNotInvalidateViewCacheAllLang",
                                                  "Could not make view cashe out of date. View ID={0}, All Languages");
                throw new AvrDataException(String.Format(format, layoutId), ex);
            }
        }
Beispiel #3
0
        public ChartExportDTO ExportChartToJpg(ChartTableDTO zippedData)
        {
            try
            {
                string    layoutName = AvrDbHelper.GetLayoutNameForLog(zippedData.ViewId);
                Stopwatch watch      = TraceMethodCall(layoutName, zippedData);
                EidssAvrServiceInitializer.CheckAndInitEidssCore();

                ChartExportDTO result;
                using (new CultureInfoTransaction(new CultureInfo(CustomCultureHelper.SupportedLanguages[zippedData.Lang])))
                {
                    VirtualChart virtualChart = null;
                    try
                    {
                        lock (m_ChartSyncLock)
                        {
                            virtualChart = new VirtualChart(m_Container);
                        }
                        result = virtualChart.ExportChartToJpg(zippedData, m_ChartSyncLock);
                    }
                    finally
                    {
                        if (virtualChart != null)
                        {
                            lock (m_ChartSyncLock)
                            {
                                virtualChart.Dispose();
                            }
                        }
                    }
                }
                TraceMethodCallFinished(watch, layoutName, zippedData);
                return(result);
            }
            catch (Exception ex)
            {
                m_Trace.TraceMethodException(ex, Utils.GetCurrentMethodName(), m_TraceTitle, zippedData);
                string format = EidssMessages.Get("msgCouldNotExportChart",
                                                  "Could not get Export chart from View. ViewID={0}, Lang={1}");
                string msg = String.Format(format, zippedData.ViewId, zippedData.Lang);
                throw new AvrDataException(msg, ex);
            }
        }