You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
923 B
22 lines
923 B
@{
|
|
var scope = ViewBag.ControllerScope as string;
|
|
var props = ViewData.ModelMetadata.Properties.Where(pm => pm.ShowForEdit && !pm.HideSurroundingHtml && !pm.IsComplexType && !pm.IsCollectionType && pm.PropertyName != "Id").ToList();
|
|
foreach (var prop in props)
|
|
{
|
|
if(scope=="Organ"&&prop.PropertyName=="OrganId")
|
|
{
|
|
continue;
|
|
}
|
|
var templateName = prop.DataTypeName ?? prop.TemplateHint ?? (prop.ModelType == typeof(string) ? typeof(string).Name : null);
|
|
<td style="max-width:10em;" data-ext="@templateName">
|
|
@if (prop.UnderlyingOrModelType == typeof(bool))
|
|
{
|
|
@Html.CheckBox(prop.PropertyName, new { disabled = "disabled", style = "width:20px;height:20px;margin:2px 0;" })
|
|
}
|
|
else
|
|
{
|
|
@Html.Display(prop.PropertyName, templateName)
|
|
}
|
|
</td>
|
|
}
|
|
} |