protected void Page_Load(object sender, EventArgs e) { Session[clsEALSession.ValuePath] = "Reports"; Session[clsEALSession.Display] = "All Reports"; GetLoggedInUserName(); clsBALCommon objclsBALCommon = new clsBALCommon(); objclsEALLoggedInUser = objclsBALCommon.FetchUserDetailsFromAD(LoggedInUser); strUserName = objclsEALLoggedInUser.StrUserName; strUserSID = objclsEALLoggedInUser.StrUserSID; Session[clsEALSession.UserSID] = strUserSID; Session[clsEALSession.CurrentUser] = strUserName; lblError.Text = ""; lblSuccess.Text = ""; GetCurrentUserRole(); if (!IsPostBack) { try { if (role != null) { if (role.Contains <string>(clsEALRoles.ComplianceAdmin) || role.Contains <string>(clsEALRoles.ComplianceAuditor) || role.Contains <string>(clsEALRoles.ComplianceTester) || role.Contains <string>(clsEALRoles.ControlOwner) || role.Contains <string>(clsEALRoles.GlobalApprover) || role.Contains <string>(clsEALRoles.Approver)) { lblPeriod.Visible = true; ddlQuarter.Visible = true; lblMsg.Visible = false; QuarterDropDown(); //if (ddlQuarter.SelectedIndex != 0) //{ // BindAppGrid(); //} //else //{ // lblError.Text = "Please select quarter."; //} } else { strQuarterSelected = ""; Session[clsEALSession.SelectedQuarter] = strQuarterSelected; BindAppGrid(); } } } catch (NullReferenceException) { Response.Redirect("wfrmErrorPage.aspx", true); } catch (Exception ex) { HttpContext Context = HttpContext.Current; LogException objLogException = new LogException(); objLogException.LogErrorInDataBase(ex, Context); Response.Redirect("wfrmErrorPage.aspx", true); } } }
protected void gvRole_RowUpdating(object sender, GridViewUpdateEventArgs e) { lblError.Text = ""; lblSuccess.Text = ""; try { Label lblUserADID = (Label)gvRole.Rows[e.RowIndex].FindControl("lblUserADID"); string strUsersADID = lblUserADID.Text.ToString(); DropDownList ddlGridRole = (DropDownList)gvRole.Rows[e.RowIndex].FindControl("ddlGridRole"); clsEALUser objclsEALuser = new clsEALUser(); objclsBALCommon = new clsBALCommon(); objclsEALuser = objclsBALCommon.FetchUserDetailsFromAD(strUsersADID); string strUserRole = ddlGridRole.SelectedItem.Value; if (objclsEALuser != null) { if (ddlGridRole.SelectedIndex != 0) { objclsBALUsers = new clsBALUsers(); objclsBALUsers.UpdateUser(objclsEALuser, strUserRole, objclsEALLoggedInUser.StrUserADID); lblSuccess.Text = "User's role updated successfully."; gvRole.EditIndex = -1; PopulateGrid(); if (ViewState["SortExpression"] != null && ViewState["sortDirection"] != null) { SortGridView(ViewState["SortExpression"].ToString(), ViewState["sortDirection"].ToString()); } } else { lblError.Text = "select role for user."; } } else { lblError.Text = "User Not Found."; } } catch (NullReferenceException) { Response.Redirect("wfrmErrorPage.aspx", true); } catch (Exception ex) { HttpContext context = HttpContext.Current; LogException objclsLogException = new LogException(); objclsLogException.LogErrorInDataBase(ex, context); Response.Redirect("wfrmErrorPage.aspx", true); } }
protected void gvApplications_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { bool CompletionStatus = false; Label lblSatus = (Label)e.Row.FindControl("lblStatus"); Label lblAppId = (Label)e.Row.FindControl("lblAppID"); String selectedQuarter = (ddlQuarter.SelectedIndex.Equals(0)) ? String.Empty : ddlQuarter.SelectedItem.Text.Trim(); Label lblControlOwner1 = (Label)e.Row.FindControl("lblControlOwner"); //lblSatus.Text = FetchApplicationStatus(role, selectedQuarter, Convert.ToInt32(lblAppId.Text)); clsBALApplication objclsBALApplication = new clsBALApplication(); clsEALUser objController = new clsEALUser(); //objController = objclsBALCommon.FetchUserDetailsFromAD(lblControlOwner1.Text.ToString()); clsBALCommon objclsBALCommon1 = new clsBALCommon(); DataSet dsCO = objclsBALCommon1.GetAppControlOwnerInfo(Convert.ToInt32(lblAppId.Text)); if (dsCO != null) { if (dsCO.Tables[0].Rows.Count > 0) { objController = objclsBALCommon1.FetchUserDetailsFromAD(dsCO.Tables[0].Rows[0][5].ToString()); if (objController != null) { if (role.Contains <string>(clsEALRoles.ComplianceAdmin)) { CompletionStatus = objclsBALApplication.GetApplicationCompletionStatus(clsEALRoles.ComplianceAdmin, objController, selectedQuarter, Convert.ToInt32(lblAppId.Text)); } else { CompletionStatus = objclsBALApplication.GetApplicationCompletionStatus(clsEALRoles.ControlOwner, objController, selectedQuarter, Convert.ToInt32(lblAppId.Text)); } } if (CompletionStatus) { lblSatus.Text = "Completed"; } else { lblSatus.Text = "Pending"; } } } if (lblSatus.Text == "Status") { lblSatus.Text = "Pending"; } } }
protected void Page_Load(object sender, EventArgs e) { GetLoggedInUserName(); clsBALCommon objclsBALCommon = new clsBALCommon(); objclsEALLoggedInUser = objclsBALCommon.FetchUserDetailsFromAD(LoggedInUser); Session[clsEALSession.CurrentUser] = objclsEALLoggedInUser; strUserName = objclsEALLoggedInUser.StrUserName; strUserSID = objclsEALLoggedInUser.StrUserSID; GetCurrentUserRole(); if (!IsPostBack) { PopulateMenu(); } }
protected void Page_Load(object sender, EventArgs e) { Session[clsEALSession.ValuePath] = "Home"; GetLoggedInUserName(); clsBALCommon objclsBALCommon = new clsBALCommon(); objclsEALLoggedInUser = objclsBALCommon.FetchUserDetailsFromAD(LoggedInUser); strUserName = objclsEALLoggedInUser.StrUserName; strUserSID = objclsEALLoggedInUser.StrUserSID; Session[clsEALSession.CurrentUser] = strUserName; btnSave.Visible = false; GetCurrentUserRole(); if (!IsPostBack) { AdminHomeFun(); GetHomePageText(); } }
private void GetLoggedInuser() { LoggedInUser = Convert.ToString(System.Configuration.ConfigurationSettings.AppSettings["ADIDTemp"]); if (LoggedInUser != null) { if (LoggedInUser.Length < 1) { LoggedInUser = HttpContext.Current.User.Identity.Name; } } else { LoggedInUser = HttpContext.Current.User.Identity.Name; } clsBALCommon objclsBALCommon = new clsBALCommon(); objclsEALLoggedInUser = objclsBALCommon.FetchUserDetailsFromAD(LoggedInUser); Session[clsEALSession.CurrentUser] = objclsEALLoggedInUser; }
protected void gvRole_RowDeleting(object sender, GridViewDeleteEventArgs e) { lblError.Text = ""; lblSuccess.Text = ""; gvRole.EditIndex = -1; try { Label lblUserADID = (Label)gvRole.Rows[e.RowIndex].FindControl("lblUserADID"); Label lblUserName = (Label)gvRole.Rows[e.RowIndex].FindControl("lblUserName"); Label lblUserID = (Label)gvRole.Rows[e.RowIndex].FindControl("lblUserID"); string strUserADID = lblUserADID.Text.ToString(); objclsBALCommon = new clsBALCommon(); clsEALUser objclsEALUser = new clsEALUser(); objclsEALUser = objclsBALCommon.FetchUserDetailsFromAD(strUserADID); if (objclsEALUser != null) { SortGridViewOnEditDelete(); DeleteUserRole(objclsEALUser); //objclsBALUsers.DeleteUser(objclsEALUser); lblSuccess.Text = "User role deleted successfully."; PopulateGrid(); } else { lblError.Text = "User Not Found."; } } catch (NullReferenceException) { Response.Redirect("wfrmErrorPage.aspx", true); } catch (Exception ex) { HttpContext context = HttpContext.Current; LogException objclsLogException = new LogException(); objclsLogException.LogErrorInDataBase(ex, context); Response.Redirect("wfrmErrorPage.aspx", true); } }
public void deleteUserNotExisting() { objclsBALUsers = new clsBALUsers(); DataSet ds = objclsBALUsers.GetUserDetails(); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { string strUSERADID = ds.Tables[0].Rows[i][4].ToString(); clsEALUser objclsEALUser = new clsEALUser(); clsBALCommon objclsBALCommon = new clsBALCommon(); objclsEALUser = objclsBALCommon.FetchUserDetailsFromAD(strUSERADID); if (objclsEALUser == null) { objclsBALUsers.DeleteUserFromDb(strUSERADID); } } } } }
protected void btnSave_Click(object sender, EventArgs e) { lblError.Text = ""; lblSuccess.Text = ""; try { TextBox txtbxDispName = (TextBox)ADU.FindControl("txtbxDispName"); HiddenField hdnfldADID = (HiddenField)ADU.FindControl("hdnfldADID"); if (txtbxDispName.Text != "") { if (ddlRole.SelectedIndex != 0) { if (hdnfldADID.Value != "") { clsBALCommon objclsBALCommon = new clsBALCommon(); clsEALUser objclsEALUser = new clsEALUser(); objclsEALUser = objclsBALCommon.FetchUserDetailsFromAD(hdnfldADID.Value); if (objclsEALUser != null) { bool flag = CheckUserRoles(objclsEALUser); if (!flag) { string userRole = ddlRole.SelectedItem.Value; //bool blnRoleExists = CheckRole(userRole); //if (!blnRoleExists) //{ objclsBALUsers = new clsBALUsers(); bool blnSave = objclsBALUsers.SaveUserRole(objclsEALUser, userRole, objclsEALLoggedInUser.StrUserADID); lblSuccess.Text = "User has been assigned with the role successfully."; hdnfldADID.Value = ""; txtbxDispName.Text = ""; ddlRole.SelectedIndex = 0; PopulateGrid(); //} //else //{ // lblError.Text = "RoleGroup has already been assigned to other user."; //} } } } } else { lblError.Text = "Select role to assign."; } } else { lblError.Text = "Please select a user."; } txtbxDispName.Text = ""; hdnfldADID.Value = ""; ddlRole.SelectedIndex = 0; } catch (NullReferenceException) { Response.Redirect("wfrmErrorPage.aspx", true); } catch (Exception ex) { HttpContext context = HttpContext.Current; LogException objclsLogException = new LogException(); objclsLogException.LogErrorInDataBase(ex, context); Response.Redirect("wfrmErrorPage.aspx", true); } }
protected void gvSchedule_RowUpdating(object sender, GridViewUpdateEventArgs e) { try { clsBALUsers objBI_User = new clsBALUsers(); PPLPicker.ADUserControl adu = (PPLPicker.ADUserControl)gvSchedule.Rows[e.RowIndex].FindControl("ADUSerControl1"); TextBox txtbxDispName = (TextBox)adu.FindControl("txtbxDispName"); TextBox txtDateGrid = (TextBox)gvSchedule.Rows[e.RowIndex].FindControl("txtDateGrid"); TextBox txtSubjectGrid = (TextBox)gvSchedule.Rows[e.RowIndex].FindControl("txtSubjectGrid"); Label lblBody = (Label)gvSchedule.Rows[e.RowIndex].FindControl("lblBody"); Label lblRoleID = (Label)gvSchedule.Rows[e.RowIndex].FindControl("lblRoleID"); Label lblGroupID = (Label)gvSchedule.Rows[e.RowIndex].FindControl("lblGroupID"); Label lblUsers1 = (Label)gvSchedule.Rows[e.RowIndex].FindControl("lblUsers1"); string groupID = lblGroupID.Text.ToString(); string[] strApprovers = null; if (Convert.ToDateTime(txtDateGrid.Text.ToString()) <= DateTime.Today) { //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "aa", "javascript:alert('Please select date greater than today.');", true); DateTime Date = System.DateTime.Now.Date; if (Convert.ToDateTime(txtDateGrid.Text.ToString()).Date == Date) { int intTime = System.DateTime.Now.TimeOfDay.Hours; if (intTime >= 9) { ScriptManager.RegisterStartupScript(Page, Page.GetType(), "aa", "javascript:alert('Mail cannot be scheduled today after 9 AM.');", true); } else { objBI_User.UpdateScheduleMail(groupID, DateTime.Parse(txtDateGrid.Text.ToString()).Date, txtSubjectGrid.Text.ToString(), lblBody.Text.ToString(), "UpdateSchedule_Mail"); if (txtbxDispName.Text.ToString() != "") { strApprovers = (txtbxDispName.Text.ToString().ToLower()).Split(";".ToCharArray()); for (int i = 0; i < strApprovers.Length; i++) { string strApp = strApprovers[i]; if (strApp != "") { //if (!strFetchedApprovers.Contains<string>(strApp)) //{ clsEALUser objclsEALApp = new clsEALUser(); clsBALCommon objclsBALCommon = new clsBALCommon(); objclsEALApp = objclsBALCommon.FetchUserDetailsFromAD(strApp); string mailid = objclsEALApp.StrUserEmailID; string adID = objclsEALApp.StrUserADID; string selectedUser = lblUsers1.Text; //string[] selectedUserarr = selectedUser.Split(";".ToCharArray()); if (!selectedUser.Contains(objclsEALApp.StrUserName)) { objBI_User.InsertDeleteScheduleMail(Int32.Parse(lblRoleID.Text.ToString()), groupID, objclsEALApp.StrUserName, objclsEALApp.StrUserADID, objclsEALApp.StrUserEmailID, "Insert", DateTime.Parse(txtDateGrid.Text.ToString()).Date, txtSubjectGrid.Text.ToString(), lblBody.Text.ToString()); } //} } } } gvSchedule.EditIndex = -1; BindScheduleGrid(); } } else { ScriptManager.RegisterStartupScript(Page, Page.GetType(), "aa", "javascript:alert('Past date not allowed.');", true); } } else { objBI_User.UpdateScheduleMail(groupID, DateTime.Parse(txtDateGrid.Text.ToString()).Date, txtSubjectGrid.Text.ToString(), lblBody.Text.ToString(), "UpdateSchedule_Mail"); if (txtbxDispName.Text.ToString() != "") { strApprovers = (txtbxDispName.Text.ToString().ToLower()).Split(";".ToCharArray()); for (int i = 0; i < strApprovers.Length; i++) { string strApp = strApprovers[i]; if (strApp != "") { //if (!strFetchedApprovers.Contains<string>(strApp)) //{ clsEALUser objclsEALApp = new clsEALUser(); clsBALCommon objclsBALCommon = new clsBALCommon(); objclsEALApp = objclsBALCommon.FetchUserDetailsFromAD(strApp); string mailid = objclsEALApp.StrUserEmailID; string adID = objclsEALApp.StrUserADID; string selectedUser = lblUsers1.Text; //string[] selectedUserarr = selectedUser.Split(";".ToCharArray()); if (!selectedUser.Contains(objclsEALApp.StrUserName)) { objBI_User.InsertDeleteScheduleMail(Int32.Parse(lblRoleID.Text.ToString()), groupID, objclsEALApp.StrUserName, objclsEALApp.StrUserADID, objclsEALApp.StrUserEmailID, "Insert", DateTime.Parse(txtDateGrid.Text.ToString()).Date, txtSubjectGrid.Text.ToString(), lblBody.Text.ToString()); } //} } } } gvSchedule.EditIndex = -1; BindScheduleGrid(); } } catch (NullReferenceException) { Response.Redirect("wfrmErrorPage.aspx", true); } catch (Exception ex) { HttpContext Context = HttpContext.Current; LogException objLogException = new LogException(); objLogException.LogErrorInDataBase(ex, Context); Response.Redirect("wfrmErrorPage.aspx", true); } }
protected void btnAdd_Click(object sender, EventArgs e) { try { clsBALUsers objBI_User = new clsBALUsers(); TextBox txtbxDispName = (TextBox)ADU.FindControl("txtbxDispName"); //HiddenField hdn = (HiddenField)adu.FindControl("hdnfldADID"); string[] strApprovers = null; if (txtbxDispName.Text.ToString() != "") { DataTable dtrolewiseusertemp = (DataTable)Session["dtrolewiseuser"]; strApprovers = (txtbxDispName.Text.ToString().ToLower()).Split(";".ToCharArray()); for (int i = 0; i < strApprovers.Length; i++) { string strApp = strApprovers[i]; if (strApp != "") { clsEALUser objclsEALApp = new clsEALUser(); clsBALCommon objclsBALCommon = new clsBALCommon(); objclsEALApp = objclsBALCommon.FetchUserDetailsFromAD(strApp); if (lstBoxApproverDelete.Items.Count > 0) { foreach (ListItem thisItem in lstBoxApproverDelete.Items) { string strtemp = thisItem.Text.Trim(); if (thisItem.Text.Trim() == objclsEALApp.StrUserName) { lblError.Text = "User " + objclsEALApp.StrUserName + " already exists"; // strtest = strtest + strtemp; goto Outer; } } } string mailid = objclsEALApp.StrUserEmailID; string adID = objclsEALApp.StrUserADID; DataRow dr; dr = dtrolewiseusertemp.NewRow(); dr["UserName"] = objclsEALApp.StrUserName; dr["RoleMappingId"] = objclsEALApp.StrUserSID; dr["UserADID"] = objclsEALApp.StrUserADID; dr["UserEmail"] = objclsEALApp.StrUserEmailID; dtrolewiseusertemp.Rows.Add(dr); // objBI_User.InsertDelete_RoleWiseUser(Int32.Parse(ddlRole.SelectedItem.Value.ToString()), objclsEALApp.StrUserName, objclsEALApp.StrUserADID, objclsEALApp.StrUserEmailID, "Insert"); lblSuccess.Text = "User added successfully"; Outer: continue; } } txtbxDispName.Text = ""; //BindListbox(); Session["dtrolewiseuser"] = dtrolewiseusertemp; lstBoxApproverDelete.DataSource = (DataTable)Session["dtrolewiseuser"]; lstBoxApproverDelete.DataBind(); } else { ScriptManager.RegisterStartupScript(Page, Page.GetType(), "aa", "javascript:alert('Please select user to Add');", true); } } catch (NullReferenceException) { Response.Redirect("wfrmErrorPage.aspx", true); } catch (Exception ex) { HttpContext Context = HttpContext.Current; LogException objLogException = new LogException(); objLogException.LogErrorInDataBase(ex, Context); Response.Redirect("wfrmErrorPage.aspx", true); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["LoggedInUserID"] == null) { Response.Redirect("wfrmSessionTimeOut.aspx", true); } if (this.Request.Url.AbsolutePath.ToString() == "/ReviewAccounts.aspx") { objclsEALLoggedInUser = (clsEALUser)Session[clsEALSession.CurrentUser]; strUserName = objclsEALLoggedInUser.StrUserName; strUserSID = objclsEALLoggedInUser.StrUserSID; } else { GetLoggedInUserName(); clsBALCommon objclsBALCommon = new clsBALCommon(); objclsEALLoggedInUser = objclsBALCommon.FetchUserDetailsFromAD(LoggedInUser); Session[clsEALSession.CurrentUser] = objclsEALLoggedInUser; strUserName = objclsEALLoggedInUser.StrUserName; strUserSID = objclsEALLoggedInUser.StrUserSID; } if (Session["RoleSelected"] != null) { role = (string[])Session["RoleSelected"]; //PopulateMenu(); } else { GetCurrentUserRole(); } if (!IsPostBack) { try { // objclsBALUsers = new clsBALUsers(); // DataSet ds = objclsBALUsers.GetLockOut(); // if (Session["lockout"] != null) //{ // Session["lockout"] = ds.Tables[0].Rows[0][0].ToString(); string str = Session["lockout"].ToString(); //str = "True"; if (str == "True") { if (role != null) { if (role.Contains <string>(clsEALRoles.ComplianceAdmin) || role.Contains <string>(clsEALRoles.ComplianceTester) || role.Contains <string>(clsEALRoles.ComplianceAuditor)) { PopulateMenu(); } } } else if (str == "False") { PopulateMenu(); } // } //else //{ // Response.Redirect("wfrmSessionTimeOut.aspx", true); //} //PopulateMenu(); } catch (NullReferenceException) { Response.Redirect("wfrmErrorPage.aspx", true); // Response.Redirect("wfrmErrorPage.aspx", true); } catch (Exception ex) { HttpContext Context = HttpContext.Current; LogException objLogException = new LogException(); objLogException.LogErrorInDataBase(ex, Context); Response.Redirect("wfrmErrorPage.aspx", true); } } } //} catch (NullReferenceException) { Response.Redirect("wfrmErrorPage.aspx", true); } catch (Exception excep) { if (excep.Message.Equals("SESSION")) { System.Web.HttpContext.Current.Response.Redirect("wfrmSessionTimeOut.aspx", true); } } }
protected void Page_Load(object sender, EventArgs e) { //Session.Abandon(); Session[clsEALSession.ValuePath] = "Home"; GetLoggedInUserName(); clsBALCommon objclsBALCommon = new clsBALCommon(); objclsEALLoggedInUser = objclsBALCommon.FetchUserDetailsFromAD(LoggedInUser); strUserName = objclsEALLoggedInUser.StrUserName; strUserSID = objclsEALLoggedInUser.StrUserSID; Session[clsEALSession.CurrentUser] = strUserName; btnSave.Visible = false; //GetCurrentUserRole(); if (Session["RoleSelected"] != null) { role = (string[])Session["RoleSelected"]; } else { GetCurrentUserRole(); } if (role != null) { if (role.Contains <string>(clsEALRoles.GlobalApprover)) { objclsBALUsers = new clsBALUsers(); bool IsCo = objclsBALUsers.CheckIfCo(objclsEALLoggedInUser.StrUserSID); if (IsCo) { pnlRole.Visible = true; } } } LockOut(); if (!IsPostBack) { try { AdminHomeFun(); GetHomePageText(); } catch (NullReferenceException) { Response.Redirect("wfrmErrorPage.aspx", true); } catch (Exception ex) { HttpContext Context = HttpContext.Current; LogException objLogException = new LogException(); objLogException.LogErrorInDataBase(ex, Context); Response.Redirect("wfrmErrorPage.aspx", true); } } if (role != null) { if (role.Contains <string>(clsEALRoles.GlobalApprover) && role.Contains <string>(clsEALRoles.ControlOwner)) { if (Session["lockout"] != null) { //Session["lockout"] = ds.Tables[0].Rows[0][0].ToString(); string str = Session["lockout"].ToString(); if (str == "True") { pnlRole.Visible = false; } else { pnlRole.Visible = true; } } } } }
protected void Page_Load(object sender, EventArgs e) { try { //clsADGroupMembers objclsADGroupMembers = new clsADGroupMembers(); //objclsADGroupMembers.GetMembershipWithPath(); //Session.Abandon(); Session[clsEALSession.ValuePath] = "Home"; GetLoggedInUserName(); clsBALCommon objclsBALCommon = new clsBALCommon(); objclsEALLoggedInUser = objclsBALCommon.FetchUserDetailsFromAD(LoggedInUser); //Session["LoggedInUser"] = objclsEALLoggedInUser; if (objclsEALLoggedInUser != null) { strUserName = objclsEALLoggedInUser.StrUserName; strUserSID = objclsEALLoggedInUser.StrUserSID; Session[clsEALSession.CurrentUser] = strUserName; btnSave.Visible = false; if (Session["RoleSelected"] != null) { role = (string[])Session["RoleSelected"]; pnlRole.Visible = true; rdCO.Visible = true; rdGA.Visible = true; btnGo.Visible = true; lblRole.Visible = true; } else { GetCurrentUserRole(); } LockOut(); if (!IsPostBack) { AdminHomeFun(); GetHomePageText(); } if (role != null) { if (role.Contains <string>(clsEALRoles.GlobalApprover) && role.Contains <string>(clsEALRoles.ControlOwner)) { if (Session["lockout"] != null) { //Session["lockout"] = ds.Tables[0].Rows[0][0].ToString(); string str = Session["lockout"].ToString(); if (str == "True") { pnlRole.Visible = false; } else { pnlRole.Visible = true; } } } } } else { Response.Redirect("wfrmUnauthorized.aspx", false); } if (role != null && Convert.ToString(role[0]).Trim() == "") { Response.Redirect("wfrmUnauthorized.aspx", false); } } catch (NullReferenceException) { Response.Redirect("wfrmErrorPage.aspx", true); } catch (Exception ex) { HttpContext context = HttpContext.Current; LogException objclsLogException = new LogException(); objclsLogException.LogErrorInDataBase(ex, context); Response.Redirect("wfrmErrorPage.aspx", true); } }