Пример #1
0
        public void btnEditPicture_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(hdnId.Value))
            {
                var type = hdnId.Value.Split('=')[0];
                var id = hdnId.Value.Split('=')[1];

                switch (type)
                {
                    case "picture":
                        var myShowArtService = new MyShowArtService(Ioc.GetInstance<IMyShowArtRepository>());
                        var myShowArt = myShowArtService.GetMyShowArt(new Guid(id));
                        Response.Redirect(LinkBuilder.EditArtLink(myShowArt.ArtId));
                        break;
                    case "poster":
                        var myShowPosterService = new MyShowPosterService(Ioc.GetInstance<IMyShowPosterRepository>());
                        var myShowPoster = myShowPosterService.GetMyShowPoster(new Guid(id));
                        Response.Redirect(LinkBuilder.EditPosterLink(myShowPoster.PosterId));
                        break;
                }
            }
        }
Пример #2
0
        private MyShowArt GetPicture(Guid pictureId)
        {
            var myShowArtService = new MyShowArtService(Ioc.GetInstance<IMyShowArtRepository>());

            return (MyShowArt)myShowArtService.GetMyShowArt(pictureId);
        }