//初始化专利情况 public void InitPatentCondition() { try { List <BasicCode> listname = ba.FindByCategoryName("专利情况"); for (int i = 0; i < listname.Count(); i++) { dPatentCondition.Items.Add(listname[i].CategoryContent.ToString(), listname[i].CategoryContent.ToString()); } } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//搜索条件即搜索框变化 protected void dChoose_SelectedIndexChanged(object sender, EventArgs e) { switch (dChoose.SelectedValue) { case "全部": dCondition.Enabled = false; tCondition.Enabled = false; break; /*case "类别": * dCondition.Enabled = false; * tCondition.Enabled = true; * break;*/ case "作者": dCondition.Enabled = false; tCondition.Enabled = true; break; case "出版年份": dCondition.Items.Clear(); for (int i = 1960; i <= 2060; i++) { dCondition.Items.Add(i.ToString(), i.ToString()); } dCondition.Items[0].Selected = true; dCondition.Enabled = true; tCondition.Enabled = false; break; case "第一作者身份": dCondition.Items.Clear(); List <BasicCode> list1 = ba.FindByCategoryName("第一作者身份"); for (int i = 0; i < list1.Count(); i++) { dCondition.Items.Add(list1[i].CategoryContent.ToString(), list1[i].CategoryContent.ToString()); } dCondition.Items[0].Selected = true; dCondition.EnableEdit = false; tCondition.Enabled = false; dCondition.Enabled = true; break; case "部门": dCondition.Items.Clear(); BLHelper.BLLAgency agency = new BLHelper.BLLAgency(); List <Common.Entities.Agency> list = agency.FindAllAgencyName(); for (int i = 0; i < list.Count(); i++) { dCondition.Items.Add(list[i].AgencyName.ToString(), list[i].AgencyName.ToString()); } dCondition.Items[0].Selected = true; dCondition.EnableEdit = false; tCondition.Enabled = false; dCondition.Enabled = true; break; } }
//初始化第一作者身份 public void InitdFirstWriterSite() { try { List <BasicCode> listname = ba.FindByCategoryName("第一作者身份"); for (int i = 0; i < listname.Count(); i++) { dPaperIdentity.Items.Add(listname[i].CategoryContent.ToString(), listname[i].CategoryContent.ToString()); } } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//初始化等级下拉框 public void Initddl() { for (int i = 0; i < Convert.ToInt32(Session["SecrecyLevel"]); i++) { string[] SecrecyLevels = new string[] { "四级", "三级", "二级", "一级", "管理员" }; dSecrecyLevel.Items.Add(SecrecyLevels[i], i.ToString()); } BLHelper.BLLBasicCode bs = new BLHelper.BLLBasicCode(); List <Common.Entities.BasicCode> bascode = bs.FindByCategoryName("著作类型"); for (int i = 0; i < bascode.Count; i++) { ddlMonographType.Items.Add(bascode[i].CategoryContent.Trim(), bascode[i].CategoryContent.Trim()); } }
//根据分类名称查询 public void FindByCategoryName() { try { ViewState["page"] = 1; List <BasicCode> BasicCodeList = bllBasicCode.FindByCategoryName(DropDownListCategoryName.SelectedItem.Text); GridBasicCode.RecordCount = BasicCodeList.Count(); var result = BasicCodeList.Skip(GridBasicCode.PageIndex * GridBasicCode.PageSize).Take(GridBasicCode.PageSize).ToList(); this.GridBasicCode.DataSource = result; this.GridBasicCode.DataBind(); btnDelete.Enabled = false; } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//搜索条件 protected void dChoose_SelectedIndexChanged(object sender, EventArgs e) { try { switch (dChoose.SelectedValue) { case "全部": dCondition.Enabled = false; tCondition.Enabled = false; break; case "成果名称": dCondition.Enabled = false; tCondition.Enabled = true; break; case "获奖名称": dCondition.Enabled = false; tCondition.Enabled = true; break; case "获奖人": dCondition.Enabled = false; tCondition.Enabled = true; break; case "获奖部门": dCondition.Enabled = false; tCondition.Enabled = true; break; case "获奖年份": dCondition.Items.Clear(); for (int i = 1960; i <= 2060; i++) { dCondition.Items.Add(i.ToString(), i.ToString()); } dCondition.Items[0].Selected = true; //dCondition.EnableEdit = false; dCondition.Enabled = true; tCondition.Enabled = false; break; case "颁奖部门": dCondition.Enabled = false; tCondition.Enabled = true; break; case "获奖等级": dCondition.Items.Clear(); List <BasicCode> listname = ba.FindByCategoryName("获奖等级"); for (int i = 0; i < listname.Count(); i++) { dCondition.Items.Add(listname[i].CategoryContent.ToString(), listname[i].CategoryContent.ToString()); } dCondition.Items[0].Selected = true; dCondition.Enabled = true; tCondition.Enabled = false; break; case "保密级别": dCondition.Items.Clear(); for (int i = 0; i < Convert.ToInt32(Session["SecrecyLevel"]); i++) { string[] SecrecyLevels = new string[] { "四级", "三级", "二级", "一级", "管理员" }; dCondition.Items.Add(SecrecyLevels[i], i.ToString()); } dCondition.Items[0].Selected = true; dCondition.Enabled = true; tCondition.Enabled = false; break; case "成员": dCondition.Enabled = false; tCondition.Enabled = true; break; } } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//搜索框变化 protected void dChoose_SelectedIndexChanged(object sender, EventArgs e) { switch (dChoose.SelectedValue) { case "全部": dCondition.Enabled = false; tCondition.Enabled = false; break; case "部门": dCondition.Items.Clear(); BLHelper.BLLAgency agency = new BLHelper.BLLAgency(); List <Common.Entities.Agency> list = agency.FindAllAgencyName(); for (int i = 0; i < list.Count(); i++) { dCondition.Items.Add(list[i].AgencyName.ToString(), list[i].AgencyName.ToString()); } dCondition.Items[0].Selected = true; dCondition.EnableEdit = false; tCondition.Enabled = false; dCondition.Enabled = true; break; case "发表年份": dCondition.Items.Clear(); for (int i = 1960; i <= 2060; i++) { dCondition.Items.Add(i.ToString(), i.ToString()); } dCondition.Items[0].Selected = true; //dCondition.EnableEdit = false; dCondition.Enabled = true; tCondition.Enabled = false; break; case "第一作者身份": dCondition.Items.Clear(); List <BasicCode> list1 = ba.FindByCategoryName("第一作者身份"); //List<Common.Entities.Paper> list1 = paper.FindByFirstWriterPosition(); for (int i = 0; i < list1.Count(); i++) { dCondition.Items.Add(list1[i].CategoryContent.ToString(), list1[i].CategoryContent.ToString()); } dCondition.Items[0].Selected = true; dCondition.EnableEdit = false; tCondition.Enabled = false; dCondition.Enabled = true; break; case "发表状态": dCondition.Items.Clear(); List <BasicCode> list2 = ba.FindByCategoryName("发表状态"); for (int i = 0; i < list2.Count(); i++) { dCondition.Items.Add(list2[i].CategoryContent.ToString(), list2[i].CategoryContent.ToString()); } dCondition.Items[0].Selected = true; dCondition.EnableEdit = false; tCondition.Enabled = false; dCondition.Enabled = true; break; case "作者": dCondition.Enabled = false; tCondition.Enabled = true; break; case "刊物级别": dCondition.Items.Clear(); List <BasicCode> listname = ba.FindByCategoryName("刊物级别"); for (int i = 0; i < listname.Count(); i++) { dCondition.Items.Add(listname[i].CategoryContent.ToString(), listname[i].CategoryContent.ToString()); } dCondition.Items[0].Selected = true; dCondition.EnableEdit = false; dCondition.Enabled = true; tCondition.Enabled = false; break; case "收录情况": dCondition.Items.Clear(); List <BasicCode> listname1 = ba.FindByCategoryName("收录情况"); for (int i = 0; i < listname1.Count(); i++) { dCondition.Items.Add(listname1[i].CategoryContent.ToString(), listname1[i].CategoryContent.ToString()); } dCondition.Items[0].Selected = true; dCondition.EnableEdit = false; dCondition.Enabled = true; tCondition.Enabled = false; break; } }
//搜索条件 protected void tchoose_SelectedIndexChanged(object sender, EventArgs e) { switch (dChoose.SelectedValue) { case "全部": dCondition.Enabled = false; tCondition.Enabled = false; secrecyLevel.Enabled = false; break; case "所属机构": dCondition.Enabled = false; tCondition.Enabled = true; secrecyLevel.Enabled = false; break; case "申请年份": dCondition.Items.Clear(); for (int i = 1960; i <= 2060; i++) { dCondition.Items.Add(i.ToString(), i.ToString()); } dCondition.Items[0].Selected = true; dCondition.Enabled = true; tCondition.Enabled = false; secrecyLevel.Enabled = false; break; case "授权年份": dCondition.Items.Clear(); for (int i = 1960; i <= 2060; i++) { dCondition.Items.Add(i.ToString(), i.ToString()); } dCondition.Items[0].Selected = true; dCondition.Enabled = true; tCondition.Enabled = false; secrecyLevel.Enabled = false; break; case "发明人": dCondition.Enabled = false; tCondition.Enabled = true; secrecyLevel.Enabled = false; break; case "专利类型": dCondition.Items.Clear(); List <BasicCode> listname = ba.FindByCategoryName("专利类型"); for (int i = 0; i < listname.Count(); i++) { dCondition.Items.Add(listname[i].CategoryContent.ToString(), listname[i].CategoryContent.ToString()); } dCondition.Items[0].Selected = true; dCondition.EnableEdit = false; dCondition.Enabled = true; tCondition.Enabled = false; secrecyLevel.Enabled = false; break; case "成员": dCondition.Enabled = false; tCondition.Enabled = true; secrecyLevel.Enabled = false; break; case "保密级别": dCondition.Enabled = false; tCondition.Enabled = false; secrecyLevel.Enabled = true; break; } }