Exemple #1
0
        public ActionResult InsertShow(string StrName, string StrAuthor, int IntBudget, bool YsnIsMusical, int IntClubID, int IntDateID)
        {
            Show newShow = new Show
            {
                StrName      = StrName,
                StrAuthor    = StrAuthor,
                IntBudget    = IntBudget,
                YsnIsMusical = YsnIsMusical,
                IntClubID    = IntClubID,
                Club         = ClubsDAL.GetClub(IntClubID),
                IntDateID    = IntDateID,
                Date         = DatesDAL.GetDate(IntDateID)
            };

            bool success = ShowsDAL.InsertShow(newShow);

            ShowsVM model = new ShowsVM()
            {
                LstAllClubs = ClubsDAL.GetAllClubs(),
                LstShows    = ShowsDAL.GetAllShows(),
                LstAllDates = DatesDAL.GetAllDates()
            };

            return(PartialView("CRUDPartials/_Shows", model));
        }
Exemple #2
0
        public ActionResult InsertExec(string StrPosition, int IntMemberID, int IntDateID, int IntClubID)
        {
            Exec newExec = new Exec
            {
                StrPosition = StrPosition,
                IntMemberID = IntMemberID,
                Member      = MembersDAL.GetMember(IntMemberID),
                IntDateID   = IntDateID,
                Date        = DatesDAL.GetDate(IntDateID),
                IntClubID   = IntClubID,
                Club        = ClubsDAL.GetClub(IntClubID)
            };

            bool success = ExecDAL.InsertExec(newExec);

            ExecVM model = new ExecVM()
            {
                LstExec       = ExecDAL.GetAllExec(),
                LstAllMembers = MembersDAL.GetAllMembers(),
                LstAllClubs   = ClubsDAL.GetAllClubs(),
                LstAllDates   = DatesDAL.GetAllDates()
            };

            return(PartialView("CRUDPartials/_Exec", model));
        }
Exemple #3
0
        public void DeleteClubs(int IntClubID)
        {
            Club remClub = new Club
            {
                IntClubID = IntClubID
            };

            bool success = ClubsDAL.DeleteClub(remClub);
        }
Exemple #4
0
        public void InsertClubs(string StrClubName, string StrAdvisor, string StrUmbrellaOrg, UmbrellaOrg umbrellaOrg)
        {
            Club newClub = new Club
            {
                StrClubName    = StrClubName,
                StrAdvisor     = StrAdvisor,
                StrUmbrellaOrg = StrUmbrellaOrg,
                UmbrellaOrg    = umbrellaOrg
            };

            bool success = ClubsDAL.InsertClub(newClub);
        }
Exemple #5
0
        public void UpdateClubs(int IntClubID, string StrClubName, string StrAdvisor, string StrUmbrellaOrg, UmbrellaOrg umbrellaOrg)
        {
            Club upClup = new Club
            {
                IntClubID      = IntClubID,
                StrClubName    = StrClubName,
                StrAdvisor     = StrAdvisor,
                StrUmbrellaOrg = StrUmbrellaOrg,
                UmbrellaOrg    = umbrellaOrg
            };

            bool success = ClubsDAL.UpdateClub(upClup);
        }
Exemple #6
0
        public ActionResult DeleteShow(int IntShowID)
        {
            Show remShow = new Show
            {
                IntShowID = IntShowID
            };

            bool success = ShowsDAL.DeleteShow(remShow);

            ShowsVM model = new ShowsVM()
            {
                LstAllClubs = ClubsDAL.GetAllClubs(),
                LstShows    = ShowsDAL.GetAllShows(),
                LstAllDates = DatesDAL.GetAllDates()
            };

            return(PartialView("CRUDPartials/_Shows", model));
        }
Exemple #7
0
        public ActionResult UpdateShow(int IntShowID, int IntBudget)
        {
            Show updShow = new Show
            {
                IntShowID = IntShowID,
                IntBudget = IntBudget
            };

            bool success = ShowsDAL.UpdateShow(updShow);

            ShowsVM model = new ShowsVM()
            {
                LstAllClubs = ClubsDAL.GetAllClubs(),
                LstShows    = ShowsDAL.GetAllShows(),
                LstAllDates = DatesDAL.GetAllDates()
            };

            return(PartialView("CRUDPartials/_Shows", model));
        }
Exemple #8
0
        public ActionResult DeleteExec(int IntExecID)
        {
            Exec remExec = new Exec
            {
                IntExecID = IntExecID
            };

            bool success = ExecDAL.DeleteExec(remExec);

            ExecVM model = new ExecVM()
            {
                LstExec       = ExecDAL.GetAllExec(),
                LstAllMembers = MembersDAL.GetAllMembers(),
                LstAllClubs   = ClubsDAL.GetAllClubs(),
                LstAllDates   = DatesDAL.GetAllDates()
            };

            return(PartialView("CRUDPartials/_Exec", model));
        }
Exemple #9
0
        public ActionResult Crud()
        {
            ViewBag.Message = "Create, Read, Update, and Delete table info here";

            CRUDVM model = new CRUDVM();

            IEnumerable <Cast>   allCasts   = CastsDAL.GetAllCasts();
            IEnumerable <Club>   allClubs   = ClubsDAL.GetAllClubs();
            IEnumerable <Date>   allDates   = DatesDAL.GetAllDates();
            IEnumerable <Exec>   allExec    = ExecDAL.GetAllExec();
            IEnumerable <Member> allMembers = MembersDAL.GetAllMembers();
            IEnumerable <Pit>    allPits    = PitsDAL.GetAllPits();
            IEnumerable <Show>   allShows   = ShowsDAL.GetAllShows();
            IEnumerable <Staff>  allStaff   = StaffDAL.GetAllStaff();


            model._shows_vm.LstShows    = allShows;
            model._shows_vm.LstAllClubs = allClubs;
            model._shows_vm.LstAllDates = allDates;

            model._casts_vm.LstCasts      = allCasts;
            model._casts_vm.LstAllMembers = allMembers;
            model._casts_vm.LstAllShows   = allShows;

            model._exec_vm.LstExec       = allExec;
            model._exec_vm.LstAllMembers = allMembers;
            model._exec_vm.LstAllClubs   = allClubs;
            model._exec_vm.LstAllDates   = allDates;

            model._members_vm.LstMembers = allMembers;

            model._pits_vm.LstPits       = allPits;
            model._pits_vm.LstAllMembers = allMembers;
            model._pits_vm.LstAllShows   = allShows;


            model._staff_vm.LstStaff      = allStaff;
            model._staff_vm.LstAllMembers = allMembers;
            model._staff_vm.LstAllShows   = allShows;

            return(View(model));
        }
Exemple #10
0
        public ActionResult UpdateExec(int IntExecID, int IntMemberID)
        {
            Exec updExec = new Exec
            {
                IntExecID   = IntExecID,
                IntMemberID = IntMemberID,
                Member      = MembersDAL.GetMember(IntMemberID)
            };

            bool success = ExecDAL.UpdateExec(updExec);

            ExecVM model = new ExecVM()
            {
                LstExec       = ExecDAL.GetAllExec(),
                LstAllMembers = MembersDAL.GetAllMembers(),
                LstAllClubs   = ClubsDAL.GetAllClubs(),
                LstAllDates   = DatesDAL.GetAllDates()
            };

            return(PartialView("CRUDPartials/_Exec", model));
        }