Example #1
0
        public async Task <IList <AdvanceFilterInfo> > GetAdvanceFilters(int SiteID)
        {
            NL_Provider provider = new NL_Provider();
            DataSet     ds       = await provider.GetAdvanceFilters(SiteID);

            List <AdvanceFilterInfo> finalList = new List <AdvanceFilterInfo>();

            for (int i = 0; i < ds.Tables.Count; i++)
            {
                IList <AdvanceFilterTempInfo> infos = DataSourceHelper.FillCollection <AdvanceFilterTempInfo>(ds.Tables[i]);

                AdvanceFilterInfo info = new AdvanceFilterInfo
                {
                    AppName      = infos[0].AppName,
                    CategoryName = infos[0].CategoryName,
                    InputType    = infos[0].InputType
                };

                List <string> lstKeyword = infos.Select(x => x.KeyWord).Distinct().ToList();
                info.FilterList = lstKeyword;

                finalList.Add(info);
            }
            return(finalList);
        }
Example #2
0
        //GetInterestForCampaign
        public async Task <IList <InterestInfo> > GetInterestForCampaign(int SiteID)
        {
            NL_Provider provider = new NL_Provider();
            DataSet     ds       = await provider.GetInterestForCampaign(SiteID);

            List <InterestInfo>      finalList = new List <InterestInfo>();
            IList <InterestTempInfo> infos     = new List <InterestTempInfo>();

            if (ds.Tables.Count > 0)
            {
                infos = DataSourceHelper.FillCollection <InterestTempInfo>(ds.Tables[0]);

                List <string> appNames = infos.Select(x => x.AppName).Distinct().ToList();

                foreach (string appName in appNames)
                {
                    List <InterestTempInfo> tempInfos  = infos.ToList <InterestTempInfo>().FindAll(x => x.AppName == appName);
                    List <string>           categories = tempInfos.Select(x => x.CategoryName).Distinct().ToList();
                    foreach (string category in categories)
                    {
                        List <InterestTempInfo> tempCatInfos = tempInfos.FindAll(x => x.CategoryName == category);
                        List <string>           keywords     = tempCatInfos.Select(x => x.KeyWord).ToList();
                        InterestInfo            objInfo      = new InterestInfo();
                        objInfo.AppName      = appName;
                        objInfo.CategoryName = category;
                        objInfo.KeyWordList  = keywords;
                        finalList.Add(objInfo);
                    }
                }
            }
            return(finalList);
        }
Example #3
0
 public async Task <int> UnSubscribeByEmailLink(string UniqueCode, string Reason)
 {
     try
     {
         NL_Provider provider = new NL_Provider();
         return(await provider.UnSubscribeByEmailLink(UniqueCode, Reason));
     }
     catch
     {
         throw;
     }
 }
Example #4
0
 public async Task <int> SaveEmailSubscriber(NL_UserInfo objInfo)
 {
     try
     {
         NL_Provider cont = new NL_Provider();
         return(await cont.SaveEmailSubscriber(objInfo));
     }
     catch
     {
         throw;
     }
 }
Example #5
0
        public async Task <NL_UserInfo> GetByEmail(string EmailAddress)
        {
            NL_Provider provider = new NL_Provider();

            return(await provider.GetByEmail(EmailAddress));
        }
Example #6
0
 public async Task DeleteMultImportedUser(string subscriberID)
 {
     NL_Provider provider = new NL_Provider();
     await provider.DeleteMultImportedUser(subscriberID);
 }
Example #7
0
 public async Task DeleteImportUserByID(int subscriberID)
 {
     NL_Provider provider = new NL_Provider();
     await provider.DeleteImportUserByID(subscriberID);
 }
Example #8
0
        public async Task <ImportUserInfo> GetImportedUserByID(int subscriberID)
        {
            NL_Provider provider = new NL_Provider();

            return(await provider.GetImportUserByID(subscriberID));
        }
Example #9
0
        public async Task <IList <ImportUserInfo> > GetAllImportUser(string searchKey, int offset, int limit, int isImported, int isSubscribed)
        {
            NL_Provider provider = new NL_Provider();

            return(await provider.GetAllImportUser(searchKey, offset, limit, isImported, isSubscribed));
        }