EasyUi+mvc增删改查

1.首先得下载EasyUi包。


2.前端html代码如下:

@*
    For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
    ViewBag.Title = "拍卖会列表";
    Layout = null;
}

@using Microsoft.AspNetCore.Html
<!doctype html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>518大学生创业拍卖会</title>
    <script src="~/js/jquery-2.2.0.min.js"></script>

    <script src="~/js/jquery-easyui-1.5.1/jquery.easyui.min.js"></script>
    <link href="~/js/jquery-easyui-1.5.1/themes/color.css" rel="stylesheet" />
    <link href="~/js/jquery-easyui-1.5.1/demo/demo.css" rel="stylesheet" />
    <link href="~/js/jquery-easyui-1.5.1/themes/icon.css" rel="stylesheet" />
    <link href="~/js/jquery-easyui-1.5.1/themes/metro/easyui.css" rel="stylesheet" />
 
    <style type="text/css">
        #fm {
            margin: 0;
            padding: 10px 30px;
        }


        .ftitle {
            font-size: 14px;
            font-weight: bold;
            color: #666;
            padding: 5px 0;
            margin-bottom: 10px;
            border-bottom: 1px solid #ccc;
        }


        .fitem {
            margin-bottom: 5px;
        }


            .fitem label {
                display: inline-block;
                width: 80px;
            }
    </style>
    <script type="text/JavaScript">
        $(document).ready(function () {
            $('#tt').datagrid({
                //
                width: '100%',
                height: '500px',
                url: "/test0703/Load", //接收从控制器传回来的load方法的数据
                columns: [[
                { field: 'Id', title: '编号' },
                { field: 'MeetName', title: '拍卖会名称', width: 200 },
                { field: 'Creater', title: '发布人', width: 200 },
                { field: 'Desc', title: '简介', width: 200 }
                //{ field: 'Remark', title: '备注', width: 200 }
            ]],
                toolbar: [{
                    text: "添加",
                    iconCls: "icon-add",
                    handler: function () {
                        newStudent();
                    }
                }, "-", {
                    text: "修改",
                    iconCls: "icon-edit",
                    handler: function () {
                        // edit();
                        editUser();
                    }
                }, "-", {
                    text: '删除',
                    iconCls: 'icon-remove',
                    handler: function () {
                        destroyUser();
                    }
                }
            ],
                singleSelect: true,
                pagination: true
                //  rownumbers: true
            });
        });

        //  -- -- -- -- -- -- -- --

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值