コード例 #1
0
ファイル: PagePower.aspx.cs プロジェクト: Marble1220/Cdu_WLPT
 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         GridView gridView = (GridView)e.Row.FindControl("GridView2");
         Label    label    = (Label)e.Row.FindControl("lbID");
         if (gridView != null && label != null)
         {
             ManagerPagePowerBll teacherPagePowerBll = new ManagerPagePowerBll();
             gridView.DataSource = teacherPagePowerBll.GetByTeacher(new ManagerPagePowerEnitity
             {
                 ManagerID = label.Text
             }, 0);
             gridView.DataBind();
         }
     }
 }
コード例 #2
0
ファイル: PagePower.aspx.cs プロジェクト: Marble1220/Cdu_WLPT
 protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         ManagerPagePowerBll     teacherPagePowerBll    = new ManagerPagePowerBll();
         ManagerPagePowerEnitity teacherPagePowerEntity = new ManagerPagePowerEnitity();
         DataList   dataList   = (DataList)e.Row.FindControl("DataList1");
         LinkButton linkButton = (LinkButton)e.Row.FindControl("lkPages");
         Label      label      = (Label)e.Row.FindControl("lbID");
         if (dataList != null && linkButton != null && label != null)
         {
             int i = int.Parse(linkButton.CommandArgument.ToString());
             teacherPagePowerEntity.ManagerID = label.Text;
             dataList.DataSource = teacherPagePowerBll.GetByTeacher(teacherPagePowerEntity, i);
             dataList.DataBind();
         }
     }
 }