登录成功之后进入新的界面,进行后面的操作
MasterForm.aspx
<span style="font-size:14px;"><%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
CodeBehind="MasterForm.aspx.cs" Inherits="Web.MasterForm" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div data-options="region:'west',split:true" title="系统菜单" style="width: 200px; padding: 1px;
overflow: hidden;">
<%--<asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1">
<DataBindings>
<asp:TreeNodeBinding DataMember="SiteMapNode" NavigateUrlField="Url" Target="MainFrame"
TextField="Title" ToolTipField="Description" />
</DataBindings>
<NodeStyle ForeColor="Black" />
<ParentNodeStyle ForeColor="#0066CC" />
<SelectedNodeStyle BackColor="#99CCFF" ForeColor="#CC0099" ImageUrl="~/Easyui/themes/icons/pencil.png"
VerticalPadding="7px" />
</asp:TreeView>--%>
<asp:TreeView ID="TreeView2" runat="server" Font-Bold="False" Font-Names="Microsoft YaHei"
Font-Size="Medium" ImageSet="Simple">
<LeafNodeStyle ForeColor="#3366FF" VerticalPadding="3px" />
<Nodes>
<asp:TreeNode Text="数据管理" Value="数据管理" SelectAction="Expand">
<asp:TreeNode Text="SCI论文数据库" Value="SCI论文数据库" NavigateUrl="DataManager/SCIManager/SCIImportUpdate.aspx"
Target="MainFrame"></asp:TreeNode>
<asp:TreeNode Text="JCR期刊评价库" Value="JCR期刊评价库" NavigateUrl="DataManager/JCRManager/JCRImport.aspx"
Target="MainFrame"></asp:TreeNode>
<asp:TreeNode Text="中文论文数据库" Value="中文论文数据库" NavigateUrl="DataManager/ZWLWManager/ZWLWImport.aspx"
Target="MainFrame"></asp:TreeNode>
<asp:TreeNode Text="中文期刊评价库" Value="中文期刊评价库" NavigateUrl="DataManager/ZWQKManager/ZWQKImport.aspx"
Target="MainFrame"></asp:TreeNode>
<asp:TreeNode Text="中国发明授权专利数据库" Value="中国发明授权专利数据库" NavigateUrl="DataManager/ZGFMManager/ZGFMImportUpdate.aspx"
Target="MainFrame"></asp:TreeNode>
<asp:TreeNode Text="奖励数据库" Value="奖励数据库" NavigateUrl="DataManager/JLSJManager/JLSJImport.aspx"
Target="MainFrame"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="检索" Value="检索" SelectAction="Expand">
<asp:TreeNode Text="SCI论文数据库" Value="SCI论文数据库" NavigateUrl="DataSearch/SCISearch1.aspx"
Target="MainFrame"></asp:TreeNode>
<asp:TreeNode Text="JCR期刊评价库" Value="JCR期刊评价库" NavigateUrl="DataSearch/JCRSearch.aspx"
Target="MainFrame"></asp:TreeNode>
<asp:TreeNode Text="中文论文数据库" Value="中文论文数据库" NavigateUrl="DataSearch/ZWLWSearch.aspx"
Target="MainFrame"></asp:TreeNode>
<asp:TreeNode Text="中文期刊评价库" Value="中文期刊评价库" NavigateUrl="DataSearch/ZWQKSearch.aspx"
Target="MainFrame"></asp:TreeNode>
<asp:TreeNode Text="中国发明授权专利数据库" Value="中国发明授权专利数据库" NavigateUrl="DataSearch/ZGFMSearch.aspx"
Target="MainFrame"></asp:TreeNode>
<asp:TreeNode Text="奖励数据库" Value="奖励数据库" NavigateUrl="DataSearch/JLSJSearch.aspx"
Target="MainFrame"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="目标机构产出分析" Value="目标机构产出分析" SelectAction="Expand">
<asp:TreeNode Text="SCI论文分析" Value="SCI论文分析" NavigateUrl="DataStatistics/SCIAnalyze/SCIAnalyze.aspx"
Target="MainFrame"></asp:TreeNode>
<asp:TreeNode Text="中文核心论文分析" Value="中文核心论文分析" NavigateUrl="DataStatistics/ZWHXLWAnalyze/ZWLWAnalyze.aspx"
Target="MainFrame"></asp:TreeNode>
<asp:TreeNode Text="中国农业发明专利分析" Value="中国农业发明专利分析" NavigateUrl="DataStatistics/ZGFMAnalyze/ZGFMAnalyze.aspx"
Target="MainFrame"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="学科评价" Value="学科评价" SelectAction="Expand">
<asp:TreeNode Text="学科科技产出分析" Value="学科科技产出分析" NavigateUrl="DataEvaluate/TechProAnalyze.aspx"
Target="MainFrame"></asp:TreeNode>
<asp:TreeNode Text="学科综合排名" Value="学科综合排名" NavigateUrl="DataEvaluate/WebForm1.aspx"
Target="MainFrame"></asp:TreeNode>
</asp:TreeNode>
</Nodes>
<ParentNodeStyle BorderStyle="Double" VerticalPadding="4px" />
<SelectedNodeStyle BackColor="#99CCFF" ForeColor="#0066FF" VerticalPadding="7px" />
</asp:TreeView>
</div>
<div data-options="region:'center',noheader :true" title="当前操作" style="overflow: hidden;">
<iframe id="MainFrame" name="MainFrame" class="content" src="../DataSearch/SCISearch1.aspx">
</iframe>
</div>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
</asp:Content></span><span style="font-size:14px;">
</span>
点击了检索-SCI论文数据库
SCISearch1.aspx【分为三部分】
第一部分
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCISearch1.aspx.cs" Inherits="Web.DataSearch.SCISearch1" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body class="easyui-layout">
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div style="height: 280px" data-options="region:'north',split:false,title:'SCI检索'">
<div style="height: 225px">
<div style="text-align: center" id="cd1">
<a id="addCondition" href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'"
οnclick="javascript:addCondition();"></a><a id="removeCondition" href="#" class="easyui-linkbutton"
data-options="plain:true,iconCls:'icon-remove'" οnclick="javascript:removeCondition(1);"></a>
<asp:TextBox ID="conditionValue1" runat="server"></asp:TextBox>
<asp:DropDownList ID="conditionKey1" runat="server" DataSourceID="XmlDataSource1"
DataTextField="Text" DataValueField="value">
</asp:DropDownList>
</div>
<div style="text-align: center; display: none;" id="cd2">
<asp:DropDownList ID="conditionRelate2" runat="server">
<asp:ListItem>AND</asp:ListItem>
<asp:ListItem>OR</asp:ListItem>
<asp:ListItem>NOT</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="conditionValue2" runat="server"></asp:TextBox>
<asp:DropDownList ID="conditionKey2" runat="server" DataSourceID="XmlDataSource1"
DataTextField="Text" DataValueField="value">
</asp:DropDownList>
</div>
<div style="text-align: center; display: none;" id="cd3">
<asp:DropDownList ID="conditionRelate3" runat="server">
<asp:ListItem>AND</asp:ListItem>
<asp:ListItem>OR</asp:ListItem>
<asp:ListItem>NOT</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="conditionValue3" runat="server"></asp:TextBox>
<asp:DropDownList ID="conditionKey3" runat="server" DataSourceID="XmlDataSource1"
DataTextField="Text" DataValueField="value">
</asp:DropDownList>
</div>
<div style="text-align: center; display: none;" id="cd4">
<asp:DropDownList ID="conditionRelate4" runat="server">
<asp:ListItem>AND</asp:ListItem>
<asp:ListItem>OR</asp:ListItem>
<asp:ListItem>NOT</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="conditionValue4" runat="server"></asp:TextBox>
<asp:DropDownList ID="conditionKey4" runat="server" DataSourceID="XmlDataSource1"
DataTextField="Text" DataValueField="value">
</asp:DropDownList>
</div>
<div style="text-align: center; display: none;" id="cd5">
<asp:DropDownList ID="conditionRelate5" runat="server">
<asp:ListItem>AND</asp:ListItem>
<asp:ListItem>OR</asp:ListItem>
<asp:ListItem>NOT</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="conditionValue5" runat="server"></asp:TextBox>
<asp:DropDownList ID="conditionKey5" runat="server" DataSourceID="XmlDataSource1"
DataTextField="Text" DataValueField="value">
</asp:DropDownList>
</div>
<hr style="width: 420px;" />
<div style="text-align: center; padding-top: 2px;">
第一作者属目标单位标识:
<asp:DropDownList ID="DropDownList_DYZZBS" runat="server" CssClass="datagrid-row-alt">
<asp:ListItem Value=""></asp:ListItem>
<asp:ListItem Value="true">是</asp:ListItem>
<asp:ListItem Value="false">否</asp:ListItem>
</asp:DropDownList>
通讯作者属目标单位标识:
<asp:DropDownList ID="DropDownList_TXZZBS" runat="server" CssClass="datagrid-row-alt">
<asp:ListItem Value=""></asp:ListItem>
<asp:ListItem Value="true">是</asp:ListItem>
<asp:ListItem Value="false">否</asp:ListItem>
</asp:DropDownList>
</div>
<div style="text-align: center; padding-top: 2px; padding-left: 80px;">
出版年:
<asp:DropDownList ID="DropDownList1" runat="server" CssClass="datagrid-row-alt" Width="100">
<asp:ListItem Value=""></asp:ListItem>
</asp:DropDownList>
TO
<asp:DropDownList ID="DropDownList2" runat="server" CssClass="datagrid-row-alt" Width="100">
<asp:ListItem></asp:ListItem>
</asp:DropDownList>
<asp:CompareValidator ID="CompareValidator1" runat="server" BackColor="Red"
ControlToCompare="DropDownList2" ControlToValidate="DropDownList1" ErrorMessage="CompareValidator"
Operator="LessThanEqual">请输入正确年份</asp:CompareValidator>
</div>
<div style="text-align: center; padding-top: 2px;">
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ImageButton ID="searchButton" runat="server" ImageUrl="~/Images/search.gif"
OnClick="searchButton_Click" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:HiddenField ID="conditionNums" runat="server" />
</div>
</div>
</div>
</form>
</body>
</html>
asp:DropDownList下拉框 CssClass添加的css样式
在 ASP.NET 网页中按 ID 查找子控件 this.DropDownList1.Items.Add(new ListItem(i.ToString() + "年", i.ToString()));
在page_load的方法体内
for (int i = DateTime.Now.Year; i >= 2000; i--)
{
this.DropDownList1.Items.Add(new ListItem(i.ToString() + "年", i.ToString()));
this.DropDownList2.Items.Add(new ListItem(i.ToString() + "年", i.ToString()));
}
第二部分
<div id="toolBar" style="width: 100%; background-color: #95B8E7">
<div style="text-align: left; width: 30%; display: inline-block">
<span style="color: White">SCI数据查询</span>
</div>
<div style="text-align: right; width: 60%; display: inline-block">
<input type="button" id="Bt_CheckAll" value="全选" οnclick="javascript: Bt_CheckAll_Click();" />
<asp:Button ID="AddButton" runat="server" Text="新增" OnClick="AddButton_Click" />
<asp:Button ID="exportSelectedButton" runat="server" Text="导出选中" OnClick="exportSelectedButton_Click" />
<asp:Button ID="exportAllButton" runat="server" Text="导出所有" OnClick="exportAllButton_Click" />
</div>
</div>
各种服务器控件和按钮事件
第三部分
<div data-options="region:'center',title:'ssss',noheader:true">
<div id="resultDataTable">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:GridView ID="GridView1" runat="server" BackColor="White" BorderColor="#3366CC"
BorderStyle="Double" BorderWidth="1px" CellPadding="4" Width="100%" DataKeyNames="SCIID"
EnableViewState="False" AutoGenerateColumns="False" OnRowCommand="GridView1_RowCommand"
AllowSorting="True" OnSorting="GridView1_Sorting">
<EmptyDataTemplate>
<asp:Label ID="Label1" runat="server" Text="Label">未查询到数据</asp:Label>
</EmptyDataTemplate>
<EmptyDataRowStyle HorizontalAlign="Center" />
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" Checked='<%#Bind("ISSELECTED") %>' />
</ItemTemplate>
<HeaderTemplate>
<asp:CheckBox ID="CheckALL" runat="server" οnclick="checkAll(this.checked)" />
</HeaderTemplate>
<HeaderStyle Width="25px" />
</asp:TemplateField>
<asp:BoundField DataField="NO" HeaderText="序号" Visible="True" SortExpression="NO">
<HeaderStyle Width="26px" />
</asp:BoundField>
<asp:BoundField DataField="AF" HeaderText="作者全名" Visible="True">
<%--<HeaderStyle Width="200px" />--%>
</asp:BoundField>
<asp:BoundField DataField="TI" HeaderText="文献标题" Visible="True" SortExpression="TI">
<HeaderStyle Width="100px" />
</asp:BoundField>
<asp:BoundField DataField="SO" HeaderText="出版物名称" Visible="True">
<HeaderStyle Width="100px" />
</asp:BoundField>
<asp:BoundField DataField="PY" HeaderText="出版年" Visible="True" SortExpression="PY">
<HeaderStyle Width="40px" />
</asp:BoundField>
<asp:BoundField DataField="CJMBJG" HeaderText="次级目标机构代码" Visible="True">
<HeaderStyle Width="120px" />
</asp:BoundField>
<asp:BoundField DataField="DYZZDW" HeaderText="第一作者和通讯作者单位" Visible="True">
<HeaderStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="TC" HeaderText="被引频次" Visible="True">
<HeaderStyle Width="56px" />
</asp:BoundField>
<asp:TemplateField>
<HeaderTemplate>
操作
</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton ID="updateButton" runat="server" CommandArgument='<%#Bind("SCIID") %>'
CommandName="updateInfo">修改</asp:LinkButton>
<asp:LinkButton ID="infoDetailButton" runat="server" CommandArgument='<%#Bind("SCIID") %>'
CommandName="detailInfo">详细</asp:LinkButton>
<asp:LinkButton ID="deleteButton" runat="server" CommandArgument='<%#Bind("SCIID") %>'
CommandName="deleteInfo" OnClientClick="return confirm('您确认要删除?')">删除</asp:LinkButton>
</ItemTemplate>
<HeaderStyle Width="86px" />
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
<HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
<PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
<RowStyle BackColor="White" ForeColor="#003399" />
<SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<SortedAscendingCellStyle BackColor="#EDF6F6" />
<SortedAscendingHeaderStyle BackColor="#0D4AC4" />
<SortedDescendingCellStyle BackColor="#D6DFDF" />
<SortedDescendingHeaderStyle BackColor="#002876" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div>
<asp:UpdatePanel ID="UpdatePanel3" runat="server">
<ContentTemplate>
<webdiyer:AspNetPager ID="MyCollectPager" runat="server" OnPageChanged="MyCollectPager_PageChanged"
CurrentPageButtonPosition="Center" Width="100%" HorizontalAlign="center" AlwaysShowFirstLastPageNumber="true"
PagingButtonSpacing="10" AlwaysShow="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页" ShowPageIndexBox="always" PageIndexBoxType="DropDownList"
ShowCustomInfoSection="Right" CustomInfoSectionWidth="40%" PageSize="10" CustomInfoHTML="第<font color='red'><b>%currentPageIndex%</b></font>页,共<b>%PageCount%</b>页,每页<b>%PageSize%</b>条记录,共<b>%RecordCount%</b>条记录 ">
</webdiyer:AspNetPager>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
有关分页控件的部分代码
if (Session["EditSCIPage"] == null)
{
List<string> idList = Services.SCIQueryAll();//获得SCI库中所有数据id
Session["sciIdResults"] = idList;
Dictionary<string, bool> sciSelected = new Dictionary<string, bool>();
Session["sciSelected"] = sciSelected;
MyCollectPager.RecordCount = idList.Count;//信息总条数
searchDataBind(idList, MyCollectPager.StartRecordIndex - 1, MyCollectPager.EndRecordIndex - 1);<span style="font-family: Arial, Helvetica, sans-serif;"> }// /// 根据startIndex 和endIndex 绑定数据到GridView1
</span>
protected void searchDataBind(List<string> idList, int startIndex, int endIndex)
{
List<FunctionSCIView> functionSCIViews = new List<FunctionSCIView>();
Dictionary<string, bool> sciSelected = Session["sciSelected"] as Dictionary<string, bool>;
idList = Services.FindTheIds(idList, startIndex, endIndex);
if (idList != null)
{
//将新的一页的的id加入到集合中(如果不存在)
foreach (string id in idList)
{
if (!sciSelected.ContainsKey(id))
{
sciSelected.Add(id, false);
}
}
var functionSCIList = Services.SCISQueryByID(idList);
foreach (var functionSCI in functionSCIList)
{
FunctionSCIView sciView = new FunctionSCIView(functionSCI);
sciView.ISSELECTED = sciSelected[sciView.SCIID];
functionSCIViews.Add(sciView);
}
}
Session["functionSCIViews"] = functionSCIViews;
GridView1.DataSource = functionSCIViews;
GridView1.DataBind();
}