예제 #1
0
    private void BindReletedVideos()
    {
        DataTable dtPopular = SqlHelper.GetDataUsingQuery("select TBU.EntryDate,C.UserName,TBU.IncidentCategoryIDF,TBU.IncidentDescription,TBU.UploadTitle,TBU.UploadedVideoIDP,TBU.UserID,TBP.StoryPicNVideoPath,TBP.ThumbPath from tblUploadedVideo as TBU inner join tblUploadStoryPicAndVideoPath as TBP on(TBU.UploadedVideoIDP=TBP.UploadedVideoIDF) inner join tblClient as C on (TBU.UserID=C.ClientIDP)  where TBU.IsApproved=1 and TBU.UploadTypeID=1 and TBU.IncidentCategoryIDF in (select IncidentCategoryIDF from tblUploadedVideo where UploadedVideoIDP=" + SearchJSON + ")");

        if (dtPopular.Rows.Count > 0)
        {
            RptTopVideopopular.DataSource = dtPopular;
            RptTopVideopopular.DataBind();
        }
    }
    private void BindPopularVideo()
    {
        DataTable dtPopular = SqlHelper.GetDataUsingQuery("select V.IncidentCityName,SC.IncidentSubCategoryName,MC.IncidentCategoryName,V.UploadedVideoIDP,P.ThumbPath,V.IsApproved,V.IsReject,P.StoryPicNVideoPath,C.FirstName, V.UploadTitle,V.EntryDate,V.AreaOfCity,V.IncidentDescription,V.KeyWordForSearch,V.IncidentDate from tblUploadedVideo as V inner join tblClient as C on (V.UserID=C.ClientIDP) inner join tblUploadStoryPicAndVideoPath as P on(P.UploadedVideoIDF=V.UploadedVideoIDP) inner join mIncidentCategory as MC on(MC.IncidentCategoryIDP=V.IncidentCategoryIDF) inner join mIncidentSubCategory as SC on(SC.IncidentSubCategoryIDP=V.IncidentSubCategoryIDF) where V.UploadTypeID=1 and V.IsApproved=1 and V.IncidentCategoryIDF=2 order by ENTRYDATE DESC");

        if (dtPopular.Rows.Count > 0)
        {
            RptTopVideopopular.DataSource = dtPopular;
            RptTopVideopopular.DataBind();
        }
        else
        {
            TblError.Visible = true;
        }
    }