Exemplo n.º 1
0
        /********************************************************** UPDATE METHODS ********************************************************/


        //update an artist by passing artist model to datacontroller
        public ActionResult Updateartist(ArtistModel updartist)
        {
            bool success;

            ArtistDataController dataController = new ArtistDataController();

            success = dataController.UpdateArtist(updartist);

            return(Content(success.ToString()));
        }
Exemplo n.º 2
0
        /*********************************************************** INSERT METHODS *******************************************************/

        //create an artist by passing artist model to datacontroller
        public ActionResult Createartist(ArtistModel newartist)
        {
            int artistID;

            ArtistDataController dataController = new ArtistDataController();

            dataController.InsertArtist(newartist);
            artistID = dataController.GetArtistID(newartist);

            return(Content(artistID.ToString()));
        }
Exemplo n.º 3
0
        /************************************************************ GET METHODS ********************************************************/

        public ActionResult GetArtist(ArtistModel model)
        {
            int artistID;

            ArtistDataController dataController = new ArtistDataController();

            artistID = dataController.GetArtistID(model);

            System.Web.HttpContext.Current.Session["Artist"] = artistID;

            return(Content(artistID.ToString()));
        }