Пример #1
0
        private void ClearResourceGridCache(SPItemEventProperties properties)
        {
            try
            {
                string listName = properties.ListTitle.ToLower();

                if (listName.Equals("resources") || listName.Equals("departments"))
                {
                    ResourceGrid.ClearCache(properties.Web);
                }
            }
            catch { }
        }
Пример #2
0
        public override void ItemAdding(SPItemEventProperties properties)
        {
            if (properties?.ListItemId > 0) // This will be true if item recovered from recycle otherwise it will be 0
            {
                return;
            }

            loadData(properties.List, properties.SiteId);

            processItem(properties, true);
            ResourceGrid.ClearCache(properties.Web);
            try
            {
                if (isOnline)
                {
                    cn?.Dispose();
                }
            }
            catch { }
        }