Пример #1
0
    private void BindBankType()
    {
        DataTable dt = new DAL.Tables.T_Banks().Open("", "", "[Name]");

        ddlAccountType.DataSource     = dt;
        ddlAccountType.DataTextField  = "Name";
        ddlAccountType.DataValueField = "Name";
        ddlAccountType.DataBind();

        ddlAccountType.Items.Insert(0, "");
        ddlAccountType.Items.Add(new ListItem("支付宝", "支付宝"));
    }
Пример #2
0
    private void BindData()
    {
        lbUserName.Text = "*".PadLeft(_User.Name.Length - 1, '*') + _User.Name.Substring(_User.Name.Length - 1);
        if (_User.RealityName != "")
        {
            this.tbRealityName.Visible       = false;
            this.lbRealityName.Visible       = true;
            this.lbRealityName.Text          = "*".PadLeft(_User.RealityName.Length - 1, '*') + _User.RealityName.Substring(_User.RealityName.Length - 1);
            this.lbIsRealityNameValided.Text = "已绑定";
        }
        else
        {
            this.tbRealityName.Visible       = true;
            this.lbRealityName.Visible       = false;
            this.tbRealityName.Text          = "***";
            this.lbIsRealityNameValided.Text = "未绑定";
        }

        ddlCity.City_id = _User.CityID;
        rbSexM.Checked  = (_User.Sex == "男");
        rbSexW.Checked  = (_User.Sex != "男");
        tbBirthday.Text = _User.BirthDay.ToShortDateString();

        tbAddress.Text = _User.Address;
        tbEmail.Text   = _User.Email;

        try
        {
            if (_User.isMobileValided)
            {
                lbMobile.Text = _User.Mobile.Substring(0, 3) + "*****" + _User.Mobile.Substring(8, 3);
            }
        }
        catch
        { }

        DataTable dt = new DAL.Tables.T_Users().Open("IsQQValided", "ID=" + _User.ID.ToString(), "");

        if (dt == null || dt.Rows.Count == 0)
        {
            return;
        }

        bool IsQQValided = Shove._Convert.StrToBool(dt.Rows[0]["IsQQValided"].ToString(), false);

        if (IsQQValided)
        {
            lbQQ.Text = _User.QQ.Length > 3 ? (_User.QQ.Substring(0, 3) + "********") : _User.QQ;
        }

        lbIsEmailValided.Text   = (_User.isEmailValided ? "<font color='red'>已激活</font>" : "未激活") + "&nbsp;&nbsp;<a href='UserEmailBind.aspx'>申请激活或修改激活</a>";
        labIsMobileVailded.Text = (_User.isMobileValided ? "<font color='red'>已绑定</font>" : "未绑定") + "&nbsp;&nbsp;<a href='UserMobileBind.aspx'>申请绑定或修改绑定</a>";
        lbQQValided.Text        = (IsQQValided ? "<font color='red'>已绑定</font>" : "未绑定") + "&nbsp;&nbsp;<a href='UserQQBind.aspx'>申请绑定或修改绑定</a>";

        dt = new DAL.Tables.T_Banks().Open("", "", "[Order]");

        if (_User.SecurityQuestion.StartsWith("自定义问题|"))
        {
            lbQuestion.Text = _User.SecurityQuestion.Remove(0, 6);
        }
        else
        {
            lbQuestion.Text = _User.SecurityQuestion;
        }

        if (lbQuestion.Text == "")
        {
            lbQuestionInfo.Text = "设置安全保护问题";
        }
        else
        {
            lbQuestionInfo.Text = "修改安全保护问题";
        }

        try
        {
            if (_User.IDCardNumber.Length == 15)
            {
                lbIdCardNumber.Visible       = true;
                tbIdIDCardNumber.Visible     = false;
                lbIdCardNumber.Text          = _User.IDCardNumber.Substring(0, 6) + "*****" + _User.IDCardNumber.Substring(10, 4);
                lbIsIdCardNumberValided.Text = "已绑定";
            }
            else
            {
                lbIdCardNumber.Visible       = true;
                tbIdIDCardNumber.Visible     = false;
                lbIdCardNumber.Text          = _User.IDCardNumber.Substring(0, 6) + "********" + _User.IDCardNumber.Substring(14, 4);
                lbIsIdCardNumberValided.Text = "已绑定";
            }
        }
        catch
        {
            lbIdCardNumber.Visible       = false;
            tbIdIDCardNumber.Visible     = true;
            lbIdCardNumber.Text          = "";
            lbIsIdCardNumberValided.Text = "未绑定";
        }
        hdIDCardNumber.Value = lbIdCardNumber.Text;
    }
Пример #3
0
    static DataCache()
    {
        #region 银行

        DataTable dt = new DAL.Tables.T_Banks().Open("ID,Name", "", "");

        if (dt == null)
        {
            new Log("SNS").Write("PublicFunction 读取 T_Banks 出错");
        }

        if (dt != null)
        {
            foreach (DataRow dr in dt.Rows)
            {
                Banks[short.Parse(dr["ID"].ToString())] = dr["Name"].ToString();
            }
        }

        #endregion

        #region 城市

        dt = new DAL.Tables.T_Citys().Open("ID,Name", "", "");

        if (dt == null)
        {
            new Log("SNS").Write("PublicFunction 读取 T_Citys 出错");
        }

        if (dt != null)
        {
            foreach (DataRow dr in dt.Rows)
            {
                Citys[dr["Name"].ToString()] = int.Parse(dr["ID"].ToString());
            }
        }

        #endregion

        #region 安全问题

        SecurityQuestions[0] = "我婆婆或岳母的名字叫什么?";
        SecurityQuestions[1] = "我爸爸的出生地在哪里?";
        SecurityQuestions[2] = "我妈妈的出生地在哪里?";
        SecurityQuestions[3] = "我的小学校名是什么?";
        SecurityQuestions[4] = "我的中学校名是什么?";
        SecurityQuestions[5] = "我的一个好朋友的手机号码是什么?";
        SecurityQuestions[6] = "我的一个好朋友的爸爸名字是什么?";
        SecurityQuestions[7] = "自定义问题";

        #endregion

        #region 彩种玩法
        Lotteries[3]  = "七星彩";
        Lotteries[5]  = "双色球";
        Lotteries[6]  = "福彩3D";
        Lotteries[27] = "齐鲁风采23选5";
        Lotteries[28] = "重庆时时彩";
        Lotteries[29] = "时时乐";
        Lotteries[39] = "大乐透";
        Lotteries[58] = "东方6+1";
        Lotteries[59] = "15选5";
        Lotteries[13] = "七乐彩";
        Lotteries[9]  = "22选5";
        Lotteries[14] = "29选7";
        Lotteries[63] = "排列3";
        Lotteries[64] = "排列5";
        Lotteries[19] = "篮彩";
        Lotteries[1]  = "胜负彩";
        Lotteries[2]  = "四场进球彩";
        Lotteries[15] = "六场半全场";
        Lotteries[61] = "江西时时彩";
        Lotteries[62] = "十一运夺金";
        Lotteries[65] = "31选7";
        Lotteries[41] = "浙江体彩6+1";
        Lotteries[70] = "11选5";   //江西11选5
        Lotteries[71] = "山东群英会";
        Lotteries[72] = "竞彩足彩";
        Lotteries[73] = "竞彩蓝彩";
        Lotteries[74] = "胜负彩";
        Lotteries[75] = "任九场";
        Lotteries[69] = "河南福彩22选5";
        Lotteries[68] = "快赢481";
        Lotteries[77] = "河南11选5";
        Lotteries[78] = "广东11选5";

        Dictionary <int, string> tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[301] = "单式";
        tempPlayTypes[302] = "复式";
        PlayTypes[3]       = tempPlayTypes;

        tempPlayTypes      = new Dictionary <int, string>();
        tempPlayTypes[501] = "单式";
        tempPlayTypes[502] = "复式";
        tempPlayTypes[503] = "胆拖";

        PlayTypes[5] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[601] = "直选单式";
        tempPlayTypes[602] = "直选复式";
        tempPlayTypes[603] = "组选单式";
        tempPlayTypes[604] = "组6复式";
        tempPlayTypes[605] = "组3复式";
        tempPlayTypes[606] = "直选包点";
        tempPlayTypes[607] = "复选包点";

        PlayTypes[6] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[2801] = "单式";
        tempPlayTypes[2802] = "复式";
        tempPlayTypes[2803] = "组选";
        tempPlayTypes[2804] = "猜大小";
        tempPlayTypes[2805] = "五星通选单式";
        tempPlayTypes[2806] = "五星通选复式";
        tempPlayTypes[2807] = "二星组选单式";
        tempPlayTypes[2808] = "二星组选复式";
        tempPlayTypes[2809] = "二星组选分位";
        tempPlayTypes[2810] = "二星组选包点";
        tempPlayTypes[2811] = "二星组选包胆";
        tempPlayTypes[2812] = "三星包点";
        tempPlayTypes[2813] = "三星组3单式";
        tempPlayTypes[2814] = "三星组3复式";
        tempPlayTypes[2815] = "三星组6单式";
        tempPlayTypes[2816] = "三星组6复式";
        tempPlayTypes[2817] = "三星直选组合复式";
        tempPlayTypes[2818] = "三星组选包胆";
        tempPlayTypes[2819] = "三星组选包点";

        PlayTypes[61] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[2901] = "直选单式";
        tempPlayTypes[2902] = "直选复式";
        tempPlayTypes[2903] = "组选单式";
        tempPlayTypes[2904] = "组选6";
        tempPlayTypes[2905] = "组选3";
        tempPlayTypes[2906] = "直选";
        tempPlayTypes[2907] = "组选";
        tempPlayTypes[2908] = "前二单式";
        tempPlayTypes[2909] = "前二复式";
        tempPlayTypes[2910] = "后二单式";
        tempPlayTypes[2911] = "后二复式";
        tempPlayTypes[2912] = "前一单式";
        tempPlayTypes[2913] = "前一复式";
        tempPlayTypes[2914] = "后一单式";
        tempPlayTypes[2915] = "后一复式";

        PlayTypes[29] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[3901] = "单式";
        tempPlayTypes[3902] = "复式";
        tempPlayTypes[3903] = "追加单式";
        tempPlayTypes[3904] = "追加复式";
        tempPlayTypes[3905] = "12选2单式";
        tempPlayTypes[3906] = "12选2复式";

        PlayTypes[39] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[5801] = "单式";
        tempPlayTypes[5802] = "复式";

        PlayTypes[58] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[1301] = "单式";
        tempPlayTypes[1302] = "复式";

        PlayTypes[13] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[5901] = "单式";
        tempPlayTypes[5902] = "复式";

        PlayTypes[59] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[901] = "单式";
        tempPlayTypes[902] = "复式";

        PlayTypes[9] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[1401] = "单式";
        tempPlayTypes[1402] = "复式";

        PlayTypes[14] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[6301] = "排列3直选单式";
        tempPlayTypes[6302] = "排列3直选复式";
        tempPlayTypes[6303] = "排列3组选单式";
        tempPlayTypes[6304] = "排列3组选6复式";
        tempPlayTypes[6305] = "排列3组选3复式";
        tempPlayTypes[6306] = "排列3直选和值";
        tempPlayTypes[6307] = "排列3组选和值";

        PlayTypes[63] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[6401] = "排列5单式";
        tempPlayTypes[6402] = "排列5复式";

        PlayTypes[64] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[1901] = "单式";
        tempPlayTypes[1902] = "复式";

        PlayTypes[19] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[101] = "单式";
        tempPlayTypes[102] = "复式";
        tempPlayTypes[103] = "任九场单式";
        tempPlayTypes[104] = "任九场复式";

        PlayTypes[1] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[201] = "单式";
        tempPlayTypes[202] = "复式";

        PlayTypes[2] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[1501] = "单式";
        tempPlayTypes[1502] = "复式";

        PlayTypes[15] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[6201] = "任选一";
        tempPlayTypes[6202] = "任选二";
        tempPlayTypes[6203] = "任选三";
        tempPlayTypes[6204] = "任选四";
        tempPlayTypes[6205] = "任选五";
        tempPlayTypes[6206] = "任选六";
        tempPlayTypes[6207] = "任选七";
        tempPlayTypes[6208] = "任选八";
        tempPlayTypes[6209] = "前二直选";
        tempPlayTypes[6210] = "前三直选";
        tempPlayTypes[6211] = "前二组选";
        tempPlayTypes[6212] = "前三组选";

        PlayTypes[62] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[6501] = "单式";
        tempPlayTypes[3502] = "复式";

        PlayTypes[65] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[6501] = "单式";
        tempPlayTypes[3502] = "复式";

        PlayTypes[65] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[6101] = "单式";
        tempPlayTypes[6102] = "复式";
        tempPlayTypes[6103] = "组选";
        tempPlayTypes[6104] = "猜大小";
        tempPlayTypes[6105] = "五星通选单式";
        tempPlayTypes[6106] = "五星通选复式";
        tempPlayTypes[6107] = "二星组选单式";
        tempPlayTypes[6108] = "二星组选复式";
        tempPlayTypes[6109] = "二星组选分位";
        tempPlayTypes[6110] = "二星组选包点";
        tempPlayTypes[6111] = "二星组选包胆";
        tempPlayTypes[6112] = "二星直选包点";

        PlayTypes[61] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[7001] = "任选一";
        tempPlayTypes[7002] = "任选二";
        tempPlayTypes[7003] = "任选三";
        tempPlayTypes[7004] = "任选四";
        tempPlayTypes[7005] = "任选五";
        tempPlayTypes[7006] = "任选六";
        tempPlayTypes[7007] = "任选七";
        tempPlayTypes[7008] = "任选八";
        tempPlayTypes[7009] = "前二直选";
        tempPlayTypes[7010] = "前三直选";
        tempPlayTypes[7011] = "前二组选";
        tempPlayTypes[7012] = "前三组选";

        PlayTypes[70] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[4101] = "单式";
        tempPlayTypes[4102] = "复式";

        PlayTypes[41] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[7201] = "单式";
        tempPlayTypes[7202] = "复式";
        tempPlayTypes[7203] = "复式";
        tempPlayTypes[7204] = "复式";

        PlayTypes[72] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[7301] = "单式";
        tempPlayTypes[7302] = "复式";
        tempPlayTypes[7303] = "复式";
        tempPlayTypes[7304] = "复式";

        PlayTypes[73] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[7401] = "单式";
        tempPlayTypes[7402] = "复式";

        PlayTypes[74] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[7501] = "单式";
        tempPlayTypes[7502] = "复式";

        PlayTypes[75] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[6901] = "单式";
        tempPlayTypes[6902] = "复式";
        tempPlayTypes[6903] = "好运2";
        tempPlayTypes[6904] = "好运3";
        tempPlayTypes[6905] = "好运4";

        PlayTypes[69] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[6801] = "任选一";
        tempPlayTypes[6802] = "任选二";
        tempPlayTypes[6803] = "任选三";
        tempPlayTypes[6804] = "直选单式";
        tempPlayTypes[6805] = "直选复式";
        tempPlayTypes[6806] = "组选24单式";
        tempPlayTypes[6807] = "组选24复式";
        tempPlayTypes[6808] = "组选12单式";
        tempPlayTypes[6809] = "组选12复式";
        tempPlayTypes[6810] = "组选6单式";
        tempPlayTypes[6811] = "组选6复式";
        tempPlayTypes[6812] = "组选4单式";
        tempPlayTypes[6813] = "组选4复式";

        PlayTypes[68] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[7701] = "任选一";
        tempPlayTypes[7702] = "任选二";
        tempPlayTypes[7703] = "任选三";
        tempPlayTypes[7704] = "任选四";
        tempPlayTypes[7705] = "任选五";
        tempPlayTypes[7706] = "任选六";
        tempPlayTypes[7707] = "任选七";
        tempPlayTypes[7708] = "任选八";
        tempPlayTypes[7709] = "前二直选";
        tempPlayTypes[7710] = "前三直选";
        tempPlayTypes[7711] = "前二组选";
        tempPlayTypes[7712] = "前三组选";

        PlayTypes[77] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[7801] = "任选一";
        tempPlayTypes[7802] = "任选二";
        tempPlayTypes[7803] = "任选三";
        tempPlayTypes[7804] = "任选四";
        tempPlayTypes[7805] = "任选五";
        tempPlayTypes[7806] = "任选六";
        tempPlayTypes[7807] = "任选七";
        tempPlayTypes[7808] = "任选八";
        tempPlayTypes[7809] = "前二直选";
        tempPlayTypes[7810] = "前三直选";
        tempPlayTypes[7811] = "前二组选";
        tempPlayTypes[7812] = "前三组选";

        PlayTypes[78] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[2701] = "单式";
        tempPlayTypes[2702] = "复式";
        tempPlayTypes[2703] = "好运二单式";
        tempPlayTypes[2704] = "好运二复式";

        PlayTypes[27] = tempPlayTypes;

        tempPlayTypes = new Dictionary <int, string>();

        tempPlayTypes[7101] = "任选一";
        tempPlayTypes[7102] = "任选二";
        tempPlayTypes[7103] = "任选三";
        tempPlayTypes[7104] = "任选四";
        tempPlayTypes[7105] = "任选五";
        tempPlayTypes[7106] = "任选六";
        tempPlayTypes[7107] = "任选七";
        tempPlayTypes[7108] = "任选八";
        tempPlayTypes[7109] = "任选九";
        tempPlayTypes[7110] = "任选十";
        tempPlayTypes[7111] = "围一";
        tempPlayTypes[7112] = "围二";
        tempPlayTypes[7113] = "围三";
        tempPlayTypes[7114] = "围四";
        tempPlayTypes[7115] = "顺一";
        tempPlayTypes[7116] = "顺二";
        tempPlayTypes[7117] = "顺三";

        PlayTypes[71] = tempPlayTypes;
        #endregion

        #region 提前截止时间

        string strLottery = "";

        foreach (KeyValuePair <int, string> kvp in Lotteries)
        {
            strLottery += kvp.Key + ",";
        }

        strLottery = strLottery.Remove(strLottery.Length - 1, 1);

        DataTable dtPlayTypes = new DAL.Tables.T_PlayTypes().Open("LotteryID,SystemEndAheadMinute", "LotteryID in (" + strLottery + ")", "");

        foreach (DataRow dr in dtPlayTypes.Rows)
        {
            LotteryEndAheadMinute[int.Parse(dr["LotteryID"].ToString())] = int.Parse(dr["SystemEndAheadMinute"].ToString());
        }

        #endregion
    }