Exemplo n.º 1
0
 public static NotificationGetAllInfo NotificationGetAll(AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameterCollection = CommonParmBuilder.GetParamSP(aspxCommonObj);
         SQLHandler             sqlH     = new SQLHandler();
         NotificationGetAllInfo listInfo = sqlH.ExecuteAsObject <NotificationGetAllInfo>("[dbo].[usp_Aspx_NotificationGetAll]", parameterCollection);
         return(listInfo);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Exemplo n.º 2
0
        public static NotificationGetAllInfo NotificationGetAll(int StoreID, int PortalID)
        {
            try
            {
                AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
                aspxCommonObj.StoreID  = StoreID;
                aspxCommonObj.PortalID = PortalID;

                NotificationGetAllInfo listInfo = AdminNotificationProvider.NotificationGetAll(aspxCommonObj);
                return(listInfo);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Exemplo n.º 3
0
        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;
            }
        }