//根据人员姓名查看社会兼职信息(模糊查询) public void SelectByName() { try { ViewState["page"] = 1; List <int> UserIDlist = new List <int>(); //根据人员名称模糊查找人员ID UserIDlist = bllUser.FindList(TBNameandAgency.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); List <SocialPartTime> alist = new List <SocialPartTime>(); for (int i = 0; i < UserIDlist.Count(); i++) { //根据人员ID查找社会兼职 List <SocialPartTime> SocialList = bllSocial.SelectByID(UserIDlist[i], Convert.ToInt32(Session["SecrecyLevel"])).ToList(); for (int j = 0; j < SocialList.Count(); j++) { alist.Add(SocialList[j]); } } GridSocialPartTime.RecordCount = alist.Count(); var result = alist.Skip(GridSocialPartTime.PageIndex * GridSocialPartTime.PageSize).Take(GridSocialPartTime.PageSize).ToList(); this.GridSocialPartTime.DataSource = result; this.GridSocialPartTime.DataBind(); btnDelete.Enabled = false; } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//根据EduExperienceID查找教育经历 public void SelectByID() { try { ViewState["page"] = 1; List <int> UserIDlist = new List <int>(); //根据人员名称模糊查找人员ID UserIDlist = bllUser.FindList(TriggerBox.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); List <EduExperience> alist = new List <EduExperience>(); for (int i = 0; i < UserIDlist.Count(); i++) { //根据人员ID查找教育经历 List <EduExperience> EduElList = bllEdu.SelectByID(Convert.ToInt32(UserIDlist[i]), Convert.ToInt32(Session["SecrecyLevel"])).ToList(); for (int j = 0; j < EduElList.Count(); j++) { alist.Add(EduElList[j]); } } GridEduExperience.RecordCount = alist.Count(); var result = alist.Skip(GridEduExperience.PageIndex * GridEduExperience.PageSize).Take(GridEduExperience.PageSize).ToList(); this.GridEduExperience.DataSource = result; this.GridEduExperience.DataBind(); btnDelete.Enabled = false; } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//按完成人搜索 public void FindByPeople() { try { ViewState["page"] = 4; List <int> UserInfoID = user.FindList(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); List <int> AchieveID = blst.SelectIDlist(UserInfoID, Convert.ToInt32(Session["SecrecyLevel"])); List <Common.Entities.AchievementCA> list = ca.FindByAchievementName(AchieveID, Convert.ToInt32(Session["SecrecyLevel"])); Grid_AchievementCA.RecordCount = list.Count(); if (list != null) { Grid_AchievementCA.DataSource = list.Skip(Grid_AchievementCA.PageIndex * Grid_AchievementCA.PageSize).Take(Grid_AchievementCA.PageSize); Grid_AchievementCA.DataBind(); } } catch (Exception ex) { pm.SaveError(ex, this.Request); } }