src/ZKEACMS.SectionWidget/Controllers/SectionGroupController.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/* http://www.zkea.net/
* Copyright (c) ZKEASOFT. All rights reserved.
* http://www.zkea.net/licenses */
using Easy;
using Easy.Constant;
using Easy.Extend;
using Easy.Mvc;
using Easy.Mvc.Authorize;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using ZKEACMS.PackageManger;
using ZKEACMS.SectionWidget.Models;
using ZKEACMS.SectionWidget.Service;
using ZKEACMS.Widget;
namespace ZKEACMS.SectionWidget.Controllers
{
[DefaultAuthorize]
public class SectionGroupController : Controller
{
private readonly ISectionGroupService _sectionGroupService;
private readonly ISectionContentProviderService _sectionContentProviderService;
private readonly IWidgetBasePartService _widgetService;
private readonly IPackageInstallerProvider _packageInstallerProvider;
private readonly IWidgetActivator _widgetActivator;
private readonly ILocalize _localize;
public SectionGroupController(ISectionGroupService sectionGroupService,
ISectionContentProviderService sectionContentProviderService,
IWidgetBasePartService widgetService, IPackageInstallerProvider packageInstallerProvider,
ILocalize localize,
IWidgetActivator widgetActivator)
{
_sectionGroupService = sectionGroupService;
_sectionContentProviderService = sectionContentProviderService;
_widgetService = widgetService;
_packageInstallerProvider = packageInstallerProvider;
_widgetActivator = widgetActivator;
_localize = localize;
}
public ActionResult Create(string sectionWidgetId)
{
var order = _sectionGroupService.Count(m => m.SectionWidgetId == sectionWidgetId) + 1;
return View("Form", new SectionGroup
{
SectionWidgetId = sectionWidgetId,
ActionType = ActionType.Create,
Order = order,
PartialView = "SectionTemplate.Default",
GroupName = _localize.Get("Group") + " " + order
});
}
public ActionResult Edit(string Id)
{
var group = _sectionGroupService.Get(Id);
group.ActionType = ActionType.Update;
return View("Form", group);
}
后面还有 91 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。