पर आधारित लिंक छुपाएं Ip.mvc के लिए नया। मैं कर्मचारी डेटा को बनाए रखने के लिए एक पोर्टल विकसित करने की कोशिश कर रहा हूं। मेरे सिस्टम में केवल "प्रबंधक" के पास कर्मचारी बनाने के लिए कठोरता है। मैं में लिंक जब प्रबंधक लॉग कैसे सक्षम और कर्मचारी लॉग में। धन्यवादभूमिका
मेरे देखें
@model IEnumerable<SealManagementPortal_3._0.Models.VOC_CUSTODIAN>
@{
ViewBag.Title = "List of Custodians";
}
<h2>Index</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#list2").jqGrid({
url: '@Url.Action("GridData", "Custodian")',
datatype: 'json',
mtype: 'GET',
colNames: ['Agent ID', 'Branch', 'Unique ID', 'Custodian Name', /*'NRIC No', 'E-Mail', 'Contact No', 'Mobile No',*/'Role', 'Details', 'Edit', 'Delete'],
colModel: [
{ name: 'Agent ID', index: '', width: 10, align: 'left' },
{ name: 'Branch', index: '', width: 10, align: 'left' },
{ name: 'Unique ID', index: '', width: 10, align: 'left' },
{ name: 'Custodian Name', index: '', width: 10, align: 'left' },
{name: 'Role', index: '', width: 10, align: 'left' },
{ name: 'Details', index: '', width: 5, align: 'left' },
{ name: 'Edit', index: '', width: 5, align: 'left' },
{ name: 'Delete', index: '', width: 5, align: 'left'}],
pager: jQuery('#pager2'),
rowNum: 10,
sortname: 'Id',
sortorder: "desc",
viewrecords: true,
autowidth: true,
caption: 'Custodians List'
});
});
</script>
@using (Html.BeginForm())
{
<table id="list2" class="scroll" cellpadding="0" cellspacing="0"></table>
क्या टेम्पलेट में "प्रबंधक" की पुनरावृत्ति से बचने का कोई तरीका है? मैं एक ही स्थान पर भूमिका प्रबंधन करना चाहता हूं और प्राधिकरण विशेषता मेरे साथ बहुत अच्छी है। क्या मैं किसी ऐसे एचटीएमएलहेल्पर को परिभाषित कर सकता हूं जो विशेषता की सामग्री तक पहुंचता है? –