private void BuildCharacterTable() { int CharacterRowCounter = 1; int iTemp = 0; double dTemp; string CharacterAKA = ""; string TeamName = ""; string CharacterFirstName = ""; string CharacterMiddleName = ""; string CharacterLastName = ""; int PlotLeadPerson = 0; string FirstName = ""; string LastName = ""; string DateOfBirth = ""; string WhereFrom = ""; string CurrentHome = ""; double TotalCP = 0; string PlayerComments = ""; int CharacterSkillSetID = 0; string dq = "\""; string TableCode = "<table id=" + dq + "events-table" + dq + "class=" + dq + "table table-striped table-bordered table-hover table-condensed" + dq; TableCode = TableCode + " data-toggle=" + dq + "table" + dq + " data-height=" + dq + "250" + dq + " data-sort-name=" + dq; TableCode = TableCode + " date-earned" + dq + " data-sort-order=" + dq + " desc" + dq + " data-click-to-select=" + dq + "true" + dq; TableCode = TableCode + " data-select-item-name=" + dq + "total-point" + dq + "><tr><td>"; Classes.cAdminViews Chars5G = new Classes.cAdminViews(); DataTable dtChars5G = new DataTable(); dtChars5G = Chars5G.FifthGateCharacterList(); if (Chars5G.CharacterCount == 0) { // Build table with no records lblCharacters.Text = TableCode + "There are no Fifth Gate characters</td></tr></table>"; } else { foreach (DataRow dRow in dtChars5G.Rows) { if (CharacterRowCounter == 1) { // Build the header row TableCode = TableCode + "CharacterAKA</td><td>TeamName</td><td>CharacterFirstName</td><td>CharacterMiddleName</td><td>CharacterLastName</td>"; TableCode = TableCode + "<td>PlotLeadPerson</td><td>FirstName</td><td>LastName</td><td>DateOfBirth</td><td>WhereFrom</td>"; TableCode = TableCode + "<td>CurrentHome</td><td>TotalCP</td><td>PlayerComments</td><td>CharacterSkillSetID</td></tr>"; } CharacterAKA = dRow["CharacterAKA"].ToString(); TableCode = TableCode + "<td>" + CharacterAKA + "</td>"; TeamName = dRow["TeamName"].ToString(); TableCode = TableCode + "<td>" + TeamName + "</td>"; CharacterFirstName = dRow["CharacterFirstName"].ToString(); TableCode = TableCode + "<td>" + CharacterFirstName + "</td>"; CharacterMiddleName = dRow["CharacterMiddleName"].ToString(); TableCode = TableCode + "<td>" + CharacterMiddleName + "</td>"; CharacterLastName = dRow["CharacterLastName"].ToString(); TableCode = TableCode + "<td>" + CharacterLastName + "</td>"; if (int.TryParse(dRow["PlotLeadPerson"].ToString(), out iTemp)) { PlotLeadPerson = iTemp; } TableCode = TableCode + "<td>" + PlotLeadPerson + "</td>"; FirstName = dRow["FirstName"].ToString(); TableCode = TableCode + "<td>" + FirstName + "</td>"; LastName = dRow["LastName"].ToString(); TableCode = TableCode + "<td>" + LastName + "</td>"; DateOfBirth = dRow["DateOfBirth"].ToString(); TableCode = TableCode + "<td>" + DateOfBirth + "</td>"; WhereFrom = dRow["WhereFrom"].ToString(); TableCode = TableCode + "<td>" + WhereFrom + "</td>"; CurrentHome = dRow["CurrentHome"].ToString(); TableCode = TableCode + "<td>" + CurrentHome + "</td>"; if (double.TryParse(dRow["TotalCP"].ToString(), out dTemp)) { TotalCP = dTemp; } TableCode = TableCode + "<td>" + TotalCP + "</td>"; PlayerComments = dRow["PlayerComments"].ToString(); TableCode = TableCode + "<td>" + PlayerComments + "</td>"; if (int.TryParse(dRow["CharacterSkillSetID"].ToString(), out iTemp)) { CharacterSkillSetID = iTemp; } TableCode = TableCode + "<td>" + CharacterSkillSetID + "</td></tr>"; CharacterRowCounter++; } // Build the table close lblCharacters.Text = TableCode + "</table>"; } }
private void BuildCharacterSkillTable() { int CharacterSkillRowCounter = 1; int iTemp = 0; string CharacterAKA = ""; string FirstName = ""; string LastName = ""; string World = ""; string DescriptorValue = ""; string SkillName = ""; int SkillTypeID = 0; int SkillID = 0; string OrderOrigin = ""; string AttributeDesc = ""; string TeamName = ""; string dq = "\""; string TableCode = "<table id=" + dq + "events-table" + dq + "class=" + dq + "table table-striped table-bordered table-hover table-condensed" + dq; TableCode = TableCode + " data-toggle=" + dq + "table" + dq + " data-height=" + dq + "250" + dq + " data-sort-name=" + dq; TableCode = TableCode + " date-earned" + dq + " data-sort-order=" + dq + " desc" + dq + " data-click-to-select=" + dq + "true" + dq; TableCode = TableCode + " data-select-item-name=" + dq + "total-point" + dq + "><tr><td>"; Classes.cAdminViews Chars5G = new Classes.cAdminViews(); DataTable dtChars5G = new DataTable(); dtChars5G = Chars5G.FifthGateCharacterSkillList(); if (Chars5G.CharacterSkillCount == 0) { // Build table with no records lblCharacterSkills.Text = TableCode + "There are no Fifth Gate character skills</td></tr></table>"; } else { foreach (DataRow dRow in dtChars5G.Rows) { if (CharacterSkillRowCounter == 1) { // Build the header row TableCode = TableCode + "CharacterAKA</td><td>FirstName</td><td>LastName</td><td>World</td><td>Team</td><td>SkillTypeID</td>"; TableCode = TableCode + "<td>Order Origin</td><td>Skill</td><td>Attribute</td><td>DescriptorValue</td><td>SkillID</td></tr>"; } CharacterAKA = dRow["CharacterAKA"].ToString(); TableCode = TableCode + "<td>" + CharacterAKA + "</td>"; FirstName = dRow["FirstName"].ToString(); TableCode = TableCode + "<td>" + FirstName + "</td>"; LastName = dRow["LastName"].ToString(); TableCode = TableCode + "<td>" + LastName + "</td>"; World = dRow["World"].ToString(); TableCode = TableCode + "<td>" + World + "</td>"; TeamName = dRow["Team"].ToString(); TableCode = TableCode + "<td>" + TeamName + "</td>"; if (int.TryParse(dRow["SkillTypeID"].ToString(), out iTemp)) { SkillTypeID = iTemp; } TableCode = TableCode + "<td>" + SkillTypeID + "</td>"; OrderOrigin = dRow["OrderOrigin"].ToString(); TableCode = TableCode + "<td>" + OrderOrigin + "</td>"; SkillName = dRow["SkillName"].ToString(); TableCode = TableCode + "<td>" + SkillName + "</td>"; AttributeDesc = dRow["AttributeDesc"].ToString(); TableCode = TableCode + "<td>" + AttributeDesc + "</td>"; DescriptorValue = dRow["DescriptorValue"].ToString(); TableCode = TableCode + "<td>" + DescriptorValue + "</td>"; if (int.TryParse(dRow["SkillID"].ToString(), out iTemp)) { SkillID = iTemp; } TableCode = TableCode + "<td>" + SkillID + "</td></tr>"; CharacterSkillRowCounter++; } // Build the table close lblCharacterSkills.Text = TableCode + "</table>"; } }
private void BuildRegistrationTable() { int RegistrationRowCounter = 1; int iTemp = 0; int RegistrationID = 0; string EventName = ""; string DateRegistered = ""; string StatusName = ""; string CharacterAKA = ""; string OrderName = ""; string TeamName = ""; string FirstName = ""; string LastName = ""; string Description = ""; string EmailAddress = ""; string PlayerCommentsToStaff = ""; string dq = "\""; string TableCode = "<table id=" + dq + "events-table" + dq + "class=" + dq + "table table-striped table-bordered table-hover table-condensed" + dq; TableCode = TableCode + " data-toggle=" + dq + "table" + dq + " data-height=" + dq + "250" + dq + " data-sort-name=" + dq; TableCode = TableCode + " date-earned" + dq + " data-sort-order=" + dq + " desc" + dq + " data-click-to-select=" + dq + "true" + dq; TableCode = TableCode + " data-select-item-name=" + dq + "total-point" + dq + "><tr><td>"; Classes.cAdminViews Reg5G = new Classes.cAdminViews(); DataTable dtReg5G = new DataTable(); dtReg5G = Reg5G.FifthGateRegistrations(530, 25); // Event 530 Silverfire Event 2 - Skill Type 25 Origins if (Reg5G.RegCount == 0) { // Build table with no records lblCharacters.Text = TableCode + "There are no Fifth Gate registrations</td></tr></table>"; } else { foreach (DataRow dRow in dtReg5G.Rows) { if (RegistrationRowCounter == 1) { // Build the header row TableCode = TableCode + "Registration ID</td><td>Event Name</td><td>Date Registered</td><td>Status</td><td>Character AKA</td><td>Order</td>"; TableCode = TableCode + "<td>Team Name</td><td>First Name</td><td>Last Name</td><td>Payment</td><td>Email Address</td>"; TableCode = TableCode + "<td>Player Comments To Staff</td></tr>"; } if (int.TryParse(dRow["RegistrationID"].ToString(), out iTemp)) { RegistrationID = iTemp; } TableCode = TableCode + "<td>" + RegistrationID + "</td>"; EventName = dRow["EventName"].ToString(); TableCode = TableCode + "<td>" + EventName + "</td>"; DateRegistered = dRow["DateRegistered"].ToString(); TableCode = TableCode + "<td>" + DateRegistered + "</td>"; StatusName = dRow["StatusName"].ToString(); TableCode = TableCode + "<td>" + StatusName + "</td>"; CharacterAKA = dRow["CharacterAKA"].ToString(); TableCode = TableCode + "<td>" + CharacterAKA + "</td>"; OrderName = dRow["OrderName"].ToString(); TableCode = TableCode + "<td>" + OrderName + "</td>"; TeamName = dRow["TeamName"].ToString(); TableCode = TableCode + "<td>" + TeamName + "</td>"; FirstName = dRow["FirstName"].ToString(); TableCode = TableCode + "<td>" + FirstName + "</td>"; LastName = dRow["LastName"].ToString(); TableCode = TableCode + "<td>" + LastName + "</td>"; Description = dRow["Description"].ToString(); TableCode = TableCode + "<td>" + Description + "</td>"; EmailAddress = dRow["EmailAddress"].ToString(); TableCode = TableCode + "<td>" + EmailAddress + "</td>"; PlayerCommentsToStaff = dRow["PlayerCommentsToStaff"].ToString(); TableCode = TableCode + "<td>" + PlayerCommentsToStaff + "</td></tr>"; RegistrationRowCounter++; } // Build the table close lblCharacters.Text = TableCode + "</table>"; } }