public void Delete(MoviesSeriesEmployee moviesSeriesEmployee) { try { _moviesSeriesEmployeeDal.Delete(moviesSeriesEmployee); } catch { throw new Exception("Silme gerçekleşemedi"); } }
public ActionResult AddEmployeeToMoviesSeries([Bind(Include = "MovieSeriesID,EmployeeID")] MoviesSeriesEmployee moviesSeriesEmployee) { MoviesSeriesEmployee DoesExistEmployee = _moviesSeriesEmployeeService.GetAll().FirstOrDefault(x => x.MovieSeriesID == moviesSeriesEmployee.MovieSeriesID && x.EmployeeID == moviesSeriesEmployee.EmployeeID); if (DoesExistEmployee == null) { _moviesSeriesEmployeeService.Add(moviesSeriesEmployee); return(RedirectToAction("Index")); } else { Response.Write("<script language=javascript>alert('Bu kategori bu filme zaten atanmış');</script>"); } ViewBag.EmployeeID = new SelectList(_employeeService.GetAll(), "EmployeeID", "FirstName"); ViewBag.MovieSeriesID = new SelectList(_moviesSeriesService.GetMoviesSeriesListById(moviesSeriesEmployee.MovieSeriesID), "MovieSeriesID", "MovieSeriesName"); return(View()); }
public void Update(MoviesSeriesEmployee moviesSeriesEmployee) { _moviesSeriesEmployeeDal.Update(moviesSeriesEmployee); }
public void Add(MoviesSeriesEmployee moviesSeriesEmployee) { _moviesSeriesEmployeeDal.Add(moviesSeriesEmployee); }