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