/// <summary> /// 更新一条数据 /// </summary> public bool Update(BWJSLog.Model.OperationLog model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update dbo.[OperationLog] set "); strSql.Append(" DepartmentName = @DepartmentName , "); strSql.Append(" RoleId = @RoleId , "); strSql.Append(" RoleName = @RoleName , "); strSql.Append(" GroupId = @GroupId , "); strSql.Append(" GroupName = @GroupName , "); strSql.Append(" BusinessType = @BusinessType , "); strSql.Append(" RelationId = @RelationId , "); strSql.Append(" LogContent = @LogContent , "); strSql.Append(" Ip = @Ip , "); strSql.Append(" UserId = @UserId , "); strSql.Append(" RealName = @RealName , "); strSql.Append(" CreateDate = @CreateDate , "); strSql.Append(" DepartmentId = @DepartmentId "); strSql.Append(" where OperationLogId=@OperationLogId "); SqlParameter[] parameters = { new SqlParameter("@OperationLogId", model.OperationLogId), new SqlParameter("@DepartmentName", model.DepartmentName), new SqlParameter("@RoleId", model.RoleId), new SqlParameter("@RoleName", model.RoleName), new SqlParameter("@GroupId", model.GroupId), new SqlParameter("@GroupName", model.GroupName), new SqlParameter("@BusinessType", model.BusinessType), new SqlParameter("@RelationId", model.RelationId), new SqlParameter("@LogContent", model.LogContent), new SqlParameter("@Ip", model.Ip), new SqlParameter("@UserId", model.UserId), new SqlParameter("@RealName", model.RealName), new SqlParameter("@CreateDate", model.CreateDate), new SqlParameter("@DepartmentId", model.DepartmentId) }; int rows = BWJSLogHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(BWJSLog.Model.XinboweinuoLog model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update dbo.[XinboweinuoLog] set "); strSql.Append(" IsDeleted = @IsDeleted , "); strSql.Append(" CreateId = @CreateId , "); strSql.Append(" CreateDate = @CreateDate , "); strSql.Append(" EditId = @EditId , "); strSql.Append(" EditDate = @EditDate , "); strSql.Append(" NetLoanApplyId = @NetLoanApplyId , "); strSql.Append(" ClassName = @ClassName , "); strSql.Append(" MethodName = @MethodName , "); strSql.Append(" ApiUrl = @ApiUrl , "); strSql.Append(" RequestDate = @RequestDate , "); strSql.Append(" RequestData = @RequestData , "); strSql.Append(" ResponseDate = @ResponseDate , "); strSql.Append(" ResponseData = @ResponseData "); strSql.Append(" where XinboweinuoLogId=@XinboweinuoLogId "); SqlParameter[] parameters = { new SqlParameter("@XinboweinuoLogId", model.XinboweinuoLogId), new SqlParameter("@IsDeleted", model.IsDeleted), new SqlParameter("@CreateId", model.CreateId), new SqlParameter("@CreateDate", model.CreateDate), new SqlParameter("@EditId", model.EditId), new SqlParameter("@EditDate", model.EditDate), new SqlParameter("@NetLoanApplyId", model.NetLoanApplyId), new SqlParameter("@ClassName", model.ClassName), new SqlParameter("@MethodName", model.MethodName), new SqlParameter("@ApiUrl", model.ApiUrl), new SqlParameter("@RequestDate", model.RequestDate), new SqlParameter("@RequestData", model.RequestData), new SqlParameter("@ResponseDate", model.ResponseDate), new SqlParameter("@ResponseData", model.ResponseData) }; int rows = BWJSLogHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(BWJSLog.Model.ApiInvokingLog model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update dbo.[ApiInvokingLog] set "); strSql.Append(" ResponseDate = @ResponseDate , "); strSql.Append(" ResponseData = @ResponseData , "); strSql.Append(" IsDeleted = @IsDeleted , "); strSql.Append(" CreateId = @CreateId , "); strSql.Append(" CreateDate = @CreateDate , "); strSql.Append(" CompanyId = @CompanyId , "); strSql.Append(" BusinessType = @BusinessType , "); strSql.Append(" RelationId = @RelationId , "); strSql.Append(" ClassName = @ClassName , "); strSql.Append(" MethodName = @MethodName , "); strSql.Append(" ApiUrl = @ApiUrl , "); strSql.Append(" RequestDate = @RequestDate , "); strSql.Append(" RequestData = @RequestData "); strSql.Append(" where ApiInvokingLogId=@ApiInvokingLogId "); SqlParameter[] parameters = { new SqlParameter("@ApiInvokingLogId", model.ApiInvokingLogId), new SqlParameter("@ResponseDate", model.ResponseDate), new SqlParameter("@ResponseData", model.ResponseData), new SqlParameter("@IsDeleted", model.IsDeleted), new SqlParameter("@CreateId", model.CreateId), new SqlParameter("@CreateDate", model.CreateDate), new SqlParameter("@CompanyId", model.CompanyId), new SqlParameter("@BusinessType", model.BusinessType), new SqlParameter("@RelationId", model.RelationId), new SqlParameter("@ClassName", model.ClassName), new SqlParameter("@MethodName", model.MethodName), new SqlParameter("@ApiUrl", model.ApiUrl), new SqlParameter("@RequestDate", model.RequestDate), new SqlParameter("@RequestData", model.RequestData) }; int rows = BWJSLogHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 批量删除一批数据 /// </summary> public bool DeleteList(string OperationLogIdlist, int userId) { StringBuilder strSql = new StringBuilder(); strSql.AppendFormat("update dbo.[OperationLog] set IsDeleted=1,EditId={0},EditDate='{1}'", userId, DateTime.Now); strSql.Append(" where OperationLogId in (" + OperationLogIdlist + ") "); int rows = BWJSLogHelperSQL.ExecuteSql(strSql.ToString()); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 批量删除一批数据 /// </summary> public bool UpdateDeleteList(string MofangSendLogIDlist) { StringBuilder strSql = new StringBuilder(); strSql.Append("update MofangSendLog set RecordIsDelete =1 "); strSql.Append(" where ID in (" + MofangSendLogIDlist + ") "); int rows = BWJSLogHelperSQL.ExecuteSql(strSql.ToString()); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 批量删除一批数据 /// </summary> public bool DeleteList(string SmsLogIdlist) { StringBuilder strSql = new StringBuilder(); strSql.Append("update SmsSendLog set IsDeleted=1"); strSql.Append(" where ID in (" + SmsLogIdlist + ") "); int rows = BWJSLogHelperSQL.ExecuteSql(strSql.ToString()); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(BWJSLog.Model.MachineLocationLog model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update dbo.[MachineLocationLog] set "); strSql.Append(" CreateDate = @CreateDate , "); strSql.Append(" IsDeleted = @IsDeleted , "); strSql.Append(" Remark = @Remark , "); strSql.Append(" UserId = @UserId , "); strSql.Append(" MachineId = @MachineId , "); strSql.Append(" IP = @IP , "); strSql.Append(" MAC = @MAC , "); strSql.Append(" Latitude = @Latitude , "); strSql.Append(" Longitude = @Longitude , "); strSql.Append(" LocationAddress = @LocationAddress , "); strSql.Append(" LocationData = @LocationData "); strSql.Append(" where MachineLocationLogId=@MachineLocationLogId "); SqlParameter[] parameters = { new SqlParameter("@MachineLocationLogId", model.MachineLocationLogId), new SqlParameter("@CreateDate", model.CreateDate), new SqlParameter("@IsDeleted", model.IsDeleted), new SqlParameter("@Remark", model.Remark), new SqlParameter("@UserId", model.UserId), new SqlParameter("@MachineId", model.MachineId), new SqlParameter("@IP", model.IP), new SqlParameter("@MAC", model.MAC), new SqlParameter("@Latitude", model.Latitude), new SqlParameter("@Longitude", model.Longitude), new SqlParameter("@LocationAddress", model.LocationAddress), new SqlParameter("@LocationData", model.LocationData) }; int rows = BWJSLogHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(BWJSLog.Model.SmsSendLog model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update SmsSendLog set "); strSql.Append(" SendResult = @SendResult , "); strSql.Append(" SmsTemplateId = @SmsTemplateId , "); strSql.Append(" SendType = @SendType , "); strSql.Append(" SmsContent = @SmsContent , "); strSql.Append(" Mobile = @Mobile , "); strSql.Append(" Status = @Status , "); strSql.Append(" IsDeleted = @IsDeleted , "); strSql.Append(" CreateDate = @CreateDate , "); strSql.Append(" SendDate = @SendDate "); strSql.Append(" where SmsLogId=@SmsLogId "); SqlParameter[] parameters = { new SqlParameter("@SmsLogId", model.SmsLogId), new SqlParameter("@SendResult", model.SendResult), new SqlParameter("@SmsTemplateId", model.SmsTemplateId), new SqlParameter("@SendType", model.SendType), new SqlParameter("@SmsContent", model.SmsContent), new SqlParameter("@Mobile", model.Mobile), new SqlParameter("@Status", model.Status), new SqlParameter("@IsDeleted", model.IsDeleted), new SqlParameter("@CreateDate", model.CreateDate), new SqlParameter("@SendDate", model.SendDate) }; int rows = BWJSLogHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(MofangReceivedLog model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update MofangReceivedLog set "); strSql.Append(" MothodName = @MothodName , "); strSql.Append(" TransNo = @TransNo , "); strSql.Append(" IsProcessed = @IsProcessed , "); strSql.Append(" Message = @Message , "); strSql.Append(" ReceivedTime = @ReceivedTime , "); strSql.Append(" RecordUpdateUserID = @RecordUpdateUserID , "); strSql.Append(" RecordUpdateTime = GetDate() "); strSql.Append(" where MofangReceivedLogID=@MofangReceivedLogID and RecordUpdateTime = @RecordUpdateTime"); SqlParameter[] parameters = { new SqlParameter("@MofangReceivedLogID", model.MofangReceivedLogID), new SqlParameter("@MothodName", model.MothodName), new SqlParameter("@TransNo", model.TransNo), new SqlParameter("@IsProcessed", model.IsProcessed), new SqlParameter("@Message", model.Message), new SqlParameter("@ReceivedTime", model.ReceivedTime), new SqlParameter("@RecordUpdateUserID", model.RecordUpdateUserID), new SqlParameter("@RecordUpdateTime", model.RecordUpdateTime) }; int rows = BWJSLogHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(int OperationLogId, int userId) { StringBuilder strSql = new StringBuilder(); strSql.Append("update dbo.[OperationLog] set IsDeleted=1,EditId=@EditId,EditDate=@EditDate"); strSql.Append(" where OperationLogId=@OperationLogId"); SqlParameter[] parameters = { new SqlParameter("@EditId", userId), new SqlParameter("@EditDate", DateTime.Now), new SqlParameter("@OperationLogId", OperationLogId), }; int rows = BWJSLogHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 删除一条数据 /// </summary> public bool UpdateDelete(int MofangSendLogID) { StringBuilder strSql = new StringBuilder(); strSql.Append("update MofangSendLog set RecordIsDelete =1 "); strSql.Append(" where MofangSendLogID=@MofangSendLogID"); SqlParameter[] parameters = { new SqlParameter("@MofangSendLogID", SqlDbType.Int, 4) }; parameters[0].Value = MofangSendLogID; int rows = BWJSLogHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(int SmsLogId) { StringBuilder strSql = new StringBuilder(); strSql.Append("update SmsSendLog set IsDeleted=1"); strSql.Append(" where SmsLogId=@SmsLogId"); SqlParameter[] parameters = { new SqlParameter("@SmsLogId", SqlDbType.Int, 4) }; parameters[0].Value = SmsLogId; int rows = BWJSLogHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }