/// <summary>
        /// Prepare paged queued email list model
        /// </summary>
        /// <param name="searchModel">Queued email search model</param>
        /// <returns>Queued email list model</returns>
        public virtual QueuedEmailListModel PrepareQueuedEmailListModel(QueuedEmailSearchModel searchModel)
        {
            if (searchModel == null)
            {
                throw new ArgumentNullException(nameof(searchModel));
            }

            //get parameters to filter emails
            var startDateValue = !searchModel.SearchStartDate.HasValue ? null
                : (DateTime?)_dateTimeHelper.ConvertToUtcTime(searchModel.SearchStartDate.Value, _dateTimeHelper.CurrentTimeZone);
            var endDateValue = !searchModel.SearchEndDate.HasValue ? null
                : (DateTime?)_dateTimeHelper.ConvertToUtcTime(searchModel.SearchEndDate.Value, _dateTimeHelper.CurrentTimeZone).AddDays(1);

            //get queued emails
            var queuedEmails = _queuedEmailService.SearchEmails(fromEmail: searchModel.SearchFromEmail,
                                                                toEmail: searchModel.SearchToEmail,
                                                                createdFromUtc: startDateValue,
                                                                createdToUtc: endDateValue,
                                                                loadNotSentItemsOnly: searchModel.SearchLoadNotSent,
                                                                loadOnlyItemsToBeSent: false,
                                                                maxSendTries: searchModel.SearchMaxSentTries,
                                                                loadNewest: true,
                                                                pageIndex: searchModel.Page - 1, pageSize: searchModel.PageSize);

            //prepare list model
            var model = new QueuedEmailListModel
            {
                Data = queuedEmails.Select(queuedEmail =>
                {
                    //fill in model values from the entity
                    var queuedEmailModel = queuedEmail.ToModel <QueuedEmailModel>();

                    //little performance optimization: ensure that "Body" is not returned
                    queuedEmailModel.Body = string.Empty;

                    //convert dates to the user time
                    queuedEmailModel.CreatedOn = _dateTimeHelper.ConvertToUserTime(queuedEmail.CreatedOnUtc, DateTimeKind.Utc);

                    //fill in additional values (not existing in the entity)
                    //chai
                    //queuedEmailModel.PriorityName = queuedEmail.Priority.GetLocalizedEnum(_localizationService, _workContext);
                    queuedEmailModel.PriorityName = CommonHelper.ConvertEnum(queuedEmail.Priority.ToString());
                    if (queuedEmail.DontSendBeforeDateUtc.HasValue)
                    {
                        queuedEmailModel.DontSendBeforeDate = _dateTimeHelper
                                                              .ConvertToUserTime(queuedEmail.DontSendBeforeDateUtc.Value, DateTimeKind.Utc);
                    }

                    if (queuedEmail.SentOnUtc.HasValue)
                    {
                        queuedEmailModel.SentOn = _dateTimeHelper.ConvertToUserTime(queuedEmail.SentOnUtc.Value, DateTimeKind.Utc);
                    }

                    return(queuedEmailModel);
                }),
                Total = queuedEmails.TotalCount
            };

            return(model);
        }
		public ActionResult List()
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageMessageQueue))
                return AccessDeniedView();

            var model = new QueuedEmailListModel();
            return View(model);
		}
        public ActionResult GoToEmailByNumber(QueuedEmailListModel model)
        {
            var queuedEmail = _queuedEmailService.GetQueuedEmailById(model.GoDirectlyToNumber ?? 0);
			if (queuedEmail != null)
			{
				return RedirectToAction("Edit", "QueuedEmail", new { id = queuedEmail.Id });
			}

			return List();
        }
Ejemplo n.º 4
0
        public IActionResult List()
        {
            var model = new QueuedEmailListModel
            {
                //default value
                SearchMaxSentTries = 10
            };

            return(View(model));
        }
Ejemplo n.º 5
0
        public ActionResult QueuedEmailList(DataTablesParam dataTableParam, QueuedEmailListModel model)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageMessageQueue))
            {
                return(AccessDeniedView());
            }

            DateTime?startDateValue = (model.SearchStartDate == null) ? null
                            : (DateTime?)_dateTimeHelper.ConvertToUtcTime(model.SearchStartDate.Value, _dateTimeHelper.CurrentTimeZone);

            DateTime?endDateValue = (model.SearchEndDate == null) ? null
                            :(DateTime?)_dateTimeHelper.ConvertToUtcTime(model.SearchEndDate.Value, _dateTimeHelper.CurrentTimeZone).AddDays(1);

            //var queuedEmails = _queuedEmailService.SearchEmails(model.SearchFromEmail, model.SearchToEmail,
            //    startDateValue, endDateValue,
            //    model.SearchLoadNotSent, model.SearchMaxSentTries, true,
            //    dataTableParam.PageIndex, dataTableParam.PageSize);

            var q = new SearchEmailsQuery
            {
                EndTime       = endDateValue,
                From          = model.SearchFromEmail,
                MaxSendTries  = model.SearchMaxSentTries,
                OrderByLatest = true,
                PageIndex     = dataTableParam.PageIndex,
                PageSize      = dataTableParam.PageSize,
                SendManually  = model.SearchSendManually,
                StartTime     = startDateValue,
                To            = model.SearchToEmail,
                UnsentOnly    = model.SearchLoadNotSent
            };
            var queuedEmails = _queuedEmailService.SearchEmails(q);
            var total        = queuedEmails.Count();
            var result       = new DataTablesData
            {
                iTotalRecords        = total,
                sEcho                = dataTableParam.sEcho,
                iTotalDisplayRecords = total,
                aaData               = queuedEmails.Select(x =>
                {
                    var m       = x.ToModel();
                    m.CreatedOn = _dateTimeHelper.ConvertToUserTime(x.CreatedOnUtc, DateTimeKind.Utc);
                    if (x.SentOnUtc.HasValue)
                    {
                        m.SentOn = _dateTimeHelper.ConvertToUserTime(x.SentOnUtc.Value, DateTimeKind.Utc);
                    }
                    return(m);
                }).Cast <object>().ToArray(),
            };

            return(new JsonResult
            {
                Data = result
            });
        }
Ejemplo n.º 6
0
        public async Task <IActionResult> GoToEmailByNumber(QueuedEmailListModel model)
        {
            var queuedEmail = await _db.QueuedEmails.FindByIdAsync(model.GoDirectlyToNumber ?? 0, false);

            if (queuedEmail != null)
            {
                return(RedirectToAction(nameof(Edit), "QueuedEmail", new { id = queuedEmail.Id }));
            }

            return(RedirectToAction(nameof(List)));
        }
        public async Task <IActionResult> GoToEmailByNumber(QueuedEmailListModel model)
        {
            var queuedEmail = await _queuedEmailService.GetQueuedEmailById(model.GoDirectlyToNumber);

            if (queuedEmail == null)
            {
                return(List());
            }

            return(RedirectToAction("Edit", "QueuedEmail", new { id = queuedEmail.Id }));
        }
Ejemplo n.º 8
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult List(DataSourceRequest command)
        {
            var model = new QueuedEmailListModel
            {
                //default value
                SearchMaxSentTries = 10
            };

            return(View(model));
            //return View();
        }
        public ActionResult QueuedEmailList(GridCommand command, QueuedEmailListModel model)
        {
            var gridModel = new GridModel <QueuedEmailModel>();

            if (_permissionService.Authorize(StandardPermissionProvider.ManageMessageQueue))
            {
                DateTime?startDateValue = (model.SearchStartDate == null) ? null : (DateTime?)_dateTimeHelper.ConvertToUtcTime(model.SearchStartDate.Value, _dateTimeHelper.CurrentTimeZone);
                DateTime?endDateValue   = (model.SearchEndDate == null) ? null : (DateTime?)_dateTimeHelper.ConvertToUtcTime(model.SearchEndDate.Value, _dateTimeHelper.CurrentTimeZone).AddDays(1);

                var q = new SearchEmailsQuery
                {
                    EndTime       = endDateValue,
                    From          = model.SearchFromEmail,
                    MaxSendTries  = model.SearchMaxSentTries,
                    OrderByLatest = true,
                    PageIndex     = command.Page - 1,
                    PageSize      = command.PageSize,
                    SendManually  = model.SearchSendManually,
                    StartTime     = startDateValue,
                    To            = model.SearchToEmail,
                    UnsentOnly    = model.SearchLoadNotSent
                };
                var queuedEmails = _queuedEmailService.SearchEmails(q);

                gridModel.Data = queuedEmails.Select(x =>
                {
                    var m       = x.ToModel();
                    m.CreatedOn = _dateTimeHelper.ConvertToUserTime(x.CreatedOnUtc, DateTimeKind.Utc);

                    if (x.SentOnUtc.HasValue)
                    {
                        m.SentOn = _dateTimeHelper.ConvertToUserTime(x.SentOnUtc.Value, DateTimeKind.Utc);
                    }

                    return(m);
                });

                gridModel.Total = queuedEmails.TotalCount;
            }
            else
            {
                gridModel.Data = Enumerable.Empty <QueuedEmailModel>();

                NotifyAccessDenied();
            }

            return(new JsonResult
            {
                Data = gridModel
            });
        }
Ejemplo n.º 10
0
        public ActionResult QueuedEmailList(DataSourceRequest command, QueuedEmailListModel model)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageMessageQueue))
            {
                return(AccessDeniedView());
            }

            var startDateValue = (model.SearchStartDate == null)
                ? null
                : (DateTime?)
                                 _dateTimeHelper.ConvertToUtcTime(model.SearchStartDate.Value, _dateTimeHelper.CurrentTimeZone);

            var endDateValue = (model.SearchEndDate == null)
                ? null
                : (DateTime?)
                               _dateTimeHelper.ConvertToUtcTime(model.SearchEndDate.Value, _dateTimeHelper.CurrentTimeZone)
                               .AddDays(1);

            var queuedEmails = _queuedEmailService.SearchEmails(model.SearchFromEmail, model.SearchToEmail,
                                                                startDateValue, endDateValue,
                                                                model.SearchLoadNotSent, model.SearchMaxSentTries, true,
                                                                command.Page - 1, command.PageSize);
            var gridModel = new DataSourceResult
            {
                Data = queuedEmails.Select(x =>
                {
                    var m          = x.ToModel();
                    m.PriorityName = x.Priority.GetLocalizedEnum(_localizationService, _workContext);
                    m.CreatedOn    = _dateTimeHelper.ConvertToUserTime(x.CreatedOnUtc, DateTimeKind.Utc);
                    if (x.SentOnUtc.HasValue)
                    {
                        m.SentOn = _dateTimeHelper.ConvertToUserTime(x.SentOnUtc.Value, DateTimeKind.Utc);
                    }

                    //little hack here:
                    //ensure that email body is not returned
                    //otherwise, we can get the following error if emails have too long body:
                    //"Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property. "
                    //also it improves performance
                    m.Body = "";

                    return(m);
                }),
                Total = queuedEmails.TotalCount
            };

            return(new JsonResult
            {
                Data = gridModel
            });
        }
Ejemplo n.º 11
0
        public ActionResult List()
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageMessageQueue))
            {
                return(AccessDeniedView());
            }

            var model = new QueuedEmailListModel
            {
                //default value
                SearchMaxSentTries = 10
            };

            return(View(model));
        }
Ejemplo n.º 12
0
        public async Task <IActionResult> QueuedEmailList(GridCommand command, QueuedEmailListModel model)
        {
            DateTime?startDateValue = model.SearchStartDate != null
                ? _dateTimeHelper.ConvertToUtcTime(model.SearchStartDate.Value, _dateTimeHelper.CurrentTimeZone)
                : null;

            DateTime?endDateValue = model.SearchEndDate != null
                ? _dateTimeHelper.ConvertToUtcTime(model.SearchEndDate.Value, _dateTimeHelper.CurrentTimeZone).AddDays(1)
                : null;

            var query = _db.QueuedEmails.AsNoTracking()
                        .Include(x => x.EmailAccount)
                        .ApplyTimeFilter(startDateValue, endDateValue, model.SearchLoadNotSent)
                        .ApplyMailAddressFilter(model.SearchFromEmail, model.SearchToEmail)
                        .Where(x => x.SentTries < model.SearchMaxSentTries)
                        .ApplyGridCommand(command, false);

            if (model.SearchSendManually.HasValue)
            {
                query = query.Where(x => x.SendManually == model.SearchSendManually);
            }

            var queuedEmails = await query.ToPagedList(command.Page - 1, command.PageSize).LoadAsync();

            var gridModel = new GridModel <QueuedEmailModel>
            {
                Rows = await queuedEmails.SelectAsync(async x =>
                {
                    var model = new QueuedEmailModel();
                    await MapperFactory.MapAsync(x, model);

                    model.CreatedOn = _dateTimeHelper.ConvertToUserTime(x.CreatedOnUtc, DateTimeKind.Utc);
                    if (x.SentOnUtc.HasValue)
                    {
                        model.SentOn = _dateTimeHelper.ConvertToUserTime(x.SentOnUtc.Value, DateTimeKind.Utc);
                    }

                    model.ViewUrl = Url.Action(nameof(Edit), "QueuedEmail", new { id = x.Id });

                    return(model);
                })
                       .AsyncToList(),

                Total = queuedEmails.TotalCount
            };

            return(Json(gridModel));
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Prepare paged queued email list model
        /// </summary>
        /// <param name="searchModel">Queued email search model</param>
        /// <returns>Queued email list model</returns>
        public virtual QueuedEmailListModel PrepareQueuedEmailListModel(QueuedEmailSearchModel searchModel)
        {
            if (searchModel == null)
            {
                throw new ArgumentNullException(nameof(searchModel));
            }

            //get parameters to filter emails
            var startDateValue = searchModel.SearchStartDate?.ToUniversalTime();
            var endDateValue   = searchModel.SearchEndDate?.ToUniversalTime().AddDays(1);

            //get queued emails
            var queuedEmails = _queuedEmailService.SearchEmails(fromEmail: searchModel.SearchFromEmail,
                                                                toEmail: searchModel.SearchToEmail,
                                                                createdFromUtc: startDateValue,
                                                                createdToUtc: endDateValue,
                                                                loadNotSentItemsOnly: searchModel.SearchLoadNotSent,
                                                                maxSendTries: searchModel.SearchMaxSentTries,
                                                                pageIndex: searchModel.Page - 1, pageSize: searchModel.PageSize);

            //prepare list model
            var model = new QueuedEmailListModel().PrepareToGrid(searchModel, queuedEmails, () =>
            {
                return(queuedEmails.Select(queuedEmail =>
                {
                    //fill in model values from the entity
                    var queuedEmailModel = queuedEmail.ToModel <QueuedEmailModel>();

                    //little performance optimization: ensure that "Body" is not returned
                    queuedEmailModel.Body = string.Empty;

                    //convert dates to the user time
                    queuedEmailModel.CreatedOn = queuedEmail.CreatedOnUtc.ToLocalTime();

                    if (queuedEmail.SentOnUtc.HasValue)
                    {
                        queuedEmailModel.SentOn = queuedEmail.SentOnUtc.Value.ToLocalTime();
                    }

                    return queuedEmailModel;
                }));
            });

            return(model);
        }
        public ActionResult QueuedEmailList(DataSourceRequest command, QueuedEmailListModel model)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageMessageQueue))
            {
                return(AccessDeniedView());
            }

            DateTime?startDateValue = (model.SearchStartDate == null) ? null
                            : (DateTime?)_dateTimeHelper.ConvertToUtcTime(model.SearchStartDate.Value, _dateTimeHelper.CurrentTimeZone);

            DateTime?endDateValue = (model.SearchEndDate == null) ? null
                            :(DateTime?)_dateTimeHelper.ConvertToUtcTime(model.SearchEndDate.Value, _dateTimeHelper.CurrentTimeZone).AddDays(1);

            var queuedEmails = _queuedEmailService.SearchEmails(model.SearchFromEmail, model.SearchToEmail,
                                                                startDateValue, endDateValue,
                                                                model.SearchLoadNotSent, false, model.SearchMaxSentTries, true,
                                                                command.Page - 1, command.PageSize);
            var gridModel = new DataSourceResult
            {
                Data = queuedEmails.Select(x => {
                    var m          = x.ToModel();
                    m.PriorityName = x.Priority.GetLocalizedEnum(_localizationService, _workContext);
                    m.CreatedOn    = _dateTimeHelper.ConvertToUserTime(x.CreatedOnUtc, DateTimeKind.Utc);
                    if (x.DontSendBeforeDateUtc.HasValue)
                    {
                        m.DontSendBeforeDate = _dateTimeHelper.ConvertToUserTime(x.DontSendBeforeDateUtc.Value, DateTimeKind.Utc);
                    }
                    if (x.SentOnUtc.HasValue)
                    {
                        m.SentOn = _dateTimeHelper.ConvertToUserTime(x.SentOnUtc.Value, DateTimeKind.Utc);
                    }

                    //little performance optimization: ensure that "Body" is not returned
                    m.Body = "";

                    return(m);
                }),
                Total = queuedEmails.TotalCount
            };

            return(new JsonResult
            {
                Data = gridModel
            });
        }
Ejemplo n.º 15
0
        public async Task <IActionResult> QueuedEmailList(DataSourceRequest command, QueuedEmailListModel model)
        {
            DateTime?startDateValue = (model.SearchStartDate == null) ? null
                            : (DateTime?)_dateTimeService.ConvertToUtcTime(model.SearchStartDate.Value, _dateTimeService.CurrentTimeZone);

            DateTime?endDateValue = (model.SearchEndDate == null) ? null
                            : (DateTime?)_dateTimeService.ConvertToUtcTime(model.SearchEndDate.Value, _dateTimeService.CurrentTimeZone).AddDays(1);

            var queuedEmails = await _queuedEmailService.SearchEmails(model.SearchFromEmail, model.SearchToEmail, model.SearchText,
                                                                      startDateValue, endDateValue,
                                                                      model.SearchLoadNotSent, false, model.SearchMaxSentTries, true,
                                                                      command.Page - 1, command.PageSize);

            var gridModel = new DataSourceResult
            {
                Data = queuedEmails.Select((Func <QueuedEmail, QueuedEmailModel>)(x =>
                {
                    var m          = x.ToModel();
                    m.PriorityName = TranslateExtensions.GetTranslationEnum <QueuedEmailPriority>(x.PriorityId, (ITranslationService)_translationService, (IWorkContext)_workContext);
                    m.CreatedOn    = _dateTimeService.ConvertToUserTime(x.CreatedOnUtc, DateTimeKind.Utc);
                    if (x.DontSendBeforeDateUtc.HasValue)
                    {
                        m.DontSendBeforeDate = _dateTimeService.ConvertToUserTime(x.DontSendBeforeDateUtc.Value, DateTimeKind.Utc);
                    }
                    if (x.SentOnUtc.HasValue)
                    {
                        m.SentOn = _dateTimeService.ConvertToUserTime(x.SentOnUtc.Value, DateTimeKind.Utc);
                    }
                    if (x.ReadOnUtc.HasValue)
                    {
                        m.ReadOn = _dateTimeService.ConvertToUserTime(x.ReadOnUtc.Value, DateTimeKind.Utc);
                    }

                    m.Body = "";

                    return(m);
                })),
                Total = queuedEmails.TotalCount
            };

            return(Json(gridModel));
        }
Ejemplo n.º 16
0
        public ActionResult DeleteSelected(QueuedEmailListModel model, ICollection <int> checkedRecords)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageMessageQueue))
            {
                return(AccessDeniedView());
            }

            if (checkedRecords != null)
            {
                foreach (var queuedEmailId in checkedRecords)
                {
                    var queuedEmail = _queuedEmailService.GetQueuedEmailById(queuedEmailId);
                    _queuedEmailService.DeleteQueuedEmail(queuedEmail);
                }
            }

            //return View(model);
            //refresh page
            return(List());
        }
Ejemplo n.º 17
0
        public ActionResult QueuedEmailList(DataSourceRequest command, QueuedEmailListModel model)
        {
            DateTime?startDateValue = model.SearchStartDate;
            DateTime?endDateValue   = model.SearchEndDate;
            //DateTime? startDateValue = (model.SearchStartDate == null) ? null
            //               : (DateTime?)_dateTimeHelper.ConvertToUtcTime(model.SearchStartDate.Value, _dateTimeHelper.CurrentTimeZone);

            //DateTime? endDateValue = (model.SearchEndDate == null) ? null
            //                : (DateTime?)_dateTimeHelper.ConvertToUtcTime(model.SearchEndDate.Value, _dateTimeHelper.CurrentTimeZone).AddDays(1);

            //var queuedEmails = _queuedEmailService.GetAllEmails();
            var queuedEmails = _queuedEmailService.SearchEmails(model.SearchFromEmail, model.SearchToEmail,
                                                                startDateValue, endDateValue, model.SearchLoadNotSent, false,
                                                                model.SearchMaxSentTries, true, command.Page - 1, command.PageSize);
            var gridModel = new DataSourceResult
            {
                Data  = queuedEmails,
                Total = queuedEmails.Count()
            };

            return(Json(gridModel));
        }
Ejemplo n.º 18
0
        public ActionResult QueuedEmailList(GridCommand command, QueuedEmailListModel model)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageMessageQueue))
            {
                return(AccessDeniedView());
            }

            DateTime?startDateValue = (model.SearchStartDate == null) ? null : (DateTime?)_dateTimeHelper.ConvertToUtcTime(model.SearchStartDate.Value, _dateTimeHelper.CurrentTimeZone);

            DateTime?endDateValue = (model.SearchEndDate == null) ? null : (DateTime?)_dateTimeHelper.ConvertToUtcTime(model.SearchEndDate.Value, _dateTimeHelper.CurrentTimeZone).AddDays(1);

            var queuedEmails = _queuedEmailService.SearchEmails(model.SearchFromEmail, model.SearchToEmail,
                                                                startDateValue, endDateValue,
                                                                model.SearchLoadNotSent, model.SearchMaxSentTries, true,
                                                                command.Page - 1, command.PageSize, model.SearchSendManually);

            var gridModel = new GridModel <QueuedEmailModel>
            {
                Data = queuedEmails.Select(x =>
                {
                    var m       = x.ToModel();
                    m.CreatedOn = _dateTimeHelper.ConvertToUserTime(x.CreatedOnUtc, DateTimeKind.Utc);

                    if (x.SentOnUtc.HasValue)
                    {
                        m.SentOn = _dateTimeHelper.ConvertToUserTime(x.SentOnUtc.Value, DateTimeKind.Utc);
                    }

                    return(m);
                }),
                Total = queuedEmails.TotalCount
            };

            return(new JsonResult
            {
                Data = gridModel
            });
        }
Ejemplo n.º 19
0
        public IActionResult QueuedEmailList(DataSourceRequest command, QueuedEmailListModel model)
        {
            DateTime?startDateValue = (model.SearchStartDate == null) ? null
                            : (DateTime?)_dateTimeHelper.ConvertToUtcTime(model.SearchStartDate.Value, _dateTimeHelper.CurrentTimeZone);

            DateTime?endDateValue = (model.SearchEndDate == null) ? null
                            :(DateTime?)_dateTimeHelper.ConvertToUtcTime(model.SearchEndDate.Value, _dateTimeHelper.CurrentTimeZone).AddDays(1);

            var queuedEmails = _queuedEmailService.SearchEmails(model.SearchFromEmail, model.SearchToEmail,
                                                                startDateValue, endDateValue,
                                                                model.SearchLoadNotSent, false, model.SearchMaxSentTries, true,
                                                                command.Page - 1, command.PageSize);
            var gridModel = new DataSourceResult
            {
                Data = queuedEmails.Select(x => {
                    var m          = x.ToModel();
                    m.PriorityName = x.Priority.GetLocalizedEnum(_localizationService, _workContext);
                    m.CreatedOn    = _dateTimeHelper.ConvertToUserTime(x.CreatedOnUtc, DateTimeKind.Utc);
                    if (x.DontSendBeforeDateUtc.HasValue)
                    {
                        m.DontSendBeforeDate = _dateTimeHelper.ConvertToUserTime(x.DontSendBeforeDateUtc.Value, DateTimeKind.Utc);
                    }
                    if (x.SentOnUtc.HasValue)
                    {
                        m.SentOn = _dateTimeHelper.ConvertToUserTime(x.SentOnUtc.Value, DateTimeKind.Utc);
                    }

                    m.Body = "";

                    return(m);
                }),
                Total = queuedEmails.TotalCount
            };

            return(Json(gridModel));
        }
Ejemplo n.º 20
0
        public ActionResult List()
        {
            var model = new QueuedEmailListModel();

            return(View(model));
        }