/// <summary> /// 新增协议操作信息 /// </summary> /// <param name="agreementInfo">协议操作信息</param> /// <returns></returns> public bool CreateAgreementOperationInfo(Business_ProtocolOperations_Information agreementInfo) { using (var db = SugarDao_MsSql.GetInstance()) { try { db.BeginTran(); var personInfo = db.Queryable <Business_Personnel_Information>().Where(i => i.Vguid == agreementInfo.PersonnelVGUID).SingleOrDefault(); agreementInfo.VGUID = Guid.NewGuid(); agreementInfo.OperationTime = DateTime.Now; agreementInfo.CreatedDate = DateTime.Now; agreementInfo.CreatedUser = personInfo.Name; string logData = JsonConverter.Serialize(agreementInfo); _logLogic.SaveLog(1, 34, personInfo.Name, "协议操作", logData); db.Insert(agreementInfo, false); db.CommitTran(); return(true); } catch (Exception ex) { db.RollbackTran(); LogHelper.WriteLog(ex.ToString()); return(false); } } }
/// <summary> /// 用户是否已经操作过协议 /// </summary> /// <param name="agreementInfo"></param> /// <returns></returns> public bool IsExistAgreementOperationInfo(Business_ProtocolOperations_Information agreementInfo) { using (var db = SugarDao_MsSql.GetInstance()) { return(db.Queryable <Business_ProtocolOperations_Information>().Any(i => i.WeChatPushVGUID == agreementInfo.WeChatPushVGUID && i.PersonnelVGUID == agreementInfo.PersonnelVGUID)); } }
/// <summary> /// 用户是否已经操作过协议 /// </summary> /// <param name="agreementInfo"></param> /// <returns></returns> public JsonResult IsExistAgreementOperationInfo(Business_ProtocolOperations_Information agreementInfo) { var models = new ActionResultModel <string>(); models.isSuccess = _pl.IsExistAgreementOperationInfo(agreementInfo); models.respnseInfo = models.isSuccess ? "1" : "0"; return(Json(models)); }
/// <summary> /// 用户是否已经操作过协议 /// </summary> /// <param name="agreementInfo"></param> /// <returns></returns> public bool IsExistAgreementOperationInfo(Business_ProtocolOperations_Information agreementInfo) { return(_ps.IsExistAgreementOperationInfo(agreementInfo)); }
/// <summary> /// 新增协议操作信息 /// </summary> /// <param name="agreementInfo">协议操作信息</param> /// <returns></returns> public bool CreateAgreementOperationInfo(Business_ProtocolOperations_Information agreementInfo) { return(_ps.CreateAgreementOperationInfo(agreementInfo)); }