Exemplo n.º 1
0
 ///<summary>
 ///This function redirects to the Contract Summary page
 ///</summary>
 protected void fnRedirectToContractSummary(object sender, EventArgs e)
 {
     if (ContractRoles.CheckRolesContractSummary())
     {
         Response.Redirect("ContractSummary.aspx", false);
     }
     else
     {
         //Response.Redirect("Home.aspx", false);
         spanContractSummary.Visible = false;
         spanContract.Visible        = false;
     }
 }
Exemplo n.º 2
0
    /* google google
     * /// <summary>
     * /// Gets the logged in user emailid
     * /// </summary>
     * /// <returns>string</returns>
     * public string GetDomainUsers(string strUserName)
     * {
     *  //strUserName = strUserName.Replace("@rave-tech.co.in", "");
     *  //Google change point to northgate
     *  if (strUserName.ToLower().Contains("@rave-tech.co.in"))
     *  {
     *      strUserName = strUserName.Replace("@rave-tech.co.in", "");
     *  }
     *  else
     *  {
     *      strUserName = strUserName.Replace(AuthorizationManagerConstants.NORTHGATEDOMAIN, "");
     *  }
     *
     *  string strUserEmail = string.Empty;
     *
     *  DirectoryEntry searchRoot = new DirectoryEntry("LDAP://RAVE-TECH.CO.IN");
     *
     *  DirectorySearcher search = new DirectorySearcher(searchRoot);
     *
     *  //string query = "(|(objectCategory=group)(objectCategory=user)) ";
     *  string query = "(SAMAccountName=" + strUserName + ")";
     *
     *  search.Filter = query;
     *
     *  SearchResult result;
     *
     *  SearchResultCollection resultCol = search.FindAll();
     *
     *  if (resultCol != null)
     *  {
     *
     *      for (int counter = 0; counter < resultCol.Count; counter++)
     *      {
     *
     *          result = resultCol[counter];
     *
     *          if (result.Properties.Contains("samaccountname"))
     *          {
     *
     *              strUserEmail = result.Properties["mail"][0].ToString();
     *
     *          }
     *
     *      }
     *
     *  }
     *
     *  return strUserEmail;
     * }
     *
     *
     */

    /// <summary>
    /// Make visible to tab of contracts if user have access rights.
    /// </summary>
    public void AccessRightForContract()
    {
        if (!ContractRoles.CheckRolesContractSummary())
        {
            spanContractSummary.Visible = false;
            spanContract.Visible        = false;
            ApplyCssToAccedDeniedMenu(tabContract);
        }
        if ((ContractRoles.CheckRolesAddInternalContract()) || (ContractRoles.CheckRolesAddExternalContract()))
        {
        }
        else
        {
            spanAddContract.Visible = false;
            spanContract.Visible    = false;
        }
    }
Exemplo n.º 3
0
    ///<summary>
    ///This function redirects to the add contract page
    ///</summary>
    protected void fnRedirectToAddContract(object sender, EventArgs e)
    {
        //Remove the session of contract summary page.
        Session.Remove(SessionNames.CONTRACT_CONTRACTTYPE);
        Session.Remove(SessionNames.CONTRACT_CONTRACTSTATUS);
        Session.Remove(SessionNames.CONTRACT_DOCUMENTNAME);
        Session.Remove(SessionNames.CONTRACT_PREVIOUS_SORT_EXPRESSION);
        Session.Remove(SessionNames.CONTRACT_CURRENTPAGEINDEX);
        Session.Remove(SessionNames.CONTRACT_SORTDIRECTIONFORBINDING);
        Session.Remove(SessionNames.CONTRACT_SORT_DIRECTION);
        Session.Remove(SessionNames.CONTRACT_ACTUALPAGECOUNT);
        Session.Remove(SessionNames.CONTRACT_SORTDIRECTIONFORBINDING);

        //Check roles for contract summary page.
        if (ContractRoles.CheckRolesContractSummary())
        {
            Response.Redirect("AddContract.aspx", false);
        }
        else
        {
            Response.Redirect("Home.aspx", false);
        }
    }