コード例 #1
0
 /// <summary>
 /// 新增关联文件标签记录
 /// </summary>
 /// <param name="userIds"></param>
 /// <returns></returns>
 public CommonResult Add(Models.DocumentTag documenttagModel)
 {
     documenttagModel.DocumentTagNo = db.Database.SqlQuery <string>("select ([dbo].[GetNextTN]('DocumentTag'))").FirstOrDefault();
     db.DocumentTag.Add(documenttagModel);
     db.SaveChanges();
     Log4NetHelper.Info("新增关联文件标签记录", documenttagModel.ToJson());
     //AllServices.ActionLogService.AddLog("新增上传记录",model.ToJson(),Enums.ActionCategory.Add);
     return(CommonResult.Instance(documenttagModel.UID));
 }
コード例 #2
0
 /// <summary>
 /// 更新标签
 /// </summary>
 /// <param name="documentModel"></param>
 /// <returns></returns>
 public CommonResult Update(Models.DocumentTag documenttagModel)
 {
     db.DocumentTag.Where(documentTag => documentTag.UID == documenttagModel.UID).Update(u => new Models.DocumentTag()
     {
         Tag      = documenttagModel.Tag,
         Editor   = documenttagModel.Editor,
         EditTime = documenttagModel.EditTime,
         State    = documenttagModel.State
     });
     //AllServices.ActionLogService.AddLog("更新项目信息",model.ToJson(),Enums.ActionCategory.Update);
     Log4NetHelper.Info("更新关联文件标签记录", documenttagModel.ToJson());
     return(CommonResult.Instance());
 }