Example #1
0
        public ActionResult ManageStaffMemberLeave(int staffMemberId, NotificationCollection notifications = null)
        {
            var action = new LoadStaffMemberAction <ActionResult>(ServiceRegistry)
            {
                OnComplete = (model) =>
                {
                    model.ShowLeave = true;
                    if (notifications.IsNotNull())
                    {
                        model.LeaveErrors = notifications;
                    }
                    return(View("EditStaffMember", model));
                }
            };

            return(action.Invoke(ResolveRestaurantId(), staffMemberId));
        }