コード例 #1
0
        protected override void PageLoad()
        {
            base.PageLoad();
            string queryString = RequestHelper.GetQueryString <string>("Action");

            if ((queryString != null) && (queryString == "Delete"))
            {
                UserFriendBLL.DeleteUserFriend(RequestHelper.GetQueryString <string>("ID"), base.UserID);
                ResponseHelper.Write("ok");
                ResponseHelper.End();
            }
            int currentPage = RequestHelper.GetQueryString <int>("Page");

            if (currentPage < 1)
            {
                currentPage = 1;
            }
            int pageSize = 0x19;
            int count    = 0;
            UserFriendSearchInfo userFriend = new UserFriendSearchInfo();

            userFriend.UserID   = base.UserID;
            this.userFriendList = UserFriendBLL.SearchUserFriendList(currentPage, pageSize, userFriend, ref count);
            this.commonPagerClass.CurrentPage = currentPage;
            this.commonPagerClass.PageSize    = pageSize;
            this.commonPagerClass.Count       = count;
            string str3 = string.Empty;

            foreach (UserFriendInfo info2 in this.userFriendList)
            {
                if (str3 == string.Empty)
                {
                    str3 = info2.FriendID.ToString();
                }
                else
                {
                    str3 = str3 + "," + info2.FriendID.ToString();
                }
            }
            if (str3 != string.Empty)
            {
                UserSearchInfo user = new UserSearchInfo();
                user.InUserID = str3;
                this.userList = UserBLL.SearchUserList(user);
            }
        }
コード例 #2
0
        /// <summary>
        /// 搜索好友
        /// </summary>
        protected void SearchFriend()
        {
            UserFriendSearchInfo userFriendSearch = new UserFriendSearchInfo();

            userFriendSearch.FriendName = StringHelper.SearchSafe(RequestHelper.GetQueryString <string>("FriendName"));
            userFriendSearch.UserID     = base.UserID;
            List <UserFriendInfo> userFriendList = UserFriendBLL.SearchUserFriendList(userFriendSearch);
            string result = string.Empty;

            foreach (UserFriendInfo userFriend in userFriendList)
            {
                result += userFriend.FriendID + "|" + userFriend.FriendName + "||";
            }
            if (result.Length > 0)
            {
                result = result.Substring(0, result.Length - 2);
            }
            ResponseHelper.Write(result);
            ResponseHelper.End();
        }
コード例 #3
0
ファイル: MessageAjax.cs プロジェクト: xuefuruanjian/ems
        protected void SearchFriend()
        {
            UserFriendSearchInfo userFriend = new UserFriendSearchInfo();

            userFriend.FriendName = StringHelper.SearchSafe(RequestHelper.GetQueryString <string>("FriendName"));
            userFriend.UserID     = base.UserID;
            List <UserFriendInfo> list = UserFriendBLL.SearchUserFriendList(userFriend);
            string content             = string.Empty;

            foreach (UserFriendInfo info2 in list)
            {
                object obj2 = content;
                content = string.Concat(new object[] { obj2, info2.FriendID, "|", info2.FriendName, "||" });
            }
            if (content.Length > 0)
            {
                content = content.Substring(0, content.Length - 2);
            }
            ResponseHelper.Write(content);
            ResponseHelper.End();
        }
コード例 #4
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected override void PageLoad()
        {
            base.PageLoad();
            user          = UserBLL.ReadUserMore(base.UserID);
            userGradeName = UserGradeBLL.ReadUserGradeCache(base.GradeID).Name;
            string action = RequestHelper.GetQueryString <string>("Action");

            switch (action)
            {
            case "Delete":
                string deleteID = RequestHelper.GetQueryString <string>("ID");
                UserFriendBLL.DeleteUserFriend(deleteID, base.UserID);
                ResponseHelper.Write("ok");
                ResponseHelper.End();
                break;

            default:
                break;
            }

            int currentPage = RequestHelper.GetQueryString <int>("Page");

            if (currentPage < 1)
            {
                currentPage = 1;
            }
            int pageSize = 25;
            int count    = 0;
            UserFriendSearchInfo userFriendSearch = new UserFriendSearchInfo();

            userFriendSearch.UserID      = base.UserID;
            userFriendList               = UserFriendBLL.SearchUserFriendList(currentPage, pageSize, userFriendSearch, ref count);
            commonPagerClass.CurrentPage = currentPage;
            commonPagerClass.PageSize    = pageSize;
            commonPagerClass.Count       = count;
            commonPagerClass.FirstPage   = "<<首页";
            commonPagerClass.PreviewPage = "<<上一页";
            commonPagerClass.NextPage    = "下一页>>";
            commonPagerClass.LastPage    = "末页>>";
            commonPagerClass.ListType    = false;
            commonPagerClass.DisCount    = false;
            commonPagerClass.PrenextType = true;

            string strUserID = string.Empty;

            foreach (UserFriendInfo userFriend in userFriendList)
            {
                if (strUserID == string.Empty)
                {
                    strUserID = userFriend.FriendID.ToString();
                }
                else
                {
                    strUserID += "," + userFriend.FriendID.ToString();
                }
            }
            if (strUserID != string.Empty)
            {
                UserSearchInfo userSearch = new UserSearchInfo();
                userSearch.InUserID = strUserID;
                userList            = UserBLL.SearchUserList(userSearch);
            }
        }
コード例 #5
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected override void PageLoad()
        {
            base.PageLoad();
            action = RequestHelper.GetQueryString <string>("Action");
            int currentPage = RequestHelper.GetQueryString <int>("Page");

            if (currentPage < 1)
            {
                currentPage = 1;
            }
            int pageSize = 8;
            int count    = 0;

            switch (action)
            {
            case "ReceiveMessage":
                ReceiveMessageSearchInfo receiveMessageSearch = new ReceiveMessageSearchInfo();
                receiveMessageSearch.UserID = base.UserID;
                receiveMessageList          = ReceiveMessageBLL.SearchReceiveMessageList(currentPage, pageSize, receiveMessageSearch, ref count);
                ajaxPagerClass.CurrentPage  = currentPage;
                ajaxPagerClass.PageSize     = pageSize;
                ajaxPagerClass.Count        = count;
                ajaxPagerClass.FirstPage    = "<<首页";
                ajaxPagerClass.PreviewPage  = "<<上一页";
                ajaxPagerClass.NextPage     = "下一页>>";
                ajaxPagerClass.LastPage     = "末页>>";
                ajaxPagerClass.ListType     = false;
                ajaxPagerClass.DisCount     = false;
                ajaxPagerClass.PrenextType  = true;
                break;

            case "SendMessage":
                SendMessageSearchInfo sendMessageSearch = new SendMessageSearchInfo();
                sendMessageSearch.UserID   = base.UserID;
                sendMessageList            = SendMessageBLL.SearchSendMessageList(currentPage, pageSize, sendMessageSearch, ref count);
                ajaxPagerClass.CurrentPage = currentPage;
                ajaxPagerClass.PageSize    = pageSize;
                ajaxPagerClass.Count       = count;
                ajaxPagerClass.FirstPage   = "<<首页";
                ajaxPagerClass.PreviewPage = "<<上一页";
                ajaxPagerClass.NextPage    = "下一页>>";
                ajaxPagerClass.LastPage    = "末页>>";
                ajaxPagerClass.ListType    = false;
                ajaxPagerClass.DisCount    = false;
                ajaxPagerClass.PrenextType = true;
                break;

            case "WriteMessage":
                UserFriendSearchInfo userFriendSearch = new UserFriendSearchInfo();
                userFriendSearch.UserID = base.UserID;
                userFriendList          = UserFriendBLL.SearchUserFriendList(userFriendSearch);
                break;

            case "SearchFriend":
                SearchFriend();
                break;

            case "SendUserMessage":
                SendUserMessage();
                break;

            case "DeleteReceiveMessage":
                DeleteReceiveMessage();
                break;

            case "DeleteSendMessage":
                DeleteSendMessage();
                break;

            default:
                break;
            }
        }
コード例 #6
0
ファイル: MessageAjax.cs プロジェクト: xuefuruanjian/ems
        protected override void PageLoad()
        {
            base.PageLoad();
            this.action = RequestHelper.GetQueryString <string>("Action");
            int queryString = RequestHelper.GetQueryString <int>("Page");

            if (queryString < 1)
            {
                queryString = 1;
            }
            int pageSize = 8;
            int count    = 0;

            switch (this.action)
            {
            case "ReceiveMessage":
            {
                ReceiveMessageSearchInfo receiveMessage = new ReceiveMessageSearchInfo();
                receiveMessage.UserID           = base.UserID;
                this.receiveMessageList         = ReceiveMessageBLL.SearchReceiveMessageList(queryString, pageSize, receiveMessage, ref count);
                this.ajaxPagerClass.CurrentPage = queryString;
                this.ajaxPagerClass.PageSize    = pageSize;
                this.ajaxPagerClass.Count       = count;
                break;
            }

            case "SendMessage":
            {
                SendMessageSearchInfo sendMessage = new SendMessageSearchInfo();
                sendMessage.UserID              = base.UserID;
                this.sendMessageList            = SendMessageBLL.SearchSendMessageList(queryString, pageSize, sendMessage, ref count);
                this.ajaxPagerClass.CurrentPage = queryString;
                this.ajaxPagerClass.PageSize    = pageSize;
                this.ajaxPagerClass.Count       = count;
                break;
            }

            case "WriteMessage":
            {
                UserFriendSearchInfo userFriend = new UserFriendSearchInfo();
                userFriend.UserID   = base.UserID;
                this.userFriendList = UserFriendBLL.SearchUserFriendList(userFriend);
                break;
            }

            case "SearchFriend":
                this.SearchFriend();
                break;

            case "SendUserMessage":
                this.SendUserMessage();
                break;

            case "DeleteReceiveMessage":
                this.DeleteReceiveMessage();
                break;

            case "DeleteSendMessage":
                this.DeleteSendMessage();
                break;
            }
        }