@{ var scope = ViewBag.ControllerScope as string; }
@foreach (var prop in ViewData.ModelMetadata.Properties.Where(pm => pm.ShowForEdit && !pm.HideSurroundingHtml)) { if(scope=="Organ"&&prop.PropertyName=="OrganId") { continue; } var uihit = prop.DataTypeName ?? prop.TemplateHint;
@Html.Label(prop.PropertyName, prop.GetDisplayName() + ":", new { @class = "col-sm-2 col-form-label" })
@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, uihit) }
}