private void LoadGridViewVideo(string Lang)
 {
     try
     {
         OtherFunctions objFunc  = new OtherFunctions();
         DataSet        ds       = objFunc.GetAllVideo("Video", Globals.AgentCatID, Lang);
         GridViewHelper gvHelper = new GridViewHelper();
         gvHelper.FillData(gridViewVideo, ds);
     }
     catch { }
 }
    public void LoadVideoList()
    {
        int            PageSize   = 6;
        string         Lang       = Globals.GetLang();
        OtherFunctions obj        = new OtherFunctions();
        DataSet        ds         = obj.GetAllVideo("VideoProduct", Globals.AgentCatID, Lang);
        int            TotalItems = ds.Tables[0].Rows.Count;

        if (TotalItems % PageSize == 0)
        {
            PageCount = TotalItems / PageSize;
        }
        else
        {
            PageCount = TotalItems / PageSize + 1;
        }

        Int32 Page = Globals.GetIntFromQueryString("Page");

        if (Page == -1)
        {
            Page = 1;
        }
        int FromRow = (Page - 1) * PageSize;
        int ToRow   = Page * PageSize - 1;

        if (ToRow >= TotalItems)
        {
            ToRow = TotalItems - 1;
        }

        for (int i = FromRow; i < ToRow + 1; i++)
        {
            Response.Write("<div class=\"video_item_default\">");
            Response.Write("<a href=\"javascript:playVideo('" + DataObject.GetString(ds, i, "VideoSrc") + "','" + DataObject.GetString(ds, i, "VideoImage") + "')\">");
            if (Globals.IsFileExistent(DataObject.GetString(ds, i, "VideoImage")))
            {
                Response.Write("<img class=\"shadow_video_default\" height=\"71px\" src=\"" + Globals.GetUploadsUrl() + DataObject.GetString(ds, i, "VideoImage") + "\" />");
            }
            else
            {
                Response.Write("<img class=\"shadow_video_default\" height=\"71px\" src=\"" + Globals.DefaultImage + "\" />");
            }
            Response.Write("<span>" + Convert.ToString(ds.Tables[0].Rows[i]["VideoName"]) + "</span>");
            Response.Write("</a>");
            Response.Write("</div>");
        }
    }
Exemplo n.º 3
0
    public void LoadVideoList()
    {
        int            PageSize   = 12;
        string         Lang       = Globals.GetLang();
        OtherFunctions obj        = new OtherFunctions();
        DataSet        ds         = obj.GetAllVideo("VideoProduct", Globals.AgentCatID, Lang);
        int            TotalItems = ds.Tables[0].Rows.Count;

        if (TotalItems % PageSize == 0)
        {
            PageCount = TotalItems / PageSize;
        }
        else
        {
            PageCount = TotalItems / PageSize + 1;
        }

        Int32 Page = Globals.GetIntFromQueryString("Page");

        if (Page == -1)
        {
            Page = 1;
        }
        int FromRow = (Page - 1) * PageSize;
        int ToRow   = Page * PageSize - 1;

        if (ToRow >= TotalItems)
        {
            ToRow = TotalItems - 1;
        }

        for (int i = FromRow; i < ToRow + 1; i++)
        {
            Response.Write("<div class=\"video_item\">");
            Response.Write("<a href=\"VideoClip.aspx?VideoID=" + Convert.ToString(ds.Tables[0].Rows[i]["VideoID"]) + "&Lang=" + Lang + "\">");
            Response.Write("<img class=\"shadow_video\" height=\"71px\" src=\"" + Globals.GetUploadsUrl() + Convert.ToString(ds.Tables[0].Rows[i]["VideoImage"]) + "\" />");
            Response.Write("<span>" + Convert.ToString(ds.Tables[0].Rows[i]["VideoName"]) + "</span>");
            Response.Write("</a>");
            Response.Write("</div>");
        }
    }