当前位置: 首页>>代码示例>>C#>>正文


C# Models.ObjectAndControlData类代码示例

本文整理汇总了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());
        }
开发者ID:priaonehaha,项目名称:NakedObjectsFramework,代码行数:26,代码来源:GenericControllerImpl.cs

示例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);
 }
开发者ID:priaonehaha,项目名称:NakedObjectsFramework,代码行数:7,代码来源:SystemControllerImpl.cs

示例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);
        }
开发者ID:priaonehaha,项目名称:NakedObjectsFramework,代码行数:9,代码来源:GenericControllerImpl.cs

示例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);
        }
开发者ID:priaonehaha,项目名称:NakedObjectsFramework,代码行数:11,代码来源:SystemControllerImpl.cs

示例5: Cancel

 public override ActionResult Cancel(string nextId, ObjectAndControlData controlData) {
     return base.Cancel(nextId, controlData);
 }
开发者ID:priaonehaha,项目名称:NakedObjectsFramework,代码行数:3,代码来源:HomeController.cs

示例6: ClearHistoryItem

 public override ActionResult ClearHistoryItem(string id, string nextId, ObjectAndControlData controlData) {
     return base.ClearHistoryItem(id, nextId, controlData);
 }
开发者ID:priaonehaha,项目名称:NakedObjectsFramework,代码行数:3,代码来源:HomeController.cs

示例7: EditObject

 public override ActionResult EditObject(ObjectAndControlData controlData)
 {
     return base.EditObject(controlData);
 }
开发者ID:restfulobjects,项目名称:restfulobjects-wsa,代码行数:4,代码来源:GenericController.cs

示例8: ClearHistoryOthers

 public override ActionResult ClearHistoryOthers(string id, ObjectAndControlData controlData) {
     return base.ClearHistoryOthers(id, controlData);
 }
开发者ID:priaonehaha,项目名称:NakedObjectsFramework,代码行数:3,代码来源:HomeController.cs

示例9: Details

 public override ActionResult Details(ObjectAndControlData controlData)
 {
     return base.Details(controlData);
 }
开发者ID:restfulobjects,项目名称:restfulobjects-wsa,代码行数:4,代码来源:GenericController.cs

示例10: Action

 public override ActionResult Action(ObjectAndControlData controlData)
 {
     return base.Action(controlData);
 }
开发者ID:restfulobjects,项目名称:restfulobjects-wsa,代码行数:4,代码来源:GenericController.cs


注:本文中的NakedObjects.Web.Mvc.Models.ObjectAndControlData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。