public ActionResult List(GridCommand command, MessageTemplateListModel model)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageMessageTemplates))
                return AccessDeniedView();

			var messageTemplates = _messageTemplateService.GetAllMessageTemplates(model.SearchStoreId);
			var gridModel = new GridModel<MessageTemplateModel>
			{
				Data = messageTemplates.Select(x => x.ToModel()),
				Total = messageTemplates.Count
			};
            return new JsonResult
            {
                Data = gridModel
            };
        }
        public ActionResult List()
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageMessageTemplates))
                return AccessDeniedView();

			var model = new MessageTemplateListModel();

			//stores
			model.AvailableStores.Add(new SelectListItem() { Text = _localizationService.GetResource("Admin.Common.All"), Value = "0" });
			foreach (var s in _storeService.GetAllStores())
				model.AvailableStores.Add(new SelectListItem() { Text = s.Name, Value = s.Id.ToString() });

			return View(model);
        }