예제 #1
0
        public async Task <IActionResult> SaveReply(TReply reply)
        {
            if (ModelState.IsValid)
            {
                await _comReplyRepo.SaveReply(reply);

                await _mailService.MailForReply(reply);

                return(RedirectToAction("Details", "Blog", new { @id = reply.EntryId }));
            }
            ModelState.Clear();
            return(RedirectToAction("Details", "Blog", new { @id = reply.EntryId }));
        }
        public async Task <bool> SaveReply(TReply reply)
        {
            try
            {
                _context.Add(reply);
                await _context.SaveChangesAsync();

                return(true);
            }
            catch
            {
                return(false);
            }
        }
예제 #3
0
        public async Task <bool> MailForReply(TReply reply)
        {
            string header = await FindEntryHeader(reply.EntryId);

            try
            {
                await ConfigureMail();

                MailMessage message = new MailMessage(reply.Email, mailInfo.Mail2,
                                                      reply.Name + " web sitende " + header + " başlıklı yazının " + reply.CommentId +
                                                      " no'lu yorumuna cevap verdi."
                                                      , reply.Email + " adresinden gelen cevap:<br/>" + reply.ReplyText);
                message.IsBodyHtml = true;
                emailClient.Send(message);
                return(true);
            }
            catch
            {
                return(false);
            }
        }
예제 #4
0
파일: RrChannels.cs 프로젝트: smeoow/Naive
 public async Task Reply(TReply reply)
 {
     await Channel.SendMsg(Converter(reply)).CAF();
 }
예제 #5
0
 public static Flow <TQuery, TReply> Create(TQuery query, TReply, reply) where /* constraint */
 {
     return(new Flow <TQuery, TReply> (query, reply));
 }