luckylei66

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

Link: https://github.com/douglascrockford/JSON-js

        function delEmpDependent(linkObj) {
            if (confirm('Are you sure you want to delete this member?')) {
                
                var tr = $(linkObj).parents('tr');
                var depGuid = $(linkObj).parents('td').children('input').val();

                // Create a data transfer object (DTO) with the proper structure.
                var DTO = { 'memberGUID': depGuid, 'groupID': groupID, 'empID': empID };

                $.ajax({
                    type: "POST",
                    url: "AddEditEmployee.aspx/DeleteMember",
                    data: JSON.stringify(DTO),
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    async: false,
                    success: function (msg) {
                        //ret = msg.d;
                        var memberData = msg.d.split('|');
                        $("#dependentMembers").html(memberData[0]);
                        $("#hhIncome").html(memberData[1]);
                        $("#enrollStatus").html(memberData[2]);
                        memberCount = parseInt(memberData[3]);
                    }
                });

            }

            return false;
        }

 

posted on 2013-04-24 15:44  Leo.Wang  阅读(296)  评论(0编辑  收藏  举报