/// <summary>
        /// Get filter
        /// </summary>
        /// <returns></returns>
        private string GetSqlWhereClause()
        {
            string strWhere = string.Format(" AND EXISTS (SELECT 1 FROM Users WHERE RoleId=u.RoleId and UserId='{0}') AND UserEnabled=1 AND UserId<>{0}", this.nUserId);

            if (UsersManager.IsCompanyUser(this.nUserId))
            {
            }
            else if (UsersManager.IsRegionUser(this.nUserId))
            {
                strWhere += string.Format(@" AND (EXISTS (SELECT 1 FROM (SELECT UserId FROM GroupUsers gu WHERE EXISTS (SELECT 1 FROM Groups WHERE RegionID in 
(SELECT RegionID from Groups as a INNER JOIN GroupUsers as b on a.GroupId = b.GroupID 
    INNER JOIN Users as c on b.UserID = c.UserId where OrganizationType='Region' and b.UserID='{0}'
) AND GroupId=gu.GroupID)) t1 WHERE u.UserId=t1.UserID))", this.nUserId);
            }
            else if (UsersManager.IsDivisionUser(this.nUserId))
            {
                strWhere += string.Format(@" AND (EXISTS (SELECT 1 FROM 
(SELECT UserId FROM GroupUsers gu WHERE EXISTS (SELECT 1 FROM Groups WHERE DivisionID in 
(
    SELECT DivisionID FROM Groups AS a INNER JOIN GroupUsers AS b ON a.GroupId = b.GroupID 
    INNER JOIN Users AS c ON b.UserID = c.UserId WHERE OrganizationType='Division' AND b.UserID = '{0}'
) AND GroupId=gu.GroupID)) t1 WHERE u.UserId=t1.UserID))", this.nUserId);
            }
            else if (UsersManager.IsBranchUser(this.nUserId))
            {
                strWhere += string.Format(@" AND (EXISTS (SELECT 1 FROM 
(SELECT UserId FROM GroupUsers gu WHERE EXISTS (SELECT 1 FROM Groups WHERE BranchID in
(
    SELECT BranchID FROM Groups AS a INNER JOIN GroupUsers AS b ON a.GroupId = b.GroupID 
    INNER JOIN Users AS c ON b.UserID = c.UserId WHERE OrganizationType='Branch' AND b.UserID = '{0}'
) AND GroupId=gu.GroupID)) t1 WHERE u.UserId=t1.UserID))", this.nUserId);
            }
            else
            {
                strWhere += " AND 1=2";
            }
            return(strWhere);
        }