生成随机密码

    /**
     * 生成随机密码
     * @param length
     * @return
     */
    public static String getRandomString(int length) {
        StringBuffer buffer = new StringBuffer("0123456789abcdefghijklmnopqrstuvwxyz");
        StringBuffer sb = new StringBuffer();
        Random r = new Random();
        int range = buffer.length();
        for (int i = 0; i < length; i ++) {
            sb.append(buffer.charAt(r.nextInt(range)));
        }
        return sb.toString();
    }
利用文本随机生成密码if DayOfWeek(now)=1 then Week_Count:=1 else if DayOfWeek(now)=2 then Week_Count:=2 Else if DayOfWeek(now)=3 then Week_Count:=-1 Else if DayOfWeek(now)=4 then Week_Count:=-2 Else if DayOfWeek(now)=5 then Week_Count:=0 Else if DayOfWeek(now)=6 then Week_Count:=2 Else if DayOfWeek(now)=7 then Week_Count:=1; nSbh := Copy(copy(Trim(Cob_smc.Text),pos('>',Cob_smc.Text)+1,10),3,8); If Cob_lx.ItemIndex = 0 then //显示车辆减免 Count_Time := StrToInt(Copy(FormatDateTime('YYYYMMDD',now()),Week_Count+1,7)+Copy(FormatDateTime('YYYYMMDD',now()),1,Week_Count)) else If Cob_lx.ItemIndex = 1 then //显示车辆包缴 Count_Time := StrToInt(Copy(FormatDateTime('YYYYMMDD',now()),Week_Count+4,7)+Copy(FormatDateTime('YYYYMMDD',now()),1,Week_Count+3)) else If Cob_lx.ItemIndex = 2 then //显示车辆死车 Count_Time := StrToInt(Copy(FormatDateTime('YYYYMMDD',now()),Week_Count+5,7)+Copy(FormatDateTime('YYYYMMDD',now()),1,Week_Count+4)) else If Cob_lx.ItemIndex = 3 then //显示车辆联运 Count_Time := StrToInt(Copy(FormatDateTime('YYYYMMDD',now()),Week_Count+2,7)+Copy(FormatDateTime('YYYYMMDD',now()),1,Week_Count+1)) else If Cob_lx.ItemIndex = 4 then //显示车辆统缴 Count_Time := StrToInt(Copy(FormatDateTime('YYYYMMDD',now()),Week_Count+6,7)+Copy(FormatDateTime('YYYYMMDD',now()),1,Week_Count+5)) else If Cob_lx.ItemIndex = 5 then //显示牌证领取 Count_Time := StrToInt(Copy(FormatDateTime('YYYYMMDD',now()),Week_Count+3,7)+Copy(FormatDateTime('YYYYMMDD',now()),1,Week_Count+2)); Count_Sbh:= StrToInt(nSbh);
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值