예제 #1
0
        public static string GetPropertyTypeLink(int vidID)
        {
            var sngs = new Songs();

            sngs.GetSongsForVideo(vidID);

            var sb = new StringBuilder();

            var sp = new SongProperty();

            foreach (Song sng in sngs)
            {
                sp = new SongProperty();

                sp.GetSongPropertySongIDTypeID(sng.SongID, SPropType.IT.ToString());

                if (string.IsNullOrEmpty(sp.PropertyContent)) continue;

                sb.AppendFormat(@"<a target=""_blank"" class=""info"" href=""{0}"">", sp.PropertyContent);
                sb.Append(sng.Name);
                sb.Append(@"</a>");
            }

            return HttpUtility.HtmlEncode(sb.ToString().Trim());
        }
예제 #2
0
        //private void RefreshLists()
        //{
        //    Artists arts = new Artists();
        //    arts.GetAll();
        //    ddlArtist1.DataSource = arts;
        //    ddlArtist1.DataTextField = "name";
        //    ddlArtist1.DataValueField = "name";
        //    ddlArtist1.DataBind();
        //    General.SortDropDownList(ddlArtist1);
        //    //
        //    ddlArtist2.DataSource = arts;
        //    ddlArtist2.DataTextField = "name";
        //    ddlArtist2.DataValueField = "name";
        //    ddlArtist2.DataBind();
        //    General.SortDropDownList(ddlArtist2);
        //    //
        //    ddlArtist3.DataSource = arts;
        //    ddlArtist3.DataTextField = "name";
        //    ddlArtist3.DataValueField = "name";
        //    ddlArtist3.DataBind();
        //    General.SortDropDownList(ddlArtist3);
        //    Statuses stus = new Statuses();
        //    stus.GetAll();
        //    ddlVideoStatus.DataSource = stus;
        //    ddlVideoStatus.DataTextField = "statusDescription";
        //    ddlVideoStatus.DataValueField = "statusID";
        //    ddlVideoStatus.DataBind();
        //    ///
        //    PropertyType propTyp = new PropertyType(SiteEnums.PropertyTypeCode.HUMAN);
        //    MultiProperties mps = new MultiProperties(propTyp.PropertyTypeID);
        //    ddlHumanType.DataSource = mps;
        //    ddlHumanType.DataTextField = "name";
        //    ddlHumanType.DataValueField = "multiPropertyID";
        //    ddlHumanType.DataBind();
        //    ///
        //    propTyp = new PropertyType(SiteEnums.PropertyTypeCode.FOOTG);
        //    mps = new MultiProperties(propTyp.PropertyTypeID);
        //    ddlFootageType.DataSource = mps;
        //    ddlFootageType.DataTextField = "name";
        //    ddlFootageType.DataValueField = "multiPropertyID";
        //    ddlFootageType.DataBind();
        //    ///
        //    propTyp = new PropertyType(SiteEnums.PropertyTypeCode.VIDTP);
        //    mps = new MultiProperties(propTyp.PropertyTypeID);
        //    ddlVideoType.DataSource = mps;
        //    ddlVideoType.DataTextField = "name";
        //    ddlVideoType.DataValueField = "multiPropertyID";
        //    ddlVideoType.DataBind();
        //}
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                IDictionaryEnumerator enumerator = HttpRuntime.Cache.GetEnumerator();

                while (enumerator.MoveNext())
                {
                    HttpRuntime.Cache.Remove(enumerator.Key.ToString());
                }

                //  RefreshLists();

                lblStatus.Text = "OK";
            }
            catch (Exception ex)
            {
                lblStatus.Text = ex.Message;
            }

            // amazon
            var sp1 = new SongProperty();

            sp1.SongID = sng.SongID;
            sp1.PropertyContent = txtAmazonLink.Text;
            sp1.PropertyType = SongProperty.SPropType.AM.ToString();

            if (!string.IsNullOrEmpty(sp1.PropertyContent))
            {
                sp1.Create();
            }

            // itunes
            sp1 = new SongProperty();

            sp1.SongID = sng.SongID;
            sp1.PropertyContent = txtiTunesLink.Text;
            sp1.PropertyType = SongProperty.SPropType.IT.ToString();

            if (!string.IsNullOrEmpty(sp1.PropertyContent))
            {
                sp1.Create();
            }
        }
예제 #3
0
        protected void ddlArtistSongs1_SelectedIndexChanged(object sender, EventArgs e)
        {
            var sp1 = new SongProperty();

            //am
            sp1.GetSongPropertySongIDTypeID(
                sng.SongID,
                SongProperty.SPropType.AM.ToString());

            txtAmazonLink.Text = sp1.PropertyContent;

            sp1 = new SongProperty();

            //it
            sp1.GetSongPropertySongIDTypeID(
                sng.SongID,
                SongProperty.SPropType.IT.ToString());

            txtiTunesLink.Text = sp1.PropertyContent;
        }