/// <summary> /// 添加好友申请 /// </summary> /// <param name="strmodel"></param> public void Friend_AddFriendsApply(string strmodel) { Friends_Apply model = JsonConvert.DeserializeObject <Friends_Apply>(strmodel); model.Id = Guid.NewGuid(); model.ApplyerId = GetUserInfo().Id; var obj = oFriendsBLL.Friend_AddFriendsApply(model); JsonResponse(obj.ToString()); }
/// <summary> /// 添加好友申请 /// </summary> /// <param name="strmodel"></param> public void addFriendsApply(string strmodel) { Friends_Apply model = JsonConvert.DeserializeObject <Friends_Apply>(strmodel); model.Id = Guid.NewGuid(); model.ApplyerId = GetSignalrUserInfo().Id; var obj = oFriendsBLL.Friend_AddFriendsApply(model); ReturnModel remodel = JsonConvert.DeserializeObject <ReturnModel>(obj.ToString()); if (remodel.Code == 1) { Clients.User(model.OwnerId.ToString()).applyTipsToFriend(remodel); } Clients.Caller.applyTips(remodel); }
/// <summary> /// 添加好友申请 /// </summary> /// <param name="model">好友申请信息实体</param> /// <returns></returns> public DataSet Friend_AddFriendsApply(Friends_Apply model) { try { List <IDataParameter> LstParam = new List <IDataParameter>(); LstParam.Add(Common.OADBHelperSQL.CreateParameter("@Id", SqlDbType.UniqueIdentifier, model.Id)); LstParam.Add(Common.OADBHelperSQL.CreateParameter("@ApplyerId", SqlDbType.UniqueIdentifier, model.ApplyerId)); LstParam.Add(Common.OADBHelperSQL.CreateParameter("@OwnerId", SqlDbType.UniqueIdentifier, model.OwnerId)); LstParam.Add(Common.OADBHelperSQL.CreateParameter("@Remark", SqlDbType.VarChar, model.Remark)); return(Common.OADBHelperSQL.RunProcedure("pFriend_AddFriendsApply", LstParam.ToArray(), "Data")); } catch (Exception ex) { return(Common.OADBHelperSQL.CustomDataSet(false)); } }
/// <summary> /// 添加好友申请 /// </summary> /// <param name="model">好友申请信息实体</param> /// <returns></returns> public object Friend_AddFriendsApply(Friends_Apply model) { DataSet ds = oFriendsDAL.Friend_AddFriendsApply(model); return(Common.JsonHelper.ToJson_L(ds)); }