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);
            }
        }
        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);
            }
        }
 public void showSelectedBoat()
 {
     selectedBoatId = editBoatView.getSelectedBoat();
     if(selectedBoatId.ToUpper() == "S"){
         StartController startController = new StartController();
     }
     editBoatView.showEditBoatMenu(selectedBoatId, member.MemberID);
 }
        public void saveBoat()
        {
            MemberDAL memberDAL = new MemberDAL();
            addBoatView.addBoat(member);

            //Save boat and go back to main menu
            //memberDAL.saveBoat(newBoat, choice);
            StartController startController = new StartController();
        }
        public void addNewMember()
        {
            AddMemberView addMemberView = new AddMemberView();
            MemberDAL     memberDAL     = new MemberDAL();

            //Save member and go back to main menu
            memberDAL.saveMember(addMemberView.showAddMemberView());
            StartController startController = new StartController();
        }
 public void showSelectedBoat()
 {
     selectedBoatId = editBoatView.getSelectedBoat();
     if (selectedBoatId.ToUpper() == "S")
     {
         StartController startController = new StartController();
     }
     editBoatView.showEditBoatMenu(selectedBoatId, memberId);
 }
Beispiel #7
0
        public void saveBoat()
        {
            MemberDAL memberDAL = new MemberDAL();
            Boat      newBoat   = boatView.addBoat(choice);

            //Save boat and go back to main menu
            memberDAL.saveBoat(newBoat, choice);
            StartController startController = new StartController();
        }
        public void addNewMember()
        {
            AddMemberView addMemberView  = new AddMemberView();
            MemberDAL memberDAL = new MemberDAL();

            //Save member and go back to main menu
            memberDAL.saveMember(addMemberView.showAddMemberView());
            StartController startController = new StartController();
        }
 public AddBoatController()
 {
     this.addBoatView = new AddBoatView();
     addBoatView.showAddBoatMenu();
     addBoatView.showMemberList();
     member = addBoatView.getSelectedMember();
     if (member != null)
     {
         saveBoat();
     }
     else {
         StartController startController = new StartController();
     }
 }
 public AddBoatController()
 {
     this.boatView = new AddBoatView();
     boatView.showAddBoatMenu();
     boatView.showMemberList();
     choice = boatView.getChoice();
     if (boatView.doesMemberExist())
     {
         saveBoat();
     }
     else {
         StartController startController = new StartController();
     }
 }
Beispiel #11
0
 public AddBoatController()
 {
     this.boatView = new AddBoatView();
     boatView.showAddBoatMenu();
     boatView.showMemberList();
     choice = boatView.getChoice();
     if (boatView.doesMemberExist())
     {
         saveBoat();
     }
     else
     {
         StartController startController = new StartController();
     }
 }
        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();
        }
        public void executeMenuChoice()
        {
            MemberDAL memberDAL = new MemberDAL();

            Helper.MenuChoice menuChoice = editBoatView.getEditBoatMenuChoice();

            if (menuChoice == Helper.MenuChoice.Delete)
            {
                memberDAL.deleteBoatById(selectedBoatId, member.MemberID);
            }
            if (menuChoice == Helper.MenuChoice.Edit)
            {
                memberDAL.updateBoatById(editBoatView.editBoat(selectedBoatId), member.MemberID);
            }
            StartController startController = new StartController();
        }
        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();
            }
        }
Beispiel #15
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();
            }
        }
 static void Main(string[] args)
 {
     StartController startController = new StartController();
 }