|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Import Namespace="System.Security.Principal" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Common Component Management System</title>
</head>
<body>
<form id="Form1" method="post" runat="server">
<asp:Label ID="lblName" Runat="server" Font-Size="Small" />
<asp:Label ID="lblAuthType" Runat="server" Font-Size="Small" />
<br />
<asp:Label ID="lblIsAdmin" runat="server" Font-Size="Small" ForeColor="Blue" Text="lblIsAdmin"></asp:Label><br />
<asp:Label ID="lblNumOfStatistics" runat="server" Text="NumOf" Width="650px" Font-Size="Small"></asp:Label> <br />
<asp:RadioButtonList ID="RadioButtonList" runat="server" BackColor="Khaki" Height="105px" Width="189px" style="z-index: 100; left: 410px; position: absolute; top: 8px" BorderColor="Red" Font-Size="Small" AutoPostBack="True" OnSelectedIndexChanged="RadioButtonList_SelectedIndexChanged">
<asp:ListItem Value="0">新增(上傳)元件</asp:ListItem>
<asp:ListItem Value="1">搜尋/修改評論/下載 /元件</asp:ListItem>
<asp:ListItem Value="2">系統管理</asp:ListItem>
</asp:RadioButtonList>
<asp:Label ID="lblTimeOfDoStatistics" runat="server" Text="lblTimeOfDoStatistics" Width="650px" Font-Size="Small"></asp:Label>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<br />
<asp:HyperLink ID="HyperLinkRSS" runat="server" Height="5px" ImageUrl="~/images/RSS.jpg"
NavigateUrl="~/CathayBkRSS.xml" Width="12px">RSS Feed</asp:HyperLink>訂閱共用元件管理系統 RSS 消息來源
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="lblTimeNow" runat="server" Font-Size="X-Large" ForeColor="Blue" Text="現在時間:"
Width="650px"></asp:Label>
<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick">
</asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<br />
<hr />
<asp:SqlDataSource ID="sqlDSComponent" runat="server" ConnectionString="<%$ ConnectionStrings:CCSConnectionString %>"
SelectCommand="SELECT TOP 10 COMPONENT_ID, NAME, CONTRIBUTOR, TOTAL_SCORE / DL_CNT AS AVG_SCORE FROM COMPONENT ORDER BY AVG_SCORE DESC">
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="LightGoldenrodYellow"
BorderColor="Tan" BorderWidth="1px" Caption="優質元件排名" CellPadding="2" DataKeyNames="COMPONENT_ID"
DataSourceID="sqlDSComponent" Font-Size="Small" ForeColor="Black" GridLines="None"
Style="z-index: 104; left: 332px; position: absolute; top: 239px">
<FooterStyle BackColor="Tan" />
<Columns>
<asp:BoundField DataField="COMPONENT_ID" HeaderText="COMPONENT_ID" ReadOnly="True"
SortExpression="COMPONENT_ID" />
<asp:BoundField DataField="NAME" HeaderText="NAME" SortExpression="NAME" />
<asp:BoundField DataField="CONTRIBUTOR" HeaderText="CONTRIBUTOR" SortExpression="CONTRIBUTOR" />
<asp:BoundField DataField="AVG_SCORE" HeaderText="AVG_SCORE" ReadOnly="True" SortExpression="AVG_SCORE" />
</Columns>
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<AlternatingRowStyle BackColor="PaleGoldenrod" />
</asp:GridView>
<asp:GridView ID="gvContributorRankTable" runat="server" AutoGenerateColumns="False"
BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" Caption="元件平均得分排名"
CellPadding="2" DataKeyNames="USER_ID" DataSourceID="SqlDSUserRank" Font-Size="Small"
ForeColor="Black" GridLines="None" Style="z-index: 102; left: 40px; position: absolute;
top: 237px" Width="158px">
<FooterStyle BackColor="Tan" />
<Columns>
<asp:BoundField DataField="USER_ID" HeaderText="USER_ID" ReadOnly="True" SortExpression="USER_ID" />
<asp:BoundField DataField="AVG_SCORE" HeaderText="AVG_SCORE" ReadOnly="True" SortExpression="AVG_SCORE" />
</Columns>
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<AlternatingRowStyle BackColor="PaleGoldenrod" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDSUserRank" runat="server" ConnectionString="<%$ ConnectionStrings:CCSConnectionString %>"
SelectCommand="SELECT TOP 10 USER_ID, USER_SCORE/CONTRIBUTE_CNT AS AVG_SCORE FROM [USER] ORDER BY AVG_SCORE DESC, USER_ID">
</asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDSDLRank" runat="server" ConnectionString="<%$ ConnectionStrings:CCSConnectionString %>"
SelectCommand="SELECT top 10 [NAME], [CONTRIBUTOR], [VERSION], [FRAMEWORK], [DL_CNT] FROM [COMPONENT] ORDER BY [DL_CNT] DESC">
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDSContributeCnt" runat="server" ConnectionString="<%$ ConnectionStrings:CCSConnectionString %>"
SelectCommand="SELECT [USER_ID], [USER_SCORE], [CONTRIBUTE_CNT] FROM [USER]"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDSTotalDLCntByUserID" runat="server" ConnectionString="<%$ ConnectionStrings:CCSConnectionString %>"
SelectCommand="SELECT TOP 10 USER_ID, COUNT(USER_ID) AS '元件下載總次數' FROM DOWNLOAD_LIST GROUP BY USER_ID ">
</asp:SqlDataSource>
<asp:GridView ID="gvTotalDLCntByUserID" runat="server" AutoGenerateColumns="False"
BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" Caption="每個人下載元件的總次數"
CellPadding="2" DataSourceID="SqlDSTotalDLCntByUserID" Font-Size="Small" ForeColor="Black"
GridLines="None" Style="left: 0px; position: relative; top: 382px">
<FooterStyle BackColor="Tan" />
<Columns>
<asp:BoundField DataField="USER_ID" HeaderText="USER_ID" SortExpression="USER_ID" />
<asp:BoundField DataField="元件下載總次數" HeaderText="元件下載總次數" ReadOnly="True" SortExpression="元件下載總次數" />
</Columns>
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<AlternatingRowStyle BackColor="PaleGoldenrod" />
</asp:GridView>
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" BackColor="LightGoldenrodYellow"
BorderColor="Tan" BorderWidth="1px" Caption="元件被下載次數排名" CellPadding="2" DataSourceID="SqlDSDLRank"
Font-Size="Small" ForeColor="Black" GridLines="None" Style="left: 321px; position: relative;
top: 254px">
<FooterStyle BackColor="Tan" />
<Columns>
<asp:BoundField DataField="NAME" HeaderText="NAME" SortExpression="NAME" />
<asp:BoundField DataField="CONTRIBUTOR" HeaderText="CONTRIBUTOR" SortExpression="CONTRIBUTOR" />
<asp:BoundField DataField="VERSION" HeaderText="VERSION" SortExpression="VERSION" />
<asp:BoundField DataField="FRAMEWORK" HeaderText="FRAMEWORK" SortExpression="FRAMEWORK" />
<asp:BoundField DataField="DL_CNT" HeaderText="DL_CNT" SortExpression="DL_CNT" />
</Columns>
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<AlternatingRowStyle BackColor="PaleGoldenrod" />
</asp:GridView>
<asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" BackColor="LightGoldenrodYellow"
BorderColor="Tan" BorderWidth="1px" Caption="元件貢獻者總分及總貢獻數目" CellPadding="2" DataKeyNames="USER_ID"
DataSourceID="SqlDSContributeCnt" Font-Size="Small" ForeColor="Black" GridLines="None"
Style="left: 7px; position: relative; top: -142px">
<FooterStyle BackColor="Tan" />
<Columns>
<asp:BoundField DataField="USER_ID" HeaderText="USER_ID" ReadOnly="True" SortExpression="USER_ID" />
<asp:BoundField DataField="USER_SCORE" HeaderText="USER_SCORE" SortExpression="USER_SCORE" />
<asp:BoundField DataField="CONTRIBUTE_CNT" HeaderText="CONTRIBUTE_CNT" SortExpression="CONTRIBUTE_CNT" />
</Columns>
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<AlternatingRowStyle BackColor="PaleGoldenrod" />
</asp:GridView>
<br />
</form>
</body>
</html>
|