Beispiel #1
0
        protected void GetBoundData2()
        {
            pager2.PageIndex = UCPaging2.CurrentPage;
            DataTable dt = CommonFun.GetDataByPagerQueryParam(pager2);

            CommonFun.Paging(dt, gridview2, UCPaging2, NoDataPanel2);
            if (NoDataPanel2.Visible)
            {
                UCPaging2.Visible = false;
            }
            else
            {
                UCPaging2.Visible = true;
                UCPaging2.InitPageInfo();
            }
        }
 private void bindGrid1()
 {
     bindSunNum();
     pager1.PageIndex = UCPaging2.CurrentPage;
     System.Data.DataTable dt = CommonFun.GetDataByPagerQueryParamGroupBy(pager1);
     CommonFun.Paging(dt, Repeater2, UCPaging2, NoDataPanel2);
     if (NoDataPanel2.Visible)
     {
         UCPaging2.Visible = false;
     }
     else
     {
         UCPaging2.Visible = true;
         UCPaging2.InitPageInfo();
     }
 }
 private void bindrpt2()
 {
     InitPager2();
     pager_org2.PageIndex = UCPaging2.CurrentPage;
     System.Data.DataTable dt2 = CommonFun.GetDataByPagerQueryParamWithPriKey(pager_org2);
     CommonFun.Paging(dt2, rptKQTJ2, UCPaging2, palNoData2);
     if (palNoData2.Visible)
     {
         UCPaging2.Visible = false;
     }
     else
     {
         UCPaging2.Visible = true;
         UCPaging2.InitPageInfo();
     }
 }
 private void databind1()
 {
     pager.TableName    = "View_TBDS_STAFFINFO as a left join (select ST_ID,count(ST_ID) as ST_COUNT from (select ST_ID,ST_CONTRSTART as ST_START,ST_CONTREND as ST_END,ST_FILLDATE from TBDS_STAFFINFO union select * from TBDS_HETONG)t group by ST_ID) as b on a.ST_ID=b.ST_ID";
     pager.PrimaryKey   = "ST_ID";
     pager.ShowFields   = "a.*,b.ST_COUNT";
     pager.OrderField   = "ST_ID";
     pager.StrWhere     = strWhere1();
     pager.OrderType    = 0;
     pager.PageSize     = 10;
     UCPaging2.PageSize = pager.PageSize;
     pager.PageIndex    = UCPaging2.CurrentPage;
     System.Data.DataTable dt = CommonFun.GetDataByPagerQueryParam(pager);
     CommonFun.Paging(dt, rep_HTong, UCPaging2, NoDataPane2);
     if (NoDataPane2.Visible)
     {
         UCPaging2.Visible = false;
     }
     else
     {
         UCPaging2.Visible = true;
         UCPaging2.InitPageInfo();
     }
 }
 private void bindGrid2()
 {
     pager.PageIndex = UCPaging2.CurrentPage;
     System.Data.DataTable dt = CommonFun.GetDataByPagerQueryParam(pager);
     CommonFun.Paging(dt, GridView2, UCPaging2, NoDataPanel2);
     if (NoDataPanel2.Visible)
     {
         UCPaging2.Visible = false;
     }
     else
     {
         UCPaging2.Visible = true;
         UCPaging2.InitPageInfo();  //分页控件中要显示的控件
     }
     foreach (GridViewRow gr in GridView2.Rows)
     {
         Label zdr2 = (Label)gr.FindControl("zdr2");
         if (Request.QueryString["action"] == "view")
         {
             gr.FindControl("hyperlink1").Visible = false;
             gr.FindControl("hyperlink3").Visible = false;
         }
         else
         {
             if (zdr2.Text.Trim() == UserName.Value)
             {
                 gr.FindControl("hyperlink4").Visible = true;
                 gr.FindControl("hyperlink6").Visible = true;
             }
             else
             {
                 gr.FindControl("hyperlink4").Visible = false;
                 gr.FindControl("hyperlink6").Visible = false;
             }
         }
     }
 }