public ActionResult AddMovieDetails(Models.Movie record)
        {
            DeltaXMapper <Models.Movie, Movie>       mapobj  = new DeltaXMapper <Models.Movie, Movie>();
            DeltaXMapper <Producer, Models.Producer> mapobj1 = new DeltaXMapper <Producer, Models.Producer>();
            DeltaXRepository obj = new DeltaXRepository();
            var ActorsIdArray    = record.ActorList.Split(',');
            var mov = obj.AddMovie(mapobj.Translate(record), ActorsIdArray);

            return(RedirectToAction("GetAllMovieDetails"));
        }
示例#2
0
        public JsonResult AjaxMethodAddMovies(string name, string yearOfRelease, string Plot, string producer, string[] actors)
        {
            DeltaXRepository obj = new DeltaXRepository();

            try
            {
                if (obj.AddMovie(name, yearOfRelease, Plot, producer, actors))
                {
                    return(Json("Movie Added succesfully"));
                }
                else
                {
                    return(Json("Errror in adding Data"));
                }
            }
            catch
            {
                return(Json("Errror in adding Data"));
            }
        }