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));
        }