diff --git a/gts/RoomLeaders.aspx b/gts/RoomLeaders.aspx new file mode 100644 index 00000000..e85a6817 --- /dev/null +++ b/gts/RoomLeaders.aspx @@ -0,0 +1,25 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="RoomLeaders.aspx.cs" Inherits="PkmnFoundations.GTS.RoomLeaders" %> + + + + + +
+

Enter the rank and room number to get leader info:

+
+ Rank: + +
+
+ Room number: + +
+
+ +
+ +
+ +
+
+
diff --git a/gts/RoomLeaders.aspx.cs b/gts/RoomLeaders.aspx.cs new file mode 100644 index 00000000..2f5a7867 --- /dev/null +++ b/gts/RoomLeaders.aspx.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using PkmnFoundations.Data; +using PkmnFoundations.Structures; +using PkmnFoundations.Support; + +namespace PkmnFoundations.GTS +{ + public partial class RoomLeaders : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + protected void btnGet_Click(object sender, EventArgs e) + { + byte rank; + byte room; + + if (!Byte.TryParse(txtRank.Text, out rank) || + !Byte.TryParse(txtRoom.Text, out room)) + { + litResults.Text = "Please type numbers."; + return; + } + + if (rank > 10 || rank < 1) + { + litResults.Text = "Rank must be 1-10."; + } + if (room > 50 || rank < 1) + { + litResults.Text = "Room must be 1-50."; + } + + rank--; + room--; + + BattleTowerProfile4[] results = DataAbstract.Instance.BattleTowerGetLeaders4(rank, room); + + StringBuilder builder = new StringBuilder(); + builder.Append(""); + litResults.Text = builder.ToString(); + } + } +} \ No newline at end of file diff --git a/gts/RoomLeaders.aspx.designer.cs b/gts/RoomLeaders.aspx.designer.cs new file mode 100644 index 00000000..cbdc5dbe --- /dev/null +++ b/gts/RoomLeaders.aspx.designer.cs @@ -0,0 +1,60 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace PkmnFoundations.GTS { + + + public partial class RoomLeaders { + + /// + /// theForm control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm theForm; + + /// + /// txtRank control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtRank; + + /// + /// txtRoom control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtRoom; + + /// + /// btnGet control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnGet; + + /// + /// litResults control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal litResults; + } +} diff --git a/gts/gts.csproj b/gts/gts.csproj index f6d6f959..0084d1b6 100644 --- a/gts/gts.csproj +++ b/gts/gts.csproj @@ -72,6 +72,7 @@ + @@ -134,6 +135,13 @@ pkvldtprod.ashx + + RoomLeaders.aspx + ASPXCodeBehind + + + RoomLeaders.aspx +