Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     // Live site mode
     usProjects.IsLiveSite = this.IsLiveSite;
     // Where condition
     string where = "(ProjectGroupID IS NULL AND ProjectNodeID IS NOT NULL AND ProjectSiteID = " + CMSContext.CurrentSiteID + ")";
     // Security where
     where = ProjectInfoProvider.CombineSecurityWhereCondition(where, CMSContext.CurrentUser, CMSContext.CurrentSiteName);
     // Set where condition to uniselector
     usProjects.WhereCondition = where;
 }
    /// <summary>
    /// Builds where condition.
    /// </summary>
    private string ucProjectList_BuildCondition(object sender, string whereCondition)
    {
        // Do not display projects without relation to document
        whereCondition = SqlHelperClass.AddWhereCondition(whereCondition, "ProjectNodeID IS NOT NULL");

        // Finished projects
        if (!ShowFinishedProjects)
        {
            whereCondition = SqlHelperClass.AddWhereCondition(whereCondition, "StatusIsFinished=0");
        }

        // Security condition
        whereCondition = ProjectInfoProvider.CombineSecurityWhereCondition(whereCondition, CMSContext.CurrentUser, CMSContext.CurrentSiteName);

        return(whereCondition);
    }
Exemplo n.º 3
0
    /// <summary>
    /// Builds where condition.
    /// </summary>
    private string ucProjectList_BuildCondition(object sender, string whereCondition)
    {
        CurrentUserInfo cui = CMSContext.CurrentUser;

        // If finished projects shouldn't be displayed create where condition for selection
        if (!ShowFinishedProjects)
        {
            whereCondition = SqlHelperClass.AddWhereCondition("StatusIsFinished = 0", whereCondition);
        }

        if (!IsAuthorizedPerCreateProject())
        {
            // Access security
            whereCondition = ProjectInfoProvider.CombineSecurityWhereCondition(whereCondition, CMSContext.CurrentUser, CMSContext.CurrentSiteName);
        }

        return(whereCondition);
    }
Exemplo n.º 4
0
 /// <summary>
 /// Builds where condition.
 /// </summary>
 private string ucProjectList_BuildCondition(object sender, string whereCondition)
 {
     // Security condition
     return(ProjectInfoProvider.CombineSecurityWhereCondition(whereCondition, MembershipContext.AuthenticatedUser, SiteContext.CurrentSiteName));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Builds where condition.
 /// </summary>
 private string ucProjectList_BuildCondition(object sender, string whereCondition)
 {
     // Security condition
     return(ProjectInfoProvider.CombineSecurityWhereCondition(whereCondition, CMSContext.CurrentUser, CMSContext.CurrentSiteName));
 }