示例#1
0
 public async Task <string> ReplaceAppsToken(string MailBody)
 {
     try
     {
         MassMailHelper massMailController = new MassMailHelper();
         return(await massMailController.ReplaceApplicationMailTokens(MailBody));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#2
0
 public async Task <MassMailReportInfo> GetReportByID(int MailID)
 {
     try
     {
         MassMailHelper controllerObj = new MassMailHelper();
         return(await controllerObj.GetReportByID(MailID));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#3
0
 public async Task <IList <MassMailDeliverInfo> > GetAudienceReportByID(int MailID, int OffSet, int Limit, int Types)
 {
     try
     {
         MassMailHelper controllerObj = new MassMailHelper();
         return(await controllerObj.GetMailReportByID(MailID, OffSet, Limit, Types));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#4
0
 public async Task <IList <MassMailInterestInfo> > GetInterest(string Keyword)
 {
     try
     {
         MassMailHelper obj = new MassMailHelper();
         return(await obj.GetInterest(Keyword));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#5
0
 public async Task <int> DeleteMassMail(string massmailID)
 {
     try
     {
         MassMailHelper objController = new MassMailHelper();
         return(await objController.DeleteMassMail(massmailID, GetUsername));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#6
0
        public async Task <IActionResult> AddUpdateMassMail(MassMailAddInfo objMassMail)
        {
            try
            {
                MassMailHelper objController = new MassMailHelper();
                var            status        = await objController.AddUpdateMassMail(objMassMail, GetUsername, HostUrl);

                return(new ObjectResult(status));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#7
0
        public async Task <IActionResult> GetFilterValue()
        {
            try
            {
                MassMailHelper objController = new MassMailHelper();
                var            lstType       = await objController.GetFilterValueList(1);

                return(new ObjectResult(lstType));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#8
0
        public async Task <IActionResult> GetMassMailList(int offset, int limit, int filterTypeID, int status, string mailTitle)
        {
            try
            {
                MassMailHelper obj      = new MassMailHelper();
                var            mailList = await obj.GetMassMailList(offset, limit, filterTypeID, mailTitle, status);

                return(new ObjectResult(mailList));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#9
0
        public async Task <IActionResult> GetAllUsers(string username)
        {
            try
            {
                MassMailHelper objController = new MassMailHelper();
                var            lstUser       = await objController.GetAllUsers(username);

                return(new ObjectResult(lstUser));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#10
0
        public async Task <IActionResult> GetMassMailDetailForEdit(long massmailID)
        {
            try
            {
                MassMailHelper objController = new MassMailHelper();
                var            ds            = await objController.GetMassMailDetailForEdit(massmailID);

                return(new ObjectResult(JsonConvert.SerializeObject(ds, Formatting.Indented)));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#11
0
 public async Task <int> UpdateStausOfFailMail(long MailID, List <RequestSubscriber> Subscribers, string AuthToken)
 {
     try
     {
         SettingHelper settingHelper = new SettingHelper(_memoryCache);
         string        configCode    = settingHelper.GetCachedSettingValue(SettingKeys.Configurecode);
         if (AuthToken == configCode)
         {
             MassMailHelper objController = new MassMailHelper();
             return(await objController.UpdateStausOfFailMail(MailID, Subscribers));
         }
         else
         {
             return(-1);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#12
0
 // This api is invoked by data i/o to fetch mail
 public async Task <SendsEmail> GetMassMail(string ScheduleDate, string AuthToken)
 {
     try
     {
         SettingHelper settingHelper = new SettingHelper(_memoryCache);
         string        configCode    = settingHelper.GetCachedSettingValue(SettingKeys.Configurecode);
         if (AuthToken == configCode)
         {
             MassMailHelper objController = new MassMailHelper();
             return(await objController.GetMailAndUserToSendMail(ScheduleDate));
         }
         else
         {
             return(null);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }