每个用户只能添删改自己的令牌
大石头 authored at 2018-04-02 17:05:46
16.51 KiB
X
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行时版本:4.0.30319.42000
//
//     对此文件的更改可能会导致不正确的行为,并且如果
//     重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

namespace ASP
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Net;
    using System.Text;
    using System.Web;
    using System.Web.Helpers;
    
    #line 6 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
    using System.Web.Mvc;
    
    #line default
    #line hidden
    
    #line 7 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
    using System.Web.Mvc.Ajax;
    
    #line default
    #line hidden
    
    #line 8 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
    using System.Web.Mvc.Html;
    
    #line default
    #line hidden
    
    #line 9 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
    using System.Web.Routing;
    
    #line default
    #line hidden
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.WebPages;
    
    #line 2 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
    using NewLife;
    
    #line default
    #line hidden
    using NewLife.Cube;
    using NewLife.Reflection;
    
    #line 3 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
    using NewLife.Web;
    
    #line default
    #line hidden
    
    #line 4 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
    using XCode;
    
    #line default
    #line hidden
    
    #line 5 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
    using XCode.Configuration;
    
    #line default
    #line hidden
    using XCode.Membership;
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
    [System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Admin/Views/UserToken/_List_Data.cshtml")]
    public partial class _Areas_Admin_Views_UserToken__List_Data_cshtml : System.Web.Mvc.WebViewPage<IList<NewLife.Cube.Entity.UserToken>>
    {
        public _Areas_Admin_Views_UserToken__List_Data_cshtml()
        {
        }
        public override void Execute()
        {
            
            #line 10 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
  
    var fact = ViewBag.Factory as IEntityOperate;
    var page = ViewBag.Page as Pager;
    var fields = ViewBag.Fields as IList<FieldItem>;
    var enableSelect = this.EnableSelect();
    var provider = ManageProvider.Provider;

            
            #line default
            #line hidden
WriteLiteral("\r\n<table");

WriteLiteral(" class=\"table table-bordered table-hover table-striped table-condensed\"");

WriteLiteral(">\r\n    <thead>\r\n        <tr>\r\n");

            
            #line 20 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
            
            
            #line default
            #line hidden
            
            #line 20 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
             if (enableSelect)
            {

            
            #line default
            #line hidden
WriteLiteral("                <th");

WriteLiteral(" class=\"text-center\"");

WriteLiteral(" style=\"width:10px;\"");

WriteLiteral("><input");

WriteLiteral(" type=\"checkbox\"");

WriteLiteral(" id=\"chkAll\"");

WriteLiteral(" title=\"全选\"");

WriteLiteral(" /></th>\r\n");

            
            #line 23 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
            }

            
            #line default
            #line hidden
WriteLiteral("            <th");

WriteLiteral(" class=\"text-center hidden-md hidden-sm hidden-xs\"");

WriteLiteral("><a");

WriteAttribute("href", Tuple.Create(" href=\"", 830), Tuple.Create("\"", 869)
            
            #line 24 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
, Tuple.Create(Tuple.Create("", 837), Tuple.Create<System.Object, System.Int32>(Html.Raw(page.GetSortUrl("ID"))
            
            #line default
            #line hidden
, 837), false)
);

WriteLiteral(">编号</a></th>\r\n            <th");

WriteLiteral(" class=\"text-center\"");

WriteLiteral("><a");

WriteAttribute("href", Tuple.Create(" href=\"", 922), Tuple.Create("\"", 964)
            
            #line 25 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
, Tuple.Create(Tuple.Create("", 929), Tuple.Create<System.Object, System.Int32>(Html.Raw(page.GetSortUrl("Token"))
            
            #line default
            #line hidden
, 929), false)
);

WriteLiteral(">令牌</a></th>\r\n            <th");

WriteLiteral(" class=\"text-center\"");

WriteLiteral(" title=\"地址。锁定该令牌只能访问该资源路径\"");

WriteLiteral("><a");

WriteAttribute("href", Tuple.Create(" href=\"", 1043), Tuple.Create("\"", 1083)
            
            #line 26 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
, Tuple.Create(Tuple.Create("", 1050), Tuple.Create<System.Object, System.Int32>(Html.Raw(page.GetSortUrl("Url"))
            
            #line default
            #line hidden
, 1050), false)
);

WriteLiteral(">地址</a></th>\r\n            <th");

WriteLiteral(" class=\"text-center\"");

WriteLiteral(" title=\"用户。本地用户\"");

WriteLiteral("><a");

WriteAttribute("href", Tuple.Create(" href=\"", 1152), Tuple.Create("\"", 1195)
            
            #line 27 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
, Tuple.Create(Tuple.Create("", 1159), Tuple.Create<System.Object, System.Int32>(Html.Raw(page.GetSortUrl("UserID"))
            
            #line default
            #line hidden
, 1159), false)
);

WriteLiteral(">用户</a></th>\r\n            <th");

WriteLiteral(" class=\"text-center\"");

WriteLiteral(" style=\"min-width:134px;\"");

WriteLiteral("><a");

WriteAttribute("href", Tuple.Create(" href=\"", 1273), Tuple.Create("\"", 1316)
            
            #line 28 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
, Tuple.Create(Tuple.Create("", 1280), Tuple.Create<System.Object, System.Int32>(Html.Raw(page.GetSortUrl("Expire"))
            
            #line default
            #line hidden
, 1280), false)
);

WriteLiteral(">过期时间</a></th>\r\n            <th");

WriteLiteral(" class=\"text-center\"");

WriteLiteral(" title=\"次数。该令牌使用次数\"");

WriteLiteral("><a");

WriteAttribute("href", Tuple.Create(" href=\"", 1390), Tuple.Create("\"", 1432)
            
            #line 29 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
, Tuple.Create(Tuple.Create("", 1397), Tuple.Create<System.Object, System.Int32>(Html.Raw(page.GetSortUrl("Times"))
            
            #line default
            #line hidden
, 1397), false)
);

WriteLiteral(">次数</a></th>\r\n            <th");

WriteLiteral(" class=\"text-center\"");

WriteLiteral("><a");

WriteAttribute("href", Tuple.Create(" href=\"", 1485), Tuple.Create("\"", 1528)
            
            #line 30 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
, Tuple.Create(Tuple.Create("", 1492), Tuple.Create<System.Object, System.Int32>(Html.Raw(page.GetSortUrl("Enable"))
            
            #line default
            #line hidden
, 1492), false)
);

WriteLiteral(">启用</a></th>\r\n            <th");

WriteLiteral(" class=\"text-center\"");

WriteLiteral("><a");

WriteAttribute("href", Tuple.Create(" href=\"", 1581), Tuple.Create("\"", 1630)
            
            #line 31 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
, Tuple.Create(Tuple.Create("", 1588), Tuple.Create<System.Object, System.Int32>(Html.Raw(page.GetSortUrl("UpdateUserID"))
            
            #line default
            #line hidden
, 1588), false)
);

WriteLiteral(">更新用户</a></th>\r\n            <th");

WriteLiteral(" class=\"text-center\"");

WriteLiteral("><a");

WriteAttribute("href", Tuple.Create(" href=\"", 1685), Tuple.Create("\"", 1730)
            
            #line 32 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
, Tuple.Create(Tuple.Create("", 1692), Tuple.Create<System.Object, System.Int32>(Html.Raw(page.GetSortUrl("UpdateIP"))
            
            #line default
            #line hidden
, 1692), false)
);

WriteLiteral(">更新地址</a></th>\r\n            <th");

WriteLiteral(" class=\"text-center\"");

WriteLiteral(" style=\"min-width:134px;\"");

WriteLiteral("><a");

WriteAttribute("href", Tuple.Create(" href=\"", 1810), Tuple.Create("\"", 1857)
            
            #line 33 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
, Tuple.Create(Tuple.Create("", 1817), Tuple.Create<System.Object, System.Int32>(Html.Raw(page.GetSortUrl("UpdateTime"))
            
            #line default
            #line hidden
, 1817), false)
);

WriteLiteral(">更新时间</a></th>\r\n");

            
            #line 34 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
            
            
            #line default
            #line hidden
            
            #line 34 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
             if (this.Has(PermissionFlags.Detail, PermissionFlags.Update, PermissionFlags.Delete))
            {

            
            #line default
            #line hidden
WriteLiteral("                <th");

WriteLiteral(" class=\"text-center\"");

WriteLiteral(" style=\"min-width:100px;\"");

WriteLiteral(">操作</th>\r\n");

            
            #line 37 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
            }

            
            #line default
            #line hidden
WriteLiteral("        </tr>\r\n    </thead>\r\n    <tbody>\r\n");

            
            #line 41 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
        
            
            #line default
            #line hidden
            
            #line 41 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
         foreach (var entity in Model)
        {

            
            #line default
            #line hidden
WriteLiteral("            <tr>\r\n");

            
            #line 44 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
                
            
            #line default
            #line hidden
            
            #line 44 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
                 if (enableSelect)
                {

            
            #line default
            #line hidden
WriteLiteral("                    <td");

WriteLiteral(" class=\"text-center\"");

WriteLiteral("><input");

WriteLiteral(" type=\"checkbox\"");

WriteLiteral(" name=\"keys\"");

WriteAttribute("value", Tuple.Create(" value=\"", 2322), Tuple.Create("\"", 2340)
            
            #line 46 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
      , Tuple.Create(Tuple.Create("", 2330), Tuple.Create<System.Object, System.Int32>(entity.ID
            
            #line default
            #line hidden
, 2330), false)
);

WriteLiteral(" /></td>\r\n");

            
            #line 47 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
                }

            
            #line default
            #line hidden
WriteLiteral("                <td");

WriteLiteral(" class=\"text-center hidden-md hidden-sm hidden-xs\"");

WriteLiteral(">");

            
            #line 48 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
                                                                 Write(entity.ID);

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                <td>");

            
            #line 49 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
               Write(entity.Token);

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                <td>");

            
            #line 50 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
               Write(entity.Url);

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                <td");

WriteLiteral(" class=\"text-right\"");

WriteLiteral(">");

            
            #line 51 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
                                  Write(entity.UserID.ToString("n0"));

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                <td>");

            
            #line 52 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
               Write(entity.Expire.ToFullString(""));

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                <td");

WriteLiteral(" class=\"text-right\"");

WriteLiteral(">");

            
            #line 53 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
                                  Write(entity.Times.ToString("n0"));

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                <td");

WriteLiteral(" class=\"text-center\"");

WriteLiteral(">\r\n                    <i");

WriteAttribute("class", Tuple.Create(" class=\"", 2806), Tuple.Create("\"", 2868)
, Tuple.Create(Tuple.Create("", 2814), Tuple.Create("glyphicon", 2814), true)
, Tuple.Create(Tuple.Create(" ", 2823), Tuple.Create("glyphicon-", 2824), true)
            
            #line 55 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
, Tuple.Create(Tuple.Create("", 2834), Tuple.Create<System.Object, System.Int32>(entity.Enable ? "ok" : "remove"
            
            #line default
            #line hidden
, 2834), false)
);

WriteAttribute("style", Tuple.Create(" style=\"", 2869), Tuple.Create("\"", 2919)
, Tuple.Create(Tuple.Create("", 2877), Tuple.Create("color:", 2877), true)
            
            #line 55 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
                    , Tuple.Create(Tuple.Create(" ", 2883), Tuple.Create<System.Object, System.Int32>(entity.Enable ? "green" : "red"
            
            #line default
            #line hidden
, 2884), false)
, Tuple.Create(Tuple.Create("", 2918), Tuple.Create(";", 2918), true)
);

WriteLiteral("></i>\r\n                </td>\r\n                <td");

WriteLiteral(" class=\"text-right\"");

WriteLiteral(">");

            
            #line 57 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
                                  Write(provider.FindByID(entity.UpdateUserID));

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                <td");

WriteAttribute("title", Tuple.Create(" title=\"", 3054), Tuple.Create("\"", 3092)
            
            #line 58 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
, Tuple.Create(Tuple.Create("", 3062), Tuple.Create<System.Object, System.Int32>(entity.UpdateIP.IPToAddress()
            
            #line default
            #line hidden
, 3062), false)
);

WriteLiteral(">");

            
            #line 58 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
                                                      Write(entity.UpdateIP);

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                <td>");

            
            #line 59 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
               Write(entity.UpdateTime.ToFullString(""));

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n");

            
            #line 60 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
                
            
            #line default
            #line hidden
            
            #line 60 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
                 if (this.Has(PermissionFlags.Detail, PermissionFlags.Update, PermissionFlags.Delete))
                {

            
            #line default
            #line hidden
WriteLiteral("                    <td");

WriteLiteral(" class=\"text-center\"");

WriteLiteral(">\r\n");

WriteLiteral("                        ");

            
            #line 63 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
                   Write(Html.Partial("_List_Data_Action", (Object)entity));

            
            #line default
            #line hidden
WriteLiteral("\r\n                    </td>\r\n");

            
            #line 65 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
                }

            
            #line default
            #line hidden
WriteLiteral("            </tr>\r\n");

            
            #line 67 "..\..\Areas\Admin\Views\UserToken\_List_Data.cshtml"
        }

            
            #line default
            #line hidden
WriteLiteral("    </tbody>\r\n</table>");

        }
    }
}
#pragma warning restore 1591