/// <summary> /// Get notification email model assembly qualified name by module /// </summary> /// <param name="module"></param> /// <returns></returns> public string GetNotificationEmailModelAssemblyName(NotificationEnums.NotificationModule module) { switch (module) { case NotificationEnums.NotificationModule.Page: return(typeof(NotificationPageEmailModel).AssemblyQualifiedName); } return(string.Empty); }
/// <summary> /// Get all active notification templates of a module /// </summary> /// <param name="module"></param> /// <param name="selectDefault"></param> /// <returns></returns> public IEnumerable <SelectListItem> GetNotificationTemplates(NotificationEnums.NotificationModule module, bool selectDefault = false) { return(Fetch(m => m.Module == module).Select(m => new SelectListItem { Text = m.Name, Value = SqlFunctions.StringConvert((double)m.Id).Trim(), Selected = selectDefault && m.IsDefaultTemplate })); }
public JsonResult GeneratePropertyDropdown(NotificationEnums.NotificationModule module) { var type = _notificationTemplateService.GetNotificationEmailModelAssemblyName(module); var model = _widgetService.GetPropertyListFromType(type); return(Json(new ResponseModel { Success = true, Data = RenderPartialViewToString("Partials/_PropertyDropdown", model) })); }
public NotificationInitializeModel(NotificationEnums.NotificationModule module, dynamic parameters) : this() { Module = module; Parameters = SerializeUtilities.Serialize(parameters); }
public NotificationInitializeModel(NotificationEnums.NotificationModule module, string parameters) : this() { Module = module; Parameters = parameters; }
/// <summary> /// Get default notification template by module /// </summary> /// <param name="module"></param> /// <returns></returns> public NotificationTemplate GetDefaultNotificationTemplate(NotificationEnums.NotificationModule module) { return(FetchFirst(m => m.IsDefaultTemplate && m.Module == module)); }
/// <summary> /// Get notification initialize model /// </summary> /// <param name="module"></param> /// <param name="parameters"></param> /// <returns></returns> public NotificationInitializeModel GetNotificationInitializeModel(NotificationEnums.NotificationModule module, string parameters) { return(new NotificationInitializeModel(module, parameters)); }
public NotificationTemplateSetupModel(NotificationEnums.NotificationModule module) : this() { NotificationTemplates = _notificationTemplateService.GetNotificationTemplates(module); }