BN089-BS开发框架MVC4版/source20131023/Zephyr.Web/Areas/Sys/Template/searchEdit/Controller.cshtml

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

@{
    var area = Model.Area;
    var condtions = Model.Data["conditions"];
    var columns = Model.Data["columns"];
    var controller = Model.Data["controller"];
    var count1 = condtions.Count;
    var count2 = columns.Count;
    var PrimaryKey = Model.PrimaryKeys[0];
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using Zephyr.Core;
using Zephyr.Models;

namespace Zephyr.Areas.@(area).Controllers
{
    public class @(controller)Controller : Controller
    {
        public ActionResult Index()
        {
            var code = new sys_codeService();
            var model = new
            {
                dataSource = new{
                    dsPricing = code.GetValueTextListByType("Pricing")
                },
                urls = new{
                    query = "/api/@area/@controller",
                    newkey = "/api/@area/@controller/getnewkey",
                    edit = "/api/@area/@controller/edit" 
                },
                resx = new{
                    noneSelect = "请先选择一条数据!",
                    editSuccess = "保存成功!",
                    auditSuccess = "单据已审核!"
                },
                form = new{
                @for (var i = 0; i < count1; i++)
                {
                @:    @condtions[i].field = "" @if (i < count1 - 1) {@(",")}
                }
                },
                defaultRow = new {
                   
                },
                setting = new{
                    idField = "@PrimaryKey",
                    postListFields = new string[] { @for (var i = 0; i < count2; i++){<text>"@columns[i].field"</text> if (i < count2 - 1){@(",")} }}
                }
            };

            return View(model);
        }
    }

    public class @(controller)ApiController : ApiController
后面还有 42 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。