Esempio n. 1
0
        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
                lblCharacterSkils.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
                lblCharacterSkils.Text = TableCode + "</table>";
            }
        }
        private void BuildLoginTable()
        {
            int      LoginAuditRowCounter = 1;
            int      iTemp = 0;
            DateTime dtTemp;
            int      UserID = 0;
            string   LoginEST;
            string   Player         = "";
            string   UsernameUsed   = "";
            string   PasswordUsed   = "";
            string   Browser        = "";
            string   BrowserVersion = "";
            string   OS             = "";
            string   OSVersion      = "";
            string   IPAddress      = "";
            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 AViews       = new Classes.cAdminViews();
            DataTable           dtLoginAudit = new DataTable();

            dtLoginAudit = AViews.GetLoginAudit();
            if (AViews.LoginAuditCount == 0)
            {
                // Build table with no records
                lblViewLogins.Text = TableCode + "There are no user login records within the past 30 days</td></tr></table>";
            }
            else
            {
                foreach (DataRow dRow in dtLoginAudit.Rows)
                {
                    if (LoginAuditRowCounter == 1)
                    {
                        // Build the header row
                        TableCode = TableCode + "UserID</td><td>Login (EST)</td><td>Player</td><td>Username</td><td>Password</td><td>Browser</td>";
                        TableCode = TableCode + "<td>Version</td><td>OS</td><td>Version</td><td>IP Address</td></tr>";
                    }
                    // Build the detail row if the 'To' or 'From' campaign is the drop down list campaign
                    //RecvFromCampaign = dRow["RecvFromCampaign"].ToString();
                    //ReceivingCampaign = dRow["ReceivingCampaign"].ToString();
                    if (int.TryParse(dRow["UserID"].ToString(), out iTemp))
                    {
                        UserID = iTemp;
                    }
                    TableCode = TableCode + "<td>" + UserID + "</td>";
                    if (DateTime.TryParse(dRow["LoginEST"].ToString(), out dtTemp))
                    {
                        LoginEST = string.Format("{0:MM/d/yyyy hh:mm:ss}", dtTemp);
                    }
                    else
                    {
                        LoginEST = "";
                    }
                    TableCode      = TableCode + "<td>" + LoginEST + "</td>";
                    Player         = dRow["Player"].ToString();
                    TableCode      = TableCode + "<td>" + Player + "</td>";
                    UsernameUsed   = dRow["UsernameUsed"].ToString();
                    TableCode      = TableCode + "<td>" + UsernameUsed + "</td>";
                    PasswordUsed   = dRow["PasswordUsed"].ToString();
                    TableCode      = TableCode + "<td>" + PasswordUsed + "</td>";
                    Browser        = dRow["Browser"].ToString();
                    TableCode      = TableCode + "<td>" + Browser + "</td>";
                    BrowserVersion = dRow["BrowserVersion"].ToString();
                    TableCode      = TableCode + "<td>" + BrowserVersion + "</td>";
                    OS             = dRow["OS"].ToString();
                    TableCode      = TableCode + "<td>" + OS + "</td>";
                    OSVersion      = dRow["OSVersion"].ToString();
                    TableCode      = TableCode + "<td>" + OSVersion + "</td>";
                    IPAddress      = dRow["IPAddress"].ToString();
                    TableCode      = TableCode + "<td>" + IPAddress + "</td></tr>";
                    LoginAuditRowCounter++;
                }
                // Build the table close
                lblViewLogins.Text = TableCode + "</table>";
            }
        }
        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>";
            }
        }