コード例 #1
0
ファイル: Caching.cs プロジェクト: keerthiraja1988/OnionArh_1
 protected virtual void AddDashBoardDetails(string key, DashBoardWidgetCacheModel value)
 {
     lock (padlock)
     {
         DashBoardDetails.Add(key, value, DateTimeOffset.MaxValue);
     }
 }
コード例 #2
0
ファイル: Caching.cs プロジェクト: keerthiraja1988/OnionArh_1
        protected virtual DashBoardWidgetCacheModel GetDashBoardWidgetDetails()
        {
            lock (padlock)
            {
                DashBoardWidgetCacheModel dashBoardWidgetCacheModel = new DashBoardWidgetCacheModel();
                var v = DashBoardDetails;

                foreach (var item in v)
                {
                    dashBoardWidgetCacheModel = (DashBoardWidgetCacheModel)item.Value;
                }

                return(dashBoardWidgetCacheModel);
            }
        }
コード例 #3
0
        public virtual void RefreshDashBoardWidgetDetails()
        {
            string                    sqlConnection             = ConfigurationManager.ConnectionStrings["SQLConnection"].ConnectionString;
            DbConnection              c                         = new SqlConnection(sqlConnection);
            IBeerRepository           i                         = c.As <IBeerRepository>();
            DashBoardWidgetCacheModel dashBoardWidgetCacheModel = new DashBoardWidgetCacheModel();

            dashBoardWidgetCacheModel = i.RefreshDashBoardWidgetDetails();

            List <DashBoardWidgetCacheModel> fileEncryptionDetailsChart = new List <DashBoardWidgetCacheModel>();

            fileEncryptionDetailsChart = i.GetFileEncryptionDetailsForDashBoard();

            dashBoardWidgetCacheModel.FileUploadChartLables = "'" + string.Join("','", fileEncryptionDetailsChart.Select(x => x.FileUploadChartLables)) + "'";

            dashBoardWidgetCacheModel.FileUploadChartData = string.Join(",", fileEncryptionDetailsChart.Select(x => x.FileUploadChartData));


            base.AddDashBoardDetails("Widgets", dashBoardWidgetCacheModel);
        }