コード例 #1
0
        public void executeMenuChoice(StartView.MenuChoice menuChoice)
        {
            //Handles user interface for both types of lists
            ListView listView = new ListView();

            if (menuChoice == StartView.MenuChoice.CompactListMembers)
            {
                listView.showCompactList();
                Helper.MenuChoice choice = listView.goToStartMenu();
                if (choice == Helper.MenuChoice.Back || choice == Helper.MenuChoice.None)
                {
                    StartController startController = new StartController();
                }
            }
            else
            {
                listView.showVerboseList();
                string choice = listView.getChoice();

                if (choice.ToUpper() == "S")
                {
                    StartController startController = new StartController();
                }

                EditMemberController editMemberController = new EditMemberController(choice);
            }
        }
コード例 #2
0
        public void executeMenuChoice()
        {
            MemberDAL memberDAL = new MemberDAL();

            Helper.MenuChoice menuChoice = editBoatView.getEditBoatMenuChoice();

            if (menuChoice == Helper.MenuChoice.Delete)
            {
                memberDAL.deleteBoatById(selectedBoatId, memberId);
            }
            if (menuChoice == Helper.MenuChoice.Edit)
            {
                memberDAL.updateBoatById(editBoatView.editBoat(selectedBoatId), memberId);
            }
            StartController startController = new StartController();
        }
コード例 #3
0
        public void executeMenuChoice(Helper.MenuChoice menuChoice)
        {
            MemberDAL memberDAL = new MemberDAL();

            if (menuChoice == Helper.MenuChoice.Boats)
            {
                EditBoatController editBoatcontroller = new EditBoatController(selectedMember);
            }
            else
            {
                if (menuChoice == Helper.MenuChoice.Delete)
                {
                    memberDAL.deleteMemberById(selectedMember);
                }
                if (menuChoice == Helper.MenuChoice.Edit)
                {
                    editMemberView.showSelectedMemberWithoutBoats(selectedMember);
                    memberDAL.updateMemberById(editMemberView.editMember(selectedMember));
                }

                StartController startController = new StartController();
            }
        }