<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>


    exec setScores 'test','test'


    alter proc setScores (@userName varchar(120),@password varchar(120))
    as
    begin
    declare @count int
    declare @lastDate datetime
    declare @gid varchar(60)
    declare @sum int
    declare @level varchar(60)
    ---年度變量
    declare @regDate datetime
    declare @yearCount int
    ---函數主題
    select @gid=Gid from CusUsers where [User_Name]=@userName
    select @count=count(1) from CusUsers where [User_Name]=@userName and User_Pass=@password
    if(@count>0)
    begin
    select @lastDate=gdate from UserScrores where uid=@gid and stype=1 order by gdate desc
    set @lastDate=isnull(@lastDate,getdate()-1)
    if(datediff(day,@lastDate,getdate())>=1)
    begin
    --添加登陸日志
    insert into UserScrores(stype,uid,Scores) select '1',@gid,10

    end
    --年度分設置
    select @regDate=Gdate from CusUsers where  Gid=@gid
    set @yearCount=datediff(year,@regDate,getdate())
    if(@yearCount>=0)
    begin
    print '10'
    update UserScrores set Scores=50 where uid=@gid and stype=10
    if(@@rowcount<=0)
    insert into UserScrores(stype,uid,Scores) select '10',@gid,50
    end
    else if (@yearCount>=1 and @yearCount<=2)
    begin
    update UserScrores set Scores=50 where uid=@gid and stype=11
    if(@@rowcount<=0)
    insert into UserScrores(stype,uid,Scores) select '11',@gid,50
    end
    else if(@yearCount>=3)
    begin
    update UserScrores set Scores=50 where uid=@gid and stype=12
    if(@@rowcount<=0)
    insert into UserScrores(stype,uid,Scores) select '12',@gid,50
    end

    ---設置級別
    select @sum=sum(isnull(Scores,0)) from UserScrores where uid=@gid
    select @level=levelMark from LevelTable where @sum between SStart and SEnd
    update CusUsers set ULevel=@level where Gid=@gid
    --設置結束
    end

    end

    GO


    select * from LevelTable

    posted on 2010-11-06 18:37 sanmao 閱讀(167) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     

    常用鏈接

    留言簿(5)

    隨筆分類

    隨筆檔案

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 花蝴蝶免费视频在线观看高清版 | 两个人日本WWW免费版| 国产亚洲美女精品久久久2020| 国产无遮挡裸体免费视频在线观看 | 亚洲а∨天堂久久精品| 99在线免费视频| a级成人毛片免费视频高清| 亚洲一区二区电影| 日本成人在线免费观看| 国产在线观看免费视频软件| 麻豆狠色伊人亚洲综合网站 | 中文字幕亚洲色图| 国产免费啪嗒啪嗒视频看看| 日本中文字幕免费高清视频| 亚洲AV无码成人精品区日韩| 久久久久久久综合日本亚洲| 在线免费观看一级毛片| 在线播放免费人成毛片乱码| 亚洲熟妇无码av另类vr影视| 亚洲av最新在线网址| 国产男女猛烈无遮挡免费网站 | 亚洲人精品午夜射精日韩| 日韩精品无码区免费专区 | 亚洲AV无码乱码在线观看牲色| 亚洲一级免费毛片| 久久成人18免费网站| 亚洲av无一区二区三区| 亚洲尹人香蕉网在线视颅| 亚洲乱码日产精品a级毛片久久| 无码日韩精品一区二区免费| 免费观看男人吊女人视频| 麻豆va在线精品免费播放| 亚洲AV无码精品蜜桃| 亚洲av不卡一区二区三区| 亚洲国产午夜福利在线播放| 青青草免费在线视频| 永久看日本大片免费35分钟| 中文在线免费观看| 免费无遮挡无遮羞在线看| 亚洲成a人无码亚洲成www牛牛 | 免费无码又爽又刺激高潮软件|