public static bool 添加投诉(投诉 message, long 发起者ID, long 受理单位ID) { message.发起者.用户ID = 发起者ID; message.受理单位.用户ID = 受理单位ID; return Mongo.添加(message); }
public static bool 更新投诉(投诉 message) { return Mongo.更新(message); }
public string Gys_ComplainsAdd() { IEnumerable<单位用户> model = 用户管理.查询用户<单位用户>(0, 0); //投诉管理.添加投诉(Msg, Msg.发起者.用户ID, 100000000001); if (model != null && model.Count() != 0) { foreach (var item in model) { 投诉 Msg = new 投诉(); Msg.处理状态 = 处理状态.未处理; 对话消息 Talk = new 对话消息(); Talk.发言人.用户ID = currentUser.Id; Msg.发起者.用户ID = currentUser.Id; 投诉管理.添加投诉(Msg, Msg.发起者.用户ID, item.Id); Talk.消息主体.标题 = Request.QueryString["t"].ToString(); Talk.消息主体.内容 = Request.QueryString["c"].ToString(); 对话消息管理.添加对话消息(Talk, Msg); } } return "添加投诉成功!"; }