示例#1
0
        protected void ddlArtistSongs1_SelectedIndexChanged(object sender, EventArgs e)
        {
            SongProperty 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;
        }
示例#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 = HttpContext.Current.Cache.GetEnumerator();

                while (enumerator.MoveNext())
                {

                    HttpContext.Current.Cache.Remove(enumerator.Key.ToString());

                }

                //  RefreshLists();

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

            // amazon
            SongProperty 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
        public static string GetPropertyTypeLink(int vidID)
        {
            Songs sngs = new  Songs();

            sngs.GetSongsForVideo(vidID);

            StringBuilder sb = new StringBuilder();

            SongProperty sp = new SongProperty();

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

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

                if (!string.IsNullOrEmpty(sp.PropertyContent))
                {
                    sb.Append(@"<a target=""_blank"" class=""info"" href=""" + sp.PropertyContent + @""">");
                    sb.Append(sng.Name);
                    sb.Append(@"</a>");
                }
            }

            return HttpUtility.HtmlEncode(sb.ToString().Trim());
        }