public NotificationGetAllInfo NotificationGetAll(AspxCommonInfo aspxCommonObj) { try { NotificationGetAllInfo listInfo = AdminNotificationController.NotificationGetAll(aspxCommonObj.StoreID, aspxCommonObj.PortalID); return(listInfo); } catch (Exception e) { throw e; } }
public static void UpdateAdminNotifications(int StoreID, int PortalID) { try { AspxCommonInfo aspxCommonObj = new AspxCommonInfo(); aspxCommonObj.StoreID = StoreID; aspxCommonObj.PortalID = PortalID; NotificationGetAllInfo listInfo = AdminNotificationController.NotificationGetAll(aspxCommonObj.StoreID, aspxCommonObj.PortalID); IHubContext hubContext = GlobalHost.ConnectionManager.GetHubContext <RealTimeHub>(); hubContext.Clients.All.NotificationGetAllSuccess(listInfo); } catch (Exception) { //TODO } }
public void NotificationUsersGetAll(int StoreID, int PortalID, int Type) { try { AspxCommonInfo aspxCommonObj = new AspxCommonInfo(); aspxCommonObj.StoreID = StoreID; aspxCommonObj.PortalID = PortalID; NotificationGetAllInfo listInfo = new NotificationGetAllInfo(); switch (Type) { case 1: List <OutOfStockInfo> ni = AdminNotificationController.NotificationItemsGetAll(aspxCommonObj); listInfo.ItemsInfoCount = ni.Count; break; case 2: List <NotificationOrdersInfo> no = AdminNotificationController.NotificationOrdersGetAll(aspxCommonObj); listInfo.NewOrdersCount = no.Count; break; case 3: List <SubscriptionInfo> nu = AdminNotificationController.NotificationUsersGetAll(aspxCommonObj); listInfo.UsersInfoCount = nu.Count; break; case 4: listInfo = AdminNotificationController.NotificationGetAll(StoreID, PortalID);; break; default: listInfo = AdminNotificationController.NotificationGetAll(StoreID, PortalID);; break; } IHubContext hubContext = GlobalHost.ConnectionManager.GetHubContext("_aspxrthub"); hubContext.Clients.Group("aspx_rt_users").NotificationGetAllSuccess(listInfo); } catch (Exception e) { throw e; } }