//导出 protected void btn_Get_Click(object sender, EventArgs e) { List <int> selectnum = pm.GridCount(Grid_Equipment, CBoxSelect); if (selectnum.Count == 0) { pm.ExportExcel(3, Grid_Equipment, 0);//选择项目为空,则全部导出 } else { pm.ExportExcel(3, Grid_Equipment, 0, selectnum);//有选择项,导出所选 } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { if (page == 0) { List <Common.Entities.AchieveAward> list = award.FindPaged(Convert.ToInt32(Session["secrecyLevel"])); if (list != null) { Grid_AchieveAward.DataSource = list; Grid_AchieveAward.DataBind(); } } else if (page == 1) { List <Common.Entities.AchieveAward> list = award.FindByNameAndGrade(tAchieveName.Text.Trim(), Convert.ToInt32(Session["secrecyLevel"])); if (list != null) { Grid_AchieveAward.DataSource = list; Grid_AchieveAward.DataBind(); } } else if (page == 2) { List <Common.Entities.AchieveAward> list = award.FindByAwardUnit(tAchieveName.Text.Trim(), Convert.ToInt32(Session["secrecyLevel"])); if (list != null) { Grid_AchieveAward.DataSource = list; Grid_AchieveAward.DataBind(); } } else if (page == 3) { List <Common.Entities.AchieveAward> list = award.FindByMember(tAchieveName.Text.Trim(), Convert.ToInt32(Session["secrecyLevel"])); if (list != null) { Grid_AchieveAward.DataSource = list; Grid_AchieveAward.DataBind(); } } else if (page == 4) { List <Common.Entities.AchieveAward> list = award.FindBySecrecyLevel(secrecyLevel.SelectedIndex + 1, Convert.ToInt32(Session["secrecyLevel"])); if (list != null) { Grid_AchieveAward.DataSource = list; Grid_AchieveAward.DataBind(); } } else { return; } pm.ExportExcel(3, Grid_AchieveAward, 1); } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { if (page == 0) { List <EduExperience> EduElList = bllEdu.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])).ToList(); this.GridEduExperience.DataSource = EduElList; this.GridEduExperience.DataBind(); } if (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]); } } this.GridEduExperience.DataSource = alist; this.GridEduExperience.DataBind(); } publicmethod.ExportExcel(3, GridEduExperience, 1); } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { if (page == 0) { List <StaffDevote> List = bllStaffDevote.FindAll(Convert.ToInt32(Session["SecrecyLevel"])); this.GridProjectAndPeople.DataSource = List; this.GridProjectAndPeople.DataBind(); } if (page == 1) { List <int> Projectlist = bllProject.FindProjectList(TriProjectNames.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); List <StaffDevote> staffdevote = new List <StaffDevote>(); for (int i = 0; i < Projectlist.Count(); i++) { List <StaffDevote> List = bllStaffDevote.FindPaged(Projectlist[i], Convert.ToInt32(Session["SecrecyLevel"])); for (int j = 0; j < List.Count(); j++) { staffdevote.Add(List[j]); } } this.GridProjectAndPeople.DataSource = staffdevote; this.GridProjectAndPeople.DataBind(); } publicmethod.ExportExcel(3, GridProjectAndPeople, 0); } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { if (page == 0) { List <Paper> list = paper.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Paper.DataSource = list; Grid_Paper.DataBind(); } } if (page == 1) { List <Paper> list = paper.FindByAgency(dCondition.SelectedText.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Paper.DataSource = list; Grid_Paper.DataBind(); } } if (page == 3) { List <Paper> list = paper.FindByPublicDate(Convert.ToInt32(dCondition.SelectedText.Trim()), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Paper.DataSource = list; Grid_Paper.DataBind(); } } if (page == 4) { List <Paper> list = paper.FindByPaperPeople(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Paper.DataSource = list; Grid_Paper.DataBind(); } } if (page == 5) { List <Paper> list = paper.FindByRS(dCondition.SelectedText.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Paper.DataSource = list; Grid_Paper.DataBind(); } } pm.ExportExcel(3, Grid_Paper, 3); } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { switch (page) { case 0: List <SocialPartTime> SocialList = bllSocial.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])).ToList(); this.GridSocialPartTime.DataSource = SocialList; this.GridSocialPartTime.DataBind(); break; case 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> SocialLists = bllSocial.SelectByID(UserIDlist[i], Convert.ToInt32(Session["SecrecyLevel"])).ToList(); for (int j = 0; j < SocialLists.Count(); j++) { alist.Add(SocialLists[j]); } } this.GridSocialPartTime.DataSource = alist; this.GridSocialPartTime.DataBind(); break; case 2: List <SocialPartTime> saocialList = bllSocial.SelectByApproveTime(Convert.ToInt32(DropDownListYearandLevel.SelectedItem.Text), Convert.ToInt32(Session["SecrecyLevel"])).ToList(); this.GridSocialPartTime.DataSource = saocialList; this.GridSocialPartTime.DataBind(); break; case 3: List <SocialPartTime> List1 = bllSocial.SelectByDepartment(TBNameandAgency.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])).ToList(); this.GridSocialPartTime.DataSource = List1; this.GridSocialPartTime.DataBind(); break; case 4: List <SocialPartTime> List = bllSocial.SelectByLevel(DropDownListYearandLevel.SelectedItem.Text, Convert.ToInt32(Session["SecrecyLevel"])).ToList(); this.GridSocialPartTime.DataSource = List; this.GridSocialPartTime.DataBind(); break; } publicmethod.ExportExcel(3, GridSocialPartTime, 1); } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { switch (page) { case 0: List <Common.Entities.Honor> HonorList = bllHonor.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); this.GridHonor.DataSource = HonorList; this.GridHonor.DataBind(); break; case 1: List <int> UserIDlist = new List <int>(); //根据人员名称模糊查找人员ID UserIDlist = bllUser.FindList(TBNameandAgency.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); List <Common.Entities.Honor> alist = new List <Common.Entities.Honor>(); for (int i = 0; i < UserIDlist.Count(); i++) { //根据人员ID查找荣誉称号 List <Common.Entities.Honor> HonorLists = bllHonor.SelectByID(UserIDlist[i], Convert.ToInt32(Session["SecrecyLevel"])); for (int j = 0; j < HonorLists.Count(); j++) { alist.Add(HonorLists[j]); } } this.GridHonor.DataSource = alist; this.GridHonor.DataBind(); break; case 2: List <Common.Entities.Honor> Honorlist = bllHonor.SelectByTime(Convert.ToInt32(DropDownListYearandLevel.SelectedItem.Text), Convert.ToInt32(Session["SecrecyLevel"])); this.GridHonor.DataSource = Honorlist; this.GridHonor.DataBind(); break; case 3: List <Common.Entities.Honor> List = bllHonor.SelectByDivision(TBNameandAgency.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); this.GridHonor.DataSource = List; this.GridHonor.DataBind(); break; case 4: List <Common.Entities.Honor> list = bllHonor.SelectBySort(DropDownListYearandLevel.SelectedItem.Text, Convert.ToInt32(Session["SecrecyLevel"])); this.GridHonor.DataSource = list; this.GridHonor.DataBind(); break; } publicmethod.ExportExcel(3, GridHonor, 1); } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { if (page == 0) { List <Monograph> list = mo.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Monograph.DataSource = list; Grid_Monograph.DataBind(); } } if (page == 1) { List <Monograph> list = mo.FindByPublicTime(Convert.ToInt32(dCondition.SelectedText.Trim()), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Monograph.DataSource = list; Grid_Monograph.DataBind(); } } if (page == 2) { List <Monograph> list = mo.FindByMonographPeople(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Monograph.DataSource = list; Grid_Monograph.DataBind(); } } if (page == 3) { List <Monograph> list = mo.FindBySort(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Monograph.DataSource = list; Grid_Monograph.DataBind(); } } pm.ExportExcel(3, Grid_Monograph, 4); } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { switch (page) { case 0: List <SpeakClass> SpeakList = bllSpeak.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])).ToList(); this.GridSpeakClass.DataSource = SpeakList; this.GridSpeakClass.DataBind(); break; case 1: List <int> UserIDlist = new List <int>(); //根据人员名称模糊查找人员ID UserIDlist = bllUser.FindList(TriggerBox.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); List <SpeakClass> alist = new List <SpeakClass>(); for (int i = 0; i < UserIDlist.Count(); i++) { //根据人员ID查找主讲课程信息 List <SpeakClass> SpeakLists = bllSpeak.SelectByID(UserIDlist[i]).ToList(); for (int j = 0; j < SpeakLists.Count(); j++) { alist.Add(SpeakLists[j]); } } this.GridSpeakClass.DataSource = alist; this.GridSpeakClass.DataBind(); break; case 2: FindByITs(TriggerBox.Text, DropDownListTeachingDegree.SelectedItem.Text); break; } publicmethod.ExportExcel(3, GridSpeakClass, 0); } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { if (page == 0) { List <DFurtherStudy> list = df.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_FurtherStudy.DataSource = list; Grid_FurtherStudy.DataBind(); } } if (page == 1) { List <DFurtherStudy> list = new List <DFurtherStudy>(); if (dCondition.SelectedText.Trim() == "全部") { list = df.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); } else { list = df.FindByYear(Convert.ToInt32(dCondition.SelectedText.Trim()), Convert.ToInt32(Session["SecrecyLevel"])); } if (list != null) { Grid_FurtherStudy.DataSource = list; Grid_FurtherStudy.DataBind(); } } pm.ExportExcel(3, Grid_FurtherStudy, 0); } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { if (page == 1) { List <UnitInspect> list = new List <UnitInspect>(); if (dCondition.SelectedText.Trim() == "全部") { list = inspect.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); } else { list = inspect.FindByInspectTime(Convert.ToInt32(dCondition.SelectedText.Trim()), Convert.ToInt32(Session["SecrecyLevel"])); } if (list != null) { Grid_UnitInspect.DataSource = list; Grid_UnitInspect.DataBind(); } } if (page == 0) { List <UnitInspect> list = inspect.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_UnitInspect.DataSource = list; Grid_UnitInspect.DataBind(); } } pm.ExportExcel(3, Grid_UnitInspect, 2); } catch (Exception ex) { pm.SaveError(ex, this.Request); return; } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { if (page == 0) { List <Education> EducationsList = bllEducation.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])).ToList(); this.GridEducation.DataSource = EducationsList; this.GridEducation.DataBind(); } if (page == 1) { List <int> UserIDlist = new List <int>(); //根据人员名称模糊查找人员ID UserIDlist = bllUser.FindList(TriggerBox.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); List <Education> alist = new List <Education>(); for (int i = 0; i < UserIDlist.Count(); i++) { //根据人员ID查找学历 List <Education> EducationsList = bllEducation.SelectByID(UserIDlist[i], Convert.ToInt32(Session["SecrecyLevel"])).ToList(); for (int j = 0; j < EducationsList.Count(); j++) { alist.Add(EducationsList[j]); } } GridEducation.RecordCount = alist.Count(); var result = alist.Skip(GridEducation.PageIndex * GridEducation.PageSize).Take(GridEducation.PageSize).ToList(); this.GridEducation.DataSource = result; this.GridEducation.DataBind(); } publicmethod.ExportExcel(3, GridEducation, 0); } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { if (page == 0) { List <Common.Entities.Patent> list = patent.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Patent.DataSource = list; Grid_Patent.DataBind(); } } else if (page == 1) { List <Common.Entities.Patent> list = patent.FindByPatentDepartment(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Patent.DataSource = list; Grid_Patent.DataBind(); } } else if (page == 3) { List <Common.Entities.Patent> list = patent.FindByApplicationTime(Convert.ToInt32(dCondition.SelectedText.Trim()), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Patent.DataSource = list; Grid_Patent.DataBind(); } } else if (page == 4) { List <Common.Entities.Patent> list = patent.FindByAccreditTime(Convert.ToInt32(dCondition.SelectedText.Trim()), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Patent.DataSource = list; Grid_Patent.DataBind(); } } else if (page == 5) { List <Patent> list = patent.FindByPatentPeople(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Patent.DataSource = list; Grid_Patent.DataBind(); } } else if (page == 6) { List <Patent> list = patent.FindByMember(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Patent.DataSource = list; Grid_Patent.DataBind(); } } else if (page == 7) { List <Patent> list = patent.FindBySecrecyLevel(secrecyLevel.SelectedIndex + 1, Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Patent.DataSource = list; Grid_Patent.DataBind(); } } else { return; } pm.ExportExcel(3, Grid_Patent, 4); } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { if (page == 0) { List <AchivementApply> list = applys.FindPage(Convert.ToInt32(Session["SecrecyLevel"])); Grid_AchieveApply.RecordCount = list.Count(); if (list != null) { Grid_AchieveApply.DataSource = list; Grid_AchieveApply.DataBind(); } } if (page == 1) { List <int> AchievementID = ach.FindByAchievementNamelist(tCondition.Text); List <AchivementApply> list = applys.FindByAchievementName(AchievementID, Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_AchieveApply.DataSource = list; Grid_AchieveApply.DataBind(); } } if (page == 2) { 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.AchivementApply> list = applys.FindByAchievementName(AchieveID, Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_AchieveApply.DataSource = list; Grid_AchieveApply.DataBind(); } } if (page == 3) { List <AchivementApply> list = applys.FindByTime(Convert.ToInt32(dCondition.SelectedText.Trim()), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_AchieveApply.DataSource = list; Grid_AchieveApply.DataBind(); } } if (page == 4) { List <AchivementApply> list = applys.FindByUnit(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_AchieveApply.DataSource = list; Grid_AchieveApply.DataBind(); } } if (page == 5) { List <AchivementApply> list = applys.FindBySecrecyLevel(exchangesecrecylevel(dCondition.SelectedValue), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_AchieveApply.DataSource = list; Grid_AchieveApply.DataBind(); } } if (page == 6) { List <AchivementApply> list = applys.FindByMember(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_AchieveApply.DataSource = list; Grid_AchieveApply.DataBind(); } } pm.ExportExcel(3, Grid_AchieveApply, 1); } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { switch (page) { case 0: List <Student> StudentList = bllStudent.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); this.GridProjectStudent.DataSource = StudentList; this.GridProjectStudent.DataBind(); break; case 1: { bool IsGraduate = false; if (DropDownStudentType.SelectedItem.Text == "全部") { List <Student> List2 = bllStudent.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); this.GridProjectStudent.DataSource = List2; this.GridProjectStudent.DataBind(); } else { if (DropDownStudentType.SelectedItem.Text == "在读") { IsGraduate = false; } else if (DropDownStudentType.SelectedItem.Text == "毕业") { IsGraduate = true; } FindSdudents(DropDownList.SelectedItem.Text, IsGraduate); } //switch (DropDownStudentType.SelectedItem.Text) //{ // case "全部": // List<Student> List2 = bllStudent.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); // this.GridProjectStudent.DataSource = List2; // this.GridProjectStudent.DataBind(); // break; // case "在读本科生": // FindSdudents("本科生", false); // break; // case "毕业本科生": // FindSdudents("本科生", true); // break; // case "在读研究生": // FindSdudents("研究生", false); // break; // case "毕业研究生": // FindSdudents("研究生", true); // break; // case "在读博士生": // FindSdudents("博士生", false); // break; // case "毕业博士生": // FindSdudents("博士生", true); // break; // case "在读博士后": // FindSdudents("博士后", false); // break; // case "毕业博士后": // FindSdudents("博士后", true); // break; //} } break; case 2: { bool IsGraduate = false; if (DropDownStudentType.SelectedItem.Text == "全部") { List <Student> List1 = bllStudent.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); this.GridProjectStudent.DataSource = List1; this.GridProjectStudent.DataBind(); } else { if (DropDownStudentType.SelectedItem.Text == "在读") { IsGraduate = false; } else if (DropDownStudentType.SelectedItem.Text == "毕业") { IsGraduate = true; } if (!string.IsNullOrEmpty(TriggerBox.Text.Trim())) { FindStudentNames(DropDownList.SelectedItem.Text, IsGraduate, TriggerBox.Text.Trim()); } } } //switch (DropDownStudentType.SelectedItem.Text) //{ // case "全部": // List<Student> List1 = bllStudent.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); // this.GridProjectStudent.DataSource = List1; // this.GridProjectStudent.DataBind(); // break; // case "在读本科生": // if (!string.IsNullOrEmpty(TriggerBox.Text.Trim())) // FindStudentNames("本科生", false, TriggerBox.Text.Trim()); // break; // case "毕业本科生": // if (!string.IsNullOrEmpty(TriggerBox.Text.Trim())) // FindStudentNames("本科生", true, TriggerBox.Text.Trim()); // break; // case "在读研究生": // if (!string.IsNullOrEmpty(TriggerBox.Text.Trim())) // FindStudentNames("研究生", false, TriggerBox.Text.Trim()); // break; // case "毕业研究生": // if (!string.IsNullOrEmpty(TriggerBox.Text.Trim())) // FindStudentNames("研究生", true, TriggerBox.Text.Trim()); // break; // case "在读博士生": // if (!string.IsNullOrEmpty(TriggerBox.Text.Trim())) // FindStudentNames("博士生", false, TriggerBox.Text.Trim()); // break; // case "毕业博士生": // if (!string.IsNullOrEmpty(TriggerBox.Text.Trim())) // FindStudentNames("博士生", true, TriggerBox.Text.Trim()); // break; // case "在读博士后": // if (!string.IsNullOrEmpty(TriggerBox.Text.Trim())) // FindStudentNames("博士后", false, TriggerBox.Text.Trim()); // break; // case "毕业博士后": // if (!string.IsNullOrEmpty(TriggerBox.Text.Trim())) // FindStudentNames("博士后", true, TriggerBox.Text.Trim()); // break; //} break; } publicmethod.ExportExcel(3, GridProjectStudent, 0); } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { if (page == 0) { List <Common.Entities.Achievement> list = achieve.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Achievementt.DataSource = list; Grid_Achievementt.DataBind(); } } if (page == 1) { // List<int> ProjectID = project.FindProjectList(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); List <Common.Entities.Achievement> list = achieve.FindByProject(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Achievementt.DataSource = list; Grid_Achievementt.DataBind(); } } if (page == 2) { 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.Achievement> list = achieve.SelectAll(AchieveID, Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Achievementt.DataSource = list; Grid_Achievementt.DataBind(); } } if (page == 3) { List <Common.Entities.Achievement> list = achieve.FindByName(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Achievementt.DataSource = list; Grid_Achievementt.DataBind(); } } if (page == 4) { List <Common.Entities.Achievement> list = achieve.FindByTime(Convert.ToInt32(dCondition.SelectedText.Trim()), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Achievementt.DataSource = list; Grid_Achievementt.DataBind(); } } if (page == 5) { List <Common.Entities.Achievement> list = achieve.FindByUnit(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Achievementt.DataSource = list; Grid_Achievementt.DataBind(); } } if (page == 6) { List <Common.Entities.Achievement> list = achieve.FindByLevel(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Achievementt.DataSource = list; Grid_Achievementt.DataBind(); } } if (page == 9) { int selevel = LevelChange(dCondition.SelectedText.Trim()); List <Common.Entities.Achievement> list = achieve.FindBySecrecyLevel(selevel, Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Achievementt.DataSource = list; Grid_Achievementt.DataBind(); } } if (page == 10) { List <Common.Entities.Achievement> list = achieve.FindByMember(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Achievementt.DataSource = list; Grid_Achievementt.DataBind(); } } pm.ExportExcel(3, Grid_Achievementt, 2); } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { if (page == 0) { List <Common.Entities.Award> list = award.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Award.DataSource = list; Grid_Award.DataBind(); } } if (page == 1) { List <Common.Entities.Award> list = award.FindByAchievementName(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Award.DataSource = list; Grid_Award.DataBind(); } } if (page == 2) { List <Common.Entities.Award> list = award.FindByAchievementRank(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Award.DataSource = list; Grid_Award.DataBind(); } } if (page == 3) { List <Common.Entities.Award> list = award.FindByAchievementTime(Convert.ToInt32(dCondition.SelectedText.Trim()), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Award.DataSource = list; Grid_Award.DataBind(); } } if (page == 4) { List <Common.Entities.Award> list = award.FindByUnit(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Award.DataSource = list; Grid_Award.DataBind(); } } if (page == 5) { List <Common.Entities.Award> list = award.FindByAwardName(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Award.DataSource = list; Grid_Award.DataBind(); } } if (page == 6) { List <Common.Entities.Award> list = award.AwardUnit(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Award.DataSource = list; Grid_Award.DataBind(); } } if (page == 7) { List <Common.Entities.Award> list = award.FindByAwardPeople(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Award.DataSource = list; Grid_Award.DataBind(); } } if (page == 9) { List <Common.Entities.Award> list = award.FindBySecrecyLevel(Secrecyreturnint(dCondition.SelectedText), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Award.DataSource = list; Grid_Award.DataBind(); } } if (page == 10) { List <Common.Entities.Award> list = award.FindByMember(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_Award.DataSource = list; Grid_Award.DataBind(); } } pm.ExportExcel(3, Grid_Award, 0); } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//导出 protected void btn_Get_Click(object sender, EventArgs e) { try { if (page == 0) { List <Common.Entities.AchievementCA> list = ca.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_AchievementCA.DataSource = list; Grid_AchievementCA.DataBind(); } } if (page == 1) { List <int> achieve = ach.FindByAchievementNamelist(tCondition.Text.Trim()); List <Common.Entities.AchievementCA> list = ca.FindByAchievementName(achieve, Convert.ToInt32(Session["SecrecyLevel"])); Convert.ToInt32(Session["SecrecyLevel"]); if (list != null) { Grid_AchievementCA.DataSource = list; Grid_AchievementCA.DataBind(); } } if (page == 2) { List <Common.Entities.AchievementCA> list = ca.FindByCATime(Convert.ToInt32(dCondition.SelectedText.Trim()), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_AchievementCA.DataSource = list; Grid_AchievementCA.DataBind(); } } if (page == 3) { List <Common.Entities.AchievementCA> list = ca.FindByCAUnit(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_AchievementCA.DataSource = list; Grid_AchievementCA.DataBind(); } } if (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"])); if (list != null) { Grid_AchievementCA.DataSource = list; Grid_AchievementCA.DataBind(); } } if (page == 5) { List <Common.Entities.AchievementCA> list = ca.FindByCACommnetLevel(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_AchievementCA.DataSource = list; Grid_AchievementCA.DataBind(); } } if (page == 6) { List <Common.Entities.AchievementCA> list = ca.FindPaged(Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_AchievementCA.DataSource = list; Grid_AchievementCA.DataBind(); } } if (page == 7) { List <Common.Entities.AchievementCA> list = ca.FindByMember(tCondition.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"])); if (list != null) { Grid_AchievementCA.DataSource = list; Grid_AchievementCA.DataBind(); } } pm.ExportExcel(3, Grid_AchievementCA, 1); } catch (Exception ex) { pm.SaveError(ex, this.Request); } }