private ActionResult View(INakedObject nakedObject) { string viewName = nakedObject.IsViewModelEditView() ? "ViewModel" : "ObjectView"; return View(viewName, nakedObject.Object); }
private ActionResult View(INakedObject nakedObject) { string viewName = nakedObject.IsViewModelEditView() ? "ViewModel" : "ObjectView"; return(View(viewName, nakedObject.Object)); }
internal static MvcHtmlString BuildEditContainer(this HtmlHelper html, INakedObject nakedObject, IEnumerable<ElementDescriptor> elements, string cls, string id) { TagBuilder fieldSet = AddClassAndIdToElementSet(elements, cls, id); AddAjaxDataUrlsToElementSet(html, nakedObject, fieldSet); fieldSet.InnerHtml += html.Hidden(IdHelper.GetDisplayFormatId(id), ToNameValuePairs(html.GetDisplayStatuses())); fieldSet.InnerHtml += nakedObject.IsViewModelEditView() ? "" : GetSubmitButton(IdHelper.SaveButtonClass, MvcUi.Save, string.Empty, new RouteValueDictionary()); return MvcHtmlString.Create(fieldSet.ToString()); }