基本信息
源码名称:大转盘
源码大小:0.42M
文件格式:.zip
开发语言:C#
更新时间:2015-10-09
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 1 元 
   源码介绍

大转盘

public partial class Index : System.Web.UI.Page
    {
        string s = "0|很遗憾,本次您未抽中奖";
        int[] arr = { 67, 112, 202, 292, 337 };

        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Write(ZhuanPan());
        }

        public string ZhuanPan()
        {
            Random ran = new Random();
            int num = ran.Next(0, 360);

            if (0 < num && num < 45)
            {
                if (checkLottery(3))
                {
                    s = "22|恭喜您抽中了三等奖";
                }
                else
                {
                    num = ran.Next(0, 4);
                    s = arr[num].ToString() "|很遗憾,本次您未抽中奖";
                }
            }
            else if (225 < num && num < 270)
            {
                if (checkLottery(2))
                {
                    s = "247|恭喜您抽中了二等奖";
                }
                else
                {
                    num = ran.Next(0, 4);
                    s = arr[num].ToString() "|很遗憾,本次您未抽中奖";
                }
            }
            else if (135 < num && num < 180)
            {
                if (checkLottery(1))
                {
                    s = "157|恭喜您抽中了一等奖";
                }
                else
                {
                    num = ran.Next(0, 4);
                    s = arr[num].ToString() "|很遗憾,本次您未抽中奖";
                }
            }
            else
            {
                return (num).ToString() "|很遗憾,本次您未抽中奖";
            }
            return s;