protected void BindData()
    {
        MusicCategoriesCollection<MusicCategories> _cat = new MusicCategoriesCollection<MusicCategories>(this.ConnectionString);
        _cat.LitePopulate(new CoreLibrary.ArgumentsList());

        dg_category.DataSource = _cat;
        dg_category.DataBind();

        PortalCacheFactory.RefreshMusicCategory();
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            HtmlGenericControl _nc = (HtmlGenericControl)Master.FindControl("navHistory");
            _nc.Attributes.Add("class", "active");

            MusicCategoriesCollection<MusicCategories> _cat = new MusicCategoriesCollection<MusicCategories>(this.ConnectionString);
            _cat.LitePopulate(new CoreLibrary.ArgumentsList());

            dd_Category.DataSource = _cat;
            dd_Category.DataTextField = "Description";
            dd_Category.DataValueField = "ID";
            dd_Category.DataBind();

            dd_Status.DataSource = this.LogedInUser.GetAllStatuses();
            dd_Status.DataTextField = "Description";
            dd_Status.DataValueField = "ID";
            dd_Status.DataBind();

            dd_Status.Items.FindByValue("3").Selected = true;

            String _musId = Request.QueryString["musId"];
            if (!String.IsNullOrEmpty(_musId))
            {
                ViewState.Add("musId", _musId);

                Musics _music = new Musics(this.ConnectionString);
                _music.LitePopulate(_musId, false);

                if (dd_Category.Items.FindByValue(_music.CategoryId.ToString()) != null)
                {
                    dd_Category.ClearSelection();
                    dd_Category.Items.FindByValue(_music.CategoryId.ToString()).Selected = true;
                }

                txt_Title.Text = HttpUtility.HtmlDecode(_music.Title);
                if (dd_Status.Items.FindByValue(_music.Status.ToString()) != null)
                {
                    dd_Status.ClearSelection();
                    dd_Status.Items.FindByValue(_music.Status.ToString()).Selected = true;
                }

                val_File.Enabled = false;
                reg_File.Enabled = false;
            }

        }
    }
Exemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            HtmlGenericControl _nc = (HtmlGenericControl)Master.FindControl("navHistory");
            _nc.Attributes.Add("class", "active");

            MusicCategoriesCollection<MusicCategories> _cat = new MusicCategoriesCollection<MusicCategories>(this.ConnectionString);
            _cat.LitePopulate(new CoreLibrary.ArgumentsList());

            dd_Category.DataSource = _cat;
            dd_Category.DataTextField = "Description";
            dd_Category.DataValueField = "ID";
            dd_Category.DataBind();

            dd_Status.DataSource = this.LogedInUser.GetAllStatuses();
            dd_Status.DataTextField = "Description";
            dd_Status.DataValueField = "ID";
            dd_Status.DataBind();

            dd_Status.Items.FindByValue("3").Selected = true;

        }
    }
Exemplo n.º 4
0
    /// <summary>
    /// Refresh Music Category
    /// </summary>
    public static void RefreshMusicCategory()
    {
        CacheManager _cf = CacheFactory.GetCacheManager();
        MusicCategoriesCollection<MusicCategories> _cat = new MusicCategoriesCollection<MusicCategories>(ConnectionString);
        _cat.LitePopulate(new CoreLibrary.ArgumentsList());

        _cf.Add(MUSIC_CATEGORY_KEY, _cat, CacheItemPriority.Normal, null,
            new SlidingTime(TimeSpan.FromHours(Convert.ToInt32(ConfigurationManager.AppSettings["DefaultCacheingHours"]))));
    }