本文整理汇总了C#中NakedObjects.Web.Mvc.Models.ObjectAndControlData类的典型用法代码示例。如果您正苦于以下问题:C# ObjectAndControlData类的具体用法?C# ObjectAndControlData怎么用?C# ObjectAndControlData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectAndControlData类属于NakedObjects.Web.Mvc.Models命名空间,在下文中一共展示了ObjectAndControlData类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EditObject
public virtual ActionResult EditObject(ObjectAndControlData controlData, FormCollection form) {
Decrypt(form);
controlData.Form = form;
var nakedObject = controlData.GetNakedObject(Facade);
SetExistingCollectionFormats(form);
if (nakedObject.IsNotPersistent) {
RefreshTransient(nakedObject, form);
}
switch (controlData.SubAction) {
case (ObjectAndControlData.SubActionType.Action):
SetNewCollectionFormats(controlData);
return ActionOnNotPersistentObject(controlData);
case (ObjectAndControlData.SubActionType.None):
AddAttemptedValuesNew(nakedObject, controlData);
return View("ObjectEdit", nakedObject.GetDomainObject());
case (ObjectAndControlData.SubActionType.Pager):
SetNewCollectionFormats(controlData);
return AppropriateView(controlData, nakedObject);
case (ObjectAndControlData.SubActionType.Redisplay):
return Redisplay(controlData);
}
Log.ErrorFormat("SubAction handling not implemented in EditObject for {0}", controlData.SubAction.ToString());
throw new NotImplementedException(controlData.SubAction.ToString());
}
示例2: ClearHistoryOthers
public virtual ActionResult ClearHistoryOthers(string id, ObjectAndControlData controlData) {
var nakedObject = GetNakedObjectFromId(id);
Session.RemoveOthersFromCache(Facade, nakedObject.GetDomainObject(), ObjectCache.ObjectFlag.BreadCrumb);
SetNewCollectionFormats(controlData);
SetControllerName(nakedObject.GetDomainObject());
return AppropriateView(controlData, nakedObject);
}
示例3: Details
public virtual ActionResult Details(ObjectAndControlData controlData) {
Debug.Assert(controlData.SubAction == ObjectAndControlData.SubActionType.Details ||
controlData.SubAction == ObjectAndControlData.SubActionType.None);
var nakedObject = controlData.GetNakedObject(Facade);
nakedObject = FilterCollection(nakedObject, controlData);
SetNewCollectionFormats(controlData);
return AppropriateView(controlData, nakedObject);
}
示例4: Cancel
public virtual ActionResult Cancel(string nextId, ObjectAndControlData controlData) {
var nextNakedObject = string.IsNullOrEmpty(nextId) ? null : GetNakedObjectFromId(nextId);
if (nextNakedObject == null) {
return RedirectToAction(IdConstants.IndexAction, IdConstants.HomeName);
}
SetNewCollectionFormats(controlData);
SetControllerName(nextNakedObject.GetDomainObject());
return AppropriateView(controlData, nextNakedObject);
}
示例5: Cancel
public override ActionResult Cancel(string nextId, ObjectAndControlData controlData) {
return base.Cancel(nextId, controlData);
}
示例6: ClearHistoryItem
public override ActionResult ClearHistoryItem(string id, string nextId, ObjectAndControlData controlData) {
return base.ClearHistoryItem(id, nextId, controlData);
}
示例7: EditObject
public override ActionResult EditObject(ObjectAndControlData controlData)
{
return base.EditObject(controlData);
}
示例8: ClearHistoryOthers
public override ActionResult ClearHistoryOthers(string id, ObjectAndControlData controlData) {
return base.ClearHistoryOthers(id, controlData);
}
示例9: Details
public override ActionResult Details(ObjectAndControlData controlData)
{
return base.Details(controlData);
}
示例10: Action
public override ActionResult Action(ObjectAndControlData controlData)
{
return base.Action(controlData);
}