Ejemplo n.º 1
0
        /// <summary>
        /// Called to handle the "add" action.
        /// </summary>
        /// <param name="addedItems"></param>
        /// <returns>True if items were added, false otherwise.</returns>
        protected override bool AddItems(out IList<StaffGroupSummary> addedItems)
        {
            addedItems = new List<StaffGroupSummary>();
            var editor = new StaffGroupEditorComponent();
            var exitCode = LaunchAsDialog(
                this.Host.DesktopWindow,
				new DialogBoxCreationArgs(editor, "Add Staff Group", null, DialogSizeHint.Large));
            if (exitCode == ApplicationComponentExitCode.Accepted)
            {
                addedItems.Add(editor.StaffGroupSummary);
                return true;
            }
            return false;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Called to handle the "edit" action.
        /// </summary>
        /// <param name="items">A list of items to edit.</param>
        /// <param name="editedItems">The list of items that were edited.</param>
        /// <returns>True if items were edited, false otherwise.</returns>
        protected override bool EditItems(IList<StaffGroupSummary> items, out IList<StaffGroupSummary> editedItems)
        {
            editedItems = new List<StaffGroupSummary>();
            var item = CollectionUtils.FirstElement(items);

            var editor = new StaffGroupEditorComponent(item.StaffGroupRef);
            var exitCode = LaunchAsDialog(
                this.Host.DesktopWindow,
				new DialogBoxCreationArgs(editor, "Edit Staff Group - " + item.Name, null, DialogSizeHint.Large));
            if (exitCode == ApplicationComponentExitCode.Accepted)
            {
                editedItems.Add(editor.StaffGroupSummary);
                return true;
            }
            return false;
        }
Ejemplo n.º 3
0
 public EditorContext(StaffGroupEditorComponent owner)
 {
     _owner = owner;
 }