當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。