Beispiel #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));
        }
Beispiel #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));
        }
Beispiel #3
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));
        }
Beispiel #4
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));
        }
Beispiel #5
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));
        }
Beispiel #6
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));
        }
Beispiel #7
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));
        }