这是一个用于桌面的 C# WPF 应用程序。我创建了一个自定义属性类,但在调试中它永远不会进入那里。我需要在这个类中添加其他东西吗?
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class Authentication : Attribute, IPrincipal
{
public Authentication(string id)
{
throw new NotImplementedException();
}
public IIdentity Identity { get; private set; }
public bool IsInRole(string role)
{
throw new NotImplementedException();
}
}
Run Code Online (Sandbox Code Playgroud)
方法是:
[Authentication(SecurityConstants.DataEntrySupervisor)]
[Authentication(SecurityConstants.DataVerificationClerk)]
public void Submit(EventObject eventObject)
{//////////}
Run Code Online (Sandbox Code Playgroud) 我正在尝试在jQuery ui对话框窗口中显示部分视图,但我对加载功能没有太多运气.对话框窗口打开但我没有看到局部视图的内容.
JS代码位于外部js文件中.警报显示.
$(document).ready(function () {
$('#dialog-modal').dialog({
autoOpen: false,
//width: 200,
height: 400,
modal: true,
open: function (event, ui) {
//alert("test");
$(this).load("@Url.Action(\"OpenDialogWindow\", \"Home\" )");
}
});
});
Run Code Online (Sandbox Code Playgroud)
================================================== ================
我的div在这样的母版页上.
<div id="dialog-modal" title="Select a city to see the listings"> </div>
Run Code Online (Sandbox Code Playgroud)
========================
我的ActionResult看起来像这样.我确实将视图设置为局部视图.
public ActionResult OpenDialogWindow()
{
return PartialView("DialogView");
}
Run Code Online (Sandbox Code Playgroud)
========================
我的观点看起来像这样.
@using TheSGroup_Web.ViewModels
@model CitiesViewModel
<p>this is the content.
</p>
Run Code Online (Sandbox Code Playgroud)