public CommonRtnEntity Add([FromBody] FollowUpRecordInfo info) { IFollowUpRecordInfoServices services = new FollowUpRecordInfoServices(); int result = 0; //编辑 if (info.ID > 0) { info.UpdateTime = DateTime.Now; services.Update(info); result = info.ID; } else { result = services.Add(info); } CommonRtnEntity rtnInfo = new CommonRtnEntity() { Success = result > 0, Data = result, Message = result > 0 ? "添加成功!" : "添加失败!" }; return(rtnInfo); }
public CommonRtnEntity GetFollowUpRecordInfo([FromBody] SearchBase <string> searchInfo) { IFollowUpRecordInfoServices services = new FollowUpRecordInfoServices(); FollowUpRecordInfo orderInfo = services.QueryByID(searchInfo.Data); CommonRtnEntity rtnInfo = new CommonRtnEntity() { Success = orderInfo != null, Data = new { Info = orderInfo }, Message = orderInfo != null ? "查询成功!" : "查询失败!" }; return(rtnInfo); }