/// <summary> /// This function is creating a table values. /// </summary> /// <param name="FName"></param> /// <param name="LName"></param> /// <param name="Email"></param> /// <param name="DateCreated"></param> /// <param name="RoleStatus">is Status of the ROLE this user is selected for. This can be Active or inactive</param> /// <param name="UserRoleId">This is the UserRoleId for Admin to disable the Role for a user.</param> /// <param name="AcctStatus">This is User Account Status.</param> protected void showTable(string FName, string LName, string Email, string DateCreated, string RoleName, int AcctStatus, int IsAdmin, string AuthorisedUserId) { AuthorisedUserId = objcryptoJS.AES_encrypt(AuthorisedUserId, AppConstants.secretKey, AppConstants.initVec).ToString(); StringBuilder strContent = new StringBuilder("<tr>"); strContent.Append("<td width='15%' nowrap>"); strContent.Append(FName); strContent.Append("</td>"); strContent.Append("<td width='15%' nowrap>"); strContent.Append(LName); strContent.Append("</td>"); strContent.Append("<td width='20%'nowrap>"); strContent.Append(Email); strContent.Append("</td>"); strContent.Append("<td width='10%' nowrap>"); strContent.Append(DateCreated); strContent.Append("</td>"); strContent.Append("<td width='20%' nowrap>"); strContent.Append(GlobalMethods.AcctStatus(AcctStatus)); strContent.Append("</td>"); strContent.Append("<td width='20%'nowrap>"); strContent.Append(RoleName); strContent.Append("</td>"); //*************************************** strContent.Append("<td width='10%' nowrap>"); if (IsAdmin == 0) { strContent.Append("<a class='btn btn-xs btn-success open-DeleteVideoOff' href='#' data-id='"); strContent.Append(System.Web.HttpUtility.UrlEncode(AuthorisedUserId)); strContent.Append("' data-toggle='modal'> Admin On </a>"); } else { strContent.Append("<a class='btn btn-xs btn-danger open-DeleteVideoOn' href='#' data-id='"); strContent.Append(System.Web.HttpUtility.UrlEncode(AuthorisedUserId)); strContent.Append("' data-toggle='modal'> Admin Off </a>"); } strContent.Append("</td>"); //*************************************** strContent.Append("<td width='10%' nowrap>"); if (AcctStatus.ToString() == "-1") { strContent.Append("<a class='btn btn-xs btn-success open-ActivateAcctOff' href='#' data-id='"); strContent.Append(System.Web.HttpUtility.UrlEncode(AuthorisedUserId)); strContent.Append("' data-toggle='modal'> Activate Account </a>"); } else { strContent.Append("<a class='btn btn-xs btn-danger open-ActivateAcctOn' href='#' data-id='"); strContent.Append(System.Web.HttpUtility.UrlEncode(AuthorisedUserId)); strContent.Append("' data-toggle='modal'> Disable Account </a>"); } strContent.Append("</td>"); pnlVideos.Controls.Add(new LiteralControl(strContent.ToString())); }
/// <summary> /// This function is creating a table values. /// </summary> /// <param name="FName"></param> /// <param name="LName"></param> /// <param name="Email"></param> /// <param name="DateCreated"></param> /// <param name="RoleStatus">is Status of the ROLE this user is selected for. This can be Active or inactive</param> /// <param name="UserRoleId">This is the UserRoleId for Admin to disable the Role for a user.</param> /// <param name="AcctStatus">This is User Account Status.</param> protected void showTable(string FName, string LName, string Email, string DateCreated, string RoleStatus, string UserRoleId, int AcctStatus) { UserRoleId = objcryptoJS.AES_encrypt(UserRoleId, AppConstants.secretKey, AppConstants.initVec).ToString(); StringBuilder strContent = new StringBuilder("<tr>"); strContent.Append("<td width='15%' nowrap>"); strContent.Append(FName); strContent.Append("</td>"); strContent.Append("<td width='15%' nowrap>"); strContent.Append(LName); strContent.Append("</td>"); strContent.Append("<td width='20%'nowrap>"); strContent.Append(Email); strContent.Append("</td>"); strContent.Append("<td width='10%' nowrap>"); strContent.Append(DateCreated); strContent.Append("</td>"); strContent.Append("<td width='20%' nowrap>"); strContent.Append(GlobalMethods.AcctStatus(AcctStatus)); strContent.Append("</td>"); strContent.Append("<td width='20%'nowrap>"); strContent.Append(GlobalMethods.IsActive(RoleStatus.ToString())); strContent.Append("</td>"); //*************************************** strContent.Append("<td width='10%' nowrap>"); if (RoleStatus == "0") { strContent.Append("<a class='btn btn-xs btn-success open-DeleteVideo' href='#' data-id='"); strContent.Append(System.Web.HttpUtility.UrlEncode(UserRoleId)); strContent.Append("' data-toggle='modal'> Activate Role </a>"); } else { strContent.Append("<a class='btn btn-xs btn-danger open-DeleteVideo' href='#' data-id='"); strContent.Append(System.Web.HttpUtility.UrlEncode(UserRoleId)); strContent.Append("' data-toggle='modal'> Deactivate Role </a>"); } strContent.Append("</td>"); pnlVideos.Controls.Add(new LiteralControl(strContent.ToString())); }