protected void btnReportUser_ServerClick(object sender, EventArgs e) { UserService.UserCRUDClient userService = new UserService.UserCRUDClient(); userService.Open(); int reportUserResult = userService.reportUser(Convert.ToInt32((string)this.adDetails[13])); userService.Close(); if (reportUserResult == 1) { detailedAdActionResutView.InnerHtml = "<div class='col s12 m6 l4 push-l4 push-m3'>"; detailedAdActionResutView.InnerHtml += "<div class='card'>"; detailedAdActionResutView.InnerHtml += "<div class='card-content black-text'>"; detailedAdActionResutView.InnerHtml += "<span class='card-title bold'>User Reported Successfully</span>"; detailedAdActionResutView.InnerHtml += "<p>You have successfully reported this user. Our proficient team of Moderators and Administrators will review the user's account and ads, and will then decide their fate.<br/><br/>We personally thank you for making twoGames even better!</p><br/>"; detailedAdActionResutView.InnerHtml += "<div class='card-action'>"; detailedAdActionResutView.InnerHtml += "<a href='Index.aspx' runat='server' class='btn waves-effect waves-light'>Continue</a>"; if (Session["User"] != null) { if (((UserData)Session["User"]).isAdmin() == 1) { detailedAdActionResutView.InnerHtml += " <a href='UserManagement.aspx' runat='server' class='btn waves-effect waves-light orange lighten-2'>Manage Users</a>"; } } detailedAdActionResutView.InnerHtml += "</div></div></div></div>"; } else { detailedAdActionResutView.InnerHtml = "<div class='col s12 m6 l4 push-l4 push-m3'>"; detailedAdActionResutView.InnerHtml += "<div class='card'>"; detailedAdActionResutView.InnerHtml += "<div class='card-content black-text'>"; detailedAdActionResutView.InnerHtml += "<span class='card-title bold'>User Reported Unsuccessfully</span>"; detailedAdActionResutView.InnerHtml += "<p>An error occured trying to report this user. You can go back and try again.</p><br/>"; detailedAdActionResutView.InnerHtml += "<div class='card-action'>"; detailedAdActionResutView.InnerHtml += "<a href='DetailedAd.aspx?" + (string)adDetails[0] + "' runat='server' class='btn waves-effect waves-light'>Go Back</a>"; if (Session["User"] != null) { if (((UserData)Session["User"]).isAdmin() == 1) { detailedAdActionResutView.InnerHtml += " <a href='UserManagement.aspx' runat='server' class='btn waves-effect waves-light orange lighten-2'>Manage Users</a>"; } } detailedAdActionResutView.InnerHtml += "</div></div></div></div>"; } }