Exemplo n.º 1
0
    protected void fnRedirectMrfPendingApproval(object sender, EventArgs e)
    {
        //clear all the session value
        if (MRFRoles.CheckRolesPendingApproval())
        {
            //All the sessions are cleared before redirecting to page.
            Session[SessionNames.PREVIOUS_SORT_EXPRESSION_APPREJMRF] = null;
            Session[SessionNames.SORT_DIRECTION_APPREJMRF]           = null;

            Response.Redirect("MrfPendingApproval.aspx", false);
        }
        else
        {
            Response.Redirect("Home.aspx", false);
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// Make visible to tab of MRF if user have access rights.
    /// </summary>
    public void AccessRightForMRF()
    {
        //TO solved issue id 21336
        //Start
        ArrayList arrRolesPreSale = new ArrayList();

        arrRolesPreSale = (System.Collections.ArrayList)Session[SessionNames.AZMAN_ROLES];

        if (!MRFRoles.CheckRolesMrfSummary() && !MRFRoles.CheckRolesRaiseMrf() && !MRFRoles.CheckRolesPendingAllocation() && !MRFRoles.CheckRolesPendingApproval() && !MRFRoles.CheckRolesApproveRejectHeadCount())
        {
            ApplyCssToAccedDeniedMenu(tabMRF);
        }


        foreach (string STR in arrRolesPreSale)
        {
            switch (STR)
            {
            case "rolePreSales":
                spanAppRejHeadCount.Visible      = false;
                spanMRFPendingApproval.Visible   = false;
                spanMRFPendingAllocation.Visible = false;
                break;

            default:
                break;
            }
        }
        //End

        //43639-- Jignyasa--Start
        //var chkFunctionalManager = CheckIfFunctionalManager(arrRolesPreSale);

        //if (!chkFunctionalManager && !MRFRoles.CheckRolesMrfSummary() && !MRFRoles.CheckRolesRaiseMrf() && !MRFRoles.CheckRolesPendingAllocation() && !MRFRoles.CheckRolesPendingApproval() && !MRFRoles.CheckRolesApproveRejectHeadCount())
        //{
        //    ApplyCssToAccedDeniedMenu(tabMRF);
        //}

        //if (chkFunctionalManager && !MRFRoles.CheckRolesMrfSummary()) //Those who are only functional manager and not PM they should see only mrfsummary page.
        //{
        //    spanMRFSummary.Visible = true;
        //    spanRaiseMRF.Visible = false;
        //    spanMRFPendingApproval.Visible = false;
        //    spanAppRejHeadCount.Visible = false;
        //    spanMRFPendingAllocation.Visible = false;
        //}
        //43639--Jignyasa--End
    }