小任班长 发布的文章

usemastergo 
create  proc  KillSpByDbName(@dbname  varchar(20))as  
begin  
declare  @sql  nvarchar(500),@temp varchar(1000)declare  @spid  int  
set  @sql='declare  getspid  cursor  for    
select spid from sysprocesses where dbid=db_id(
'''+@dbname+''')' exec (@sql)opengetspidfetch next from getspid into @spid while @@fetch_status <>-1 begin set @temp='kill'+rtrim(@spid)exec(@temp)fetch next from getspid into @spid end closegetspiddeallocategetspidend --举例使用,关闭数据库下的所有连接操作 UsemasterExec KillSpByDbName 'bafangmsh'

 

    /*** 得到指定日期 + 几个小时后的日期
* 参数都必须,否则返回null
*
@paramdate 需要增加小时数 的日期
*
@paramhour 增加小时数
*
@return */ public static Date getAddSomeHoursDate(Date date,inthour){if(date!=null && hour!=0){//SimpleDateFormat sf = new SimpleDateFormat(patternStr); Calendar ca=Calendar.getInstance();
ca.setTime(date);
ca.add(Calendar.HOUR_OF_DAY, hour);
//System.out.println(sf.format(ca.getTime())); returnca.getTime();
}
else{return null;
}

}

 

 

jeecg 弹出框 点击按钮回调父页面 返回值

<t:base type="jquery"></t:base>
<t:base type="tools,easyui"></t:base>
<style type="text/css">

</style>
<script type="text/javascript">
function myFun(opera){
if(windowapi){
  windowapi.opener.callbackFun(opera);
}else{
  parent.callbackFun(opera);
}
}

</script>

免责声明
本博客部分内容来自于互联网,不代表作者的观点和立场,如若侵犯到您的权益,请联系[email protected]。我们会在24小时内进行删除。