Ejemplo n.º 1
0
        private void BindNotes(IShow show)
        {
            hdnShowTitle.Value = show.GetShowName();

            var userId       = GetUserId();
            var listenedShow = _ListenedShowService.GetByUserAndShowId(userId, show.Id);

            if (listenedShow == null)
            {
                bool success = false;

                listenedShow = _DomainObjectFactory.CreateListenedShow(show.Id, userId, show.ShowDate.Value, (int)ListenedStatus.None, string.Empty);
                _ListenedShowService.SaveCommit(listenedShow, out success);

                if (!success)
                {
                    _Log.Write("Saving a listened show for user: {0} and show: {1} failed", userId, show.ShowDate.Value);
                    return;
                }
            }

            hdnListenedId.Value = listenedShow.Id.ToString();
            txtNotes.Text       = listenedShow.Notes;
        }
Ejemplo n.º 2
0
        private void BindNotes( IShow show )
        {
            hdnShowTitle.Value = show.GetShowName();

            var userId = GetUserId();
            var listenedShow = _ListenedShowService.GetByUserAndShowId( userId, show.Id );

            if ( listenedShow == null ) {

                bool success = false;

                listenedShow = _DomainObjectFactory.CreateListenedShow( show.Id, userId, show.ShowDate.Value, (int)ListenedStatus.None, string.Empty );
                _ListenedShowService.SaveCommit( listenedShow, out success );

                if ( !success ) {
                    _Log.Write( "Saving a listened show for user: {0} and show: {1} failed", userId, show.ShowDate.Value );
                    return;
                }
            }

            hdnListenedId.Value = listenedShow.Id.ToString();
            txtNotes.Text = listenedShow.Notes;
        }