| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using BizCom;
- using SQLData;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace SiteCore.Handler
- {
- public partial class app
- {
- public void del_userfriend()
- {
- int uid = getDecodeInt("uid");
- if (uid == 0)
- {
- conError("找不到会员");
- return;
- }
- if (UrlPostParmsCheck("tuid"))
- {
- int tuid = getDecodeInt("tuid");
- if (tuid == 0)
- {
- conError("无法删除");
- return;
- }
- string sql = string.Format("delete from s_userfriend where userid={0} and userfriendid={1} ;", uid, tuid);
- int s = DbHelper.DbConn.ExecuteNonQuery(sql);
- conSuccess("已删除");
- return;
- }
- conError("错误的参数");
- }
- public void get_userfriend()
- {
- int uid = getDecodeInt("uid");
- if (uid == 0)
- {
- conError("找不到会员");
- return;
- }
- DataStruct dStruct = GetPostStruct();
- List<string> lw = new List<string>();
- lw.Add("userid=" + uid);
- dStruct.Order = "id desc";
- dStruct.MainWhere = string.Join(" and ", lw.ToArray());
- dStruct.Fileds = "id,frienduserid as fuid,sex,username";
- DataTable dt = WebCache.GetData("view_userfriend", dStruct);
- conGridJson(dStruct.TotalCount, Utils.Serialization.JsonString.DataTable2LowerAjaxJson(dt));
- }
- public void ins_userfriend()
- {
-
- }
- }
- }
|