Exemplo n.º 1
0
 private void AgreeResCallback(AgreeRes res)
 {
     LoadingOverlay.Instance.Hide();
     FlowText.ShowMessage(I18NManager.Get("Friend_AddFriendSuccess"));
     //刷新好友主界面!
     _friendModel.AddFriend(res.UserFriend);
     _friendModel.UpdateApplyList(res.UserFriend.UserId);
     MakeFriendsView.SetData(_friendModel);
 }
Exemplo n.º 2
0
        public JsonResult <IDtoOutObjects> Add(DtoInAddFriend dtoInFriend)
        {
            if (ModelState.IsValid)
            {
                return(Json(friendModel.AddFriend(dtoInFriend)));
            }

            DtoOutError error = new DtoOutError();

            error.Exception = new ObjectIsNotValidException("AddFriend");
            error.Message   = "Object addFriend is not valid";
            return(Json((IDtoOutObjects)error));
        }