예제 #1
0
 //单位讲学信息绑定
 public void BindData()
 {
     try
     {
         ViewState["page"] = 0;
         List <Common.Entities.UnitLectures> list = BLLUL.FindPaged(Convert.ToInt32(Session["SecrecyLevel"]));
         var res = list.Skip(Grid_Lectures.PageIndex * Grid_Lectures.PageSize).Take(Grid_Lectures.PageSize).ToList();
         Grid_Lectures.RecordCount = list.Count();
         Grid_Lectures.DataSource  = res;
         Grid_Lectures.DataBind();
         btnDelete.Enabled = false;
     }
     catch (Exception ex)
     {
         publicMethod.SaveError(ex, this.Request);
     }
 }
예제 #2
0
 public void FindByAgency()
 {
     try
     {
         ViewState["page"]       = 1;
         Grid_Lectures.PageIndex = 0;
         //根据所属机构查询
         //string AgencyName = DropDownList_Agency.SelectedText;
         int agencyID = BLLAgency.SelectAgencyID(DropDownList_Agency.SelectedText);
         List <Common.Entities.UnitLectures> list = BLLUL.FindLectures(agencyID, Convert.ToInt32(Session["SecrecyLevel"]));
         var res = list.Skip(Grid_Lectures.PageIndex * Grid_Lectures.PageSize).Take(Grid_Lectures.PageSize).ToList();
         Grid_Lectures.RecordCount = list.Count();
         Grid_Lectures.DataSource  = res;
         Grid_Lectures.DataBind();
         btnDelete.Enabled = false;
     }
     catch (Exception ex)
     {
         publicMethod.SaveError(ex, this.Request);
     }
 }