private void Load_Detail(double _id)
        {
            type = int.Parse(cbo_types.SelectedValue);
            T_BaoCao _DAL = new T_BaoCao();
            DataSet  _ds;

            _ds = _DAL.BindGridT_ActionHistory_Detail(_id, type);
            grdDetail.DataSource = _ds;
            grdDetail.DataBind();
            _ds.Clear();
        }
 public void LoadData()
 {
     if ((!string.IsNullOrEmpty(txt_FromDate.Text.Trim())) && (!string.IsNullOrEmpty(txt_ToDate.Text.Trim())))
     {
         T_BaoCao _DAL = new T_BaoCao();
         DataSet  _ds;
         _ds = GetDataByCallSP("CMS_List_HitCounter", txt_FromDate.Text.Trim(), txt_ToDate.Text.Trim(), Int32.Parse(ddlCate.SelectedValue));
         grdListHistory.DataSource = _ds;
         grdListHistory.DataBind();
     }
     else
     {
         grdListHistory.DataSource = null;
         grdListHistory.DataBind();
         System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "Message", "alert('Hãy nhập khoảng thời gian tìm kiếm!');", true);
     }
 }
        private void LoadMutimedia()
        {
            string where = " 1=1 ";
            if (!String.IsNullOrEmpty(this.txtTieude.Text.Trim()))
            {
                where += " AND T_Multimedia.Tittle like N'%" + UltilFunc.SqlFormatText(this.txtTieude.Text.Trim()) + "%'";
            }
            if (cboNgonNgu.SelectedIndex > 0)
            {
                where += " AND Languages_ID=" + cboNgonNgu.SelectedValue.ToString();
            }
            if (cbo_chuyenmuc.SelectedIndex > 0)
            {
                where += " AND " + string.Format(" T_Multimedia.Category IN (SELECT * FROM [dbo].[fn_Return_Category_Tree] ({0}))", cbo_chuyenmuc.SelectedValue);
            }
            if (!String.IsNullOrEmpty(this.txt_FromDate.Text.Trim()))
            {
                where += " AND T_Multimedia.DatePublish  >='" + txt_FromDate.Text + " 00:00:01'";
            }
            if (!String.IsNullOrEmpty(this.txt_ToDate.Text.Trim()))
            {
                where += " AND T_Multimedia.DatePublish  <='" + txt_ToDate.Text + " 23:59:59'";
            }
            pages.PageSize = 20;
            T_BaoCao _DAL = new T_BaoCao();
            DataSet  _ds;

            _ds = _DAL.BindGridT_ActionHistory_AmThanhHinhAnh(pages.PageIndex, pages.PageSize, where);

            int TotalRecords = Convert.ToInt32(_ds.Tables[1].Rows[0].ItemArray[0].ToString());
            int TotalRecord  = Convert.ToInt32(_ds.Tables[0].Rows.Count);

            if (TotalRecord == 0)
            {
                _ds = _DAL.BindGridT_ActionHistory_AmThanhHinhAnh(pages.PageIndex - 1, pages.PageSize, where);
            }
            grdList.DataSource = _ds;
            grdList.DataBind(); _ds.Clear();
            pages.TotalRecords     = currentPage.TotalRecords = TotalRecords;
            currentPage.TotalPages = pages.CalculateTotalPages();
            currentPage.PageIndex  = pages.PageIndex;
        }
        private void LoadThoiSuAnh()
        {
            string where = " 1=1 ";
            if (!String.IsNullOrEmpty(this.txtTieude.Text.Trim()))
            {
                where += " AND T_Photo_Event.Photo_Name like N'%" + UltilFunc.SqlFormatText(this.txtTieude.Text.Trim()) + "%'";
            }
            if (cboNgonNgu.SelectedIndex > 0)
            {
                where += " AND Lang_ID=" + cboNgonNgu.SelectedValue.ToString();
            }
            if (!String.IsNullOrEmpty(this.txt_FromDate.Text.Trim()))
            {
                where += " AND T_Photo_Event.Date_Update  >='" + txt_FromDate.Text + " 00:00:01'";
            }
            if (!String.IsNullOrEmpty(this.txt_ToDate.Text.Trim()))
            {
                where += " AND T_Photo_Event.Date_Update  <='" + txt_ToDate.Text + " 23:59:59'";
            }
            pages.PageSize = 20;
            T_BaoCao _DAL = new T_BaoCao();
            DataSet  _ds;

            _ds = _DAL.BindGridT_ActionHistory_TsAnh(pages.PageIndex, pages.PageSize, where);

            int TotalRecords = Convert.ToInt32(_ds.Tables[1].Rows[0].ItemArray[0].ToString());
            int TotalRecord  = Convert.ToInt32(_ds.Tables[0].Rows.Count);

            if (TotalRecord == 0)
            {
                _ds = _DAL.BindGridT_ActionHistory_TsAnh(pages.PageIndex - 1, pages.PageSize, where);
            }
            grdList.DataSource = _ds;
            grdList.DataBind(); _ds.Clear();
            pages.TotalRecords     = currentPage.TotalRecords = TotalRecords;
            currentPage.TotalPages = pages.CalculateTotalPages();
            currentPage.PageIndex  = pages.PageIndex;
        }