public static IModelBaseChoiceActionItem Model(this ChoiceActionItem choiceActionItem) { var modelAction = ((SingleChoiceAction)choiceActionItem.GetPropertyValue("Owner")).Model; var nodePath = choiceActionItem.GetIdPath(); return((IModelBaseChoiceActionItem)modelAction.ChoiceActionItems.FindNodeByPath(nodePath)); }
public ASPxMenuItemChoiceActionItem(SingleChoiceAction action, ChoiceActionItem item) : base(item, action) { _currentAction = action; CurrentMenuItem = new MenuItem { Name = item.GetIdPath() }; SyncronizeWithItem(); }
private void UpdateItem(ChoiceActionItem item, SingleChoiceAction action){ var nodePath = item.GetIdPath(); var modelChoiceActionItemActive = action.Model.ChoiceActionItems.FindNodeByPath(nodePath) as IModelChoiceActionItemActive; if (modelChoiceActionItemActive != null && modelChoiceActionItemActive.Active!=null) { item.Active.BeginUpdate(); item.Active[GetType().Name] = modelChoiceActionItemActive.Active.Value; item.Active.EndUpdate(); } }
public ASPxMenuItemChoiceActionItem(SingleChoiceAction action, ChoiceActionItem item) : base(item, action) { CurrentAction = action; CurrentMenuItem = new DevExpress.Web.MenuItem { Name = item.GetIdPath() }; //SyncronizeWithItem(); SynchronizeWithItem(); }
private void UpdateItem(ChoiceActionItem item, SingleChoiceAction action) { var nodePath = item.GetIdPath(); var modelChoiceActionItemActive = action.Model.ChoiceActionItems.FindNodeByPath(nodePath) as IModelChoiceActionItemActive; if (modelChoiceActionItemActive != null && modelChoiceActionItemActive.Active != null) { item.Active.BeginUpdate(); item.Active[GetType().Name] = modelChoiceActionItemActive.Active.Value; item.Active.EndUpdate(); } }
public ASPxMenuItemChoiceActionItem(SingleChoiceAction action, ChoiceActionItem item) : base(item, action){ _currentAction = action; CurrentMenuItem = new MenuItem{Name = item.GetIdPath()}; SyncronizeWithItem(); }