Exemple #1
0
        private void getWithdrawInit(ref string strResult)
        {
            bool flag;
            bool flag2;

            base.checkLoginByHandler(0);
            ReturnResult result = new ReturnResult();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            new List <object>();
            string str = this.Session["user_name"].ToString();

            this.userModel = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;
            if ((!this.userModel.get_u_type().Trim().Equals("zj") && !this.userModel.get_u_type().Trim().Equals("fgs")) && (!this.userModel.get_u_type().Trim().Equals("gd") && !this.userModel.get_u_type().Trim().Equals("zd")))
            {
                base.Response.End();
            }
            base.checkCloneRight();
            this.lotteryDT = base.GetLotteryList();
            base.Permission_Aspx_ZJ_Ajax(this.userModel, "po_2_1");
            base.Permission_Aspx_DL_Ajax(this.userModel, "po_6_1");
            string   str2          = LSRequest.qq("uid");
            cz_users userInfoByUID = null;

            userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(str2);
            if (userInfoByUID.get_u_name().Equals(this.userModel.get_u_name()))
            {
                base.Response.End();
            }
            if (!base.IsUpperLowerLevels(userInfoByUID.get_u_name(), this.userModel.get_u_type(), this.userModel.get_u_name()))
            {
                base.Response.End();
            }
            CallBLL.cz_users_bll.GetUserInfoByUName(userInfoByUID.get_sup_name());
            base.OpenLotteryMaster(out flag, out flag2);
            dictionary.Add("name", userInfoByUID.get_u_name());
            dictionary.Add("utype", base.GetUTypeText(userInfoByUID.get_u_type()));
            dictionary.Add("nicker", userInfoByUID.get_u_nicker());
            if (flag && userInfoByUID.get_six_iscash().Equals(int.Parse("1")))
            {
                dictionary.Add("recoverCreditSix", userInfoByUID.get_six_usable_credit());
                dictionary.Add("isCashSix", userInfoByUID.get_six_iscash());
                dictionary.Add("isMasteridSix", 1);
            }
            if (flag2 && userInfoByUID.get_kc_iscash().Equals(int.Parse("1")))
            {
                dictionary.Add("recoverCreditKc", userInfoByUID.get_kc_usable_credit());
                dictionary.Add("isCashKc", userInfoByUID.get_kc_iscash());
                dictionary.Add("isMasteridKc", 2);
            }
            result.set_success(200);
            result.set_data(dictionary);
            strResult = base.ObjectToJson(result);
        }
Exemple #2
0
        private void getFlowList(ref string strResult)
        {
            bool          flag;
            bool          flag2;
            List <object> list;

            base.checkLoginByHandler(0);
            ReturnResult result = new ReturnResult();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            new List <object>();
            string str = this.Session["user_name"].ToString();

            this.userModel = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;
            if ((!this.userModel.get_u_type().Trim().Equals("zj") && !this.userModel.get_u_type().Trim().Equals("fgs")) && (!this.userModel.get_u_type().Trim().Equals("gd") && !this.userModel.get_u_type().Trim().Equals("zd")))
            {
                base.Response.End();
            }
            base.checkCloneRight();
            this.lotteryDT = base.GetLotteryList();
            base.Permission_Aspx_ZJ_Ajax(this.userModel, "po_2_1");
            base.Permission_Aspx_DL_Ajax(this.userModel, "po_6_1");
            string str2 = LSRequest.qq("masterid");
            string str3 = LSRequest.qq("uid");

            this.page = LSRequest.qq("page");
            if (string.IsNullOrEmpty(this.page))
            {
                this.page = "1";
            }
            else if (int.Parse(this.page) < 1)
            {
                this.page = "1";
            }
            cz_users userInfoByUID = null;

            userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(str3);
            if (!base.IsUpperLowerLevels(userInfoByUID.get_u_name(), this.userModel.get_u_type(), this.userModel.get_u_name()))
            {
                base.Response.End();
            }
            CallBLL.cz_users_bll.GetUserInfoByUName(userInfoByUID.get_sup_name());
            base.OpenLotteryMaster(out flag, out flag2);
            DataTable table = null;

            if (flag && userInfoByUID.get_six_iscash().Equals(int.Parse("1")))
            {
                int num = 1;
                if (str2.Equals(num.ToString()))
                {
                    table = CallBLL.cz_credit_flow_bll.GetCreditListByUName_Phone(str3, 1, int.Parse(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, "");
                    goto Label_02B8;
                }
            }
            if (flag2 && userInfoByUID.get_kc_iscash().Equals(int.Parse("1")))
            {
                int num2 = 2;
                if (str2.Equals(num2.ToString()))
                {
                    table = CallBLL.cz_credit_flow_bll.GetCreditListByUName_Phone(str3, 2, int.Parse(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, "");
                    goto Label_02B8;
                }
            }
            base.noRightOptMsg("無權操作!");
            base.Response.End();
Label_02B8:
            list = new List <object>();
            if ((table != null) && (table.Rows.Count > 0))
            {
                foreach (DataRow row in table.Rows)
                {
                    Dictionary <string, object> item = new Dictionary <string, object>();
                    item.Add("lottery", base.GetMasterLotteryByMasterid(int.Parse(row["master_id"].ToString())));
                    item.Add("name", row["u_name"].ToString());
                    item.Add("flagtxt", base.GetCreditFlowText(row["flag"].ToString()));
                    int?nullable3 = null;
                    item.Add("jy_old", Utils.GetMathRound(double.Parse(row["credit_old"].ToString()), nullable3));
                    int?nullable4 = null;
                    item.Add("jy_change", Utils.GetMathRound(double.Parse(row["credit_change"].ToString()), nullable4));
                    int?nullable5 = null;
                    item.Add("jy_new", Utils.GetMathRound(double.Parse(row["credit_new"].ToString()), nullable5));
                    item.Add("remark", row["note"].ToString());
                    if (this.userModel.get_u_name().Equals(row["operator_name"].ToString()) && (this.userModel.get_users_child_session() != null))
                    {
                        item.Add("opt_name", " - " + row["operator_child_name"].ToString());
                    }
                    else if (this.userModel.get_u_name().Equals(row["operator_name"].ToString()) && (this.userModel.get_users_child_session() == null))
                    {
                        string str4 = row["operator_name"].ToString();
                        if (!string.IsNullOrEmpty(row["operator_child_name"].ToString()))
                        {
                            str4 = str4 + " - " + row["operator_child_name"].ToString();
                        }
                        item.Add("opt_name", str4);
                    }
                    else if (!base.IsUpperLowerLevels(row["operator_name"].ToString(), this.userModel.get_u_type(), this.userModel.get_u_name()))
                    {
                        item.Add("opt_name", "-");
                    }
                    else
                    {
                        string str5 = row["operator_name"].ToString();
                        if (!string.IsNullOrEmpty(row["operator_child_name"].ToString()))
                        {
                            str5 = str5 + " - " + row["operator_child_name"].ToString();
                        }
                        item.Add("opt_name", str5);
                    }
                    item.Add("opt_time", DateTime.Parse(row["operator_time"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"));
                    list.Add(item);
                }
            }
            dictionary.Add("flowList", list);
            if (dictionary.Count == 0)
            {
                dictionary.Add("page", 0);
            }
            else if ((table != null) && (table.Rows.Count > 0))
            {
                dictionary.Add("page", int.Parse(this.page) + 1);
            }
            else
            {
                dictionary.Add("page", this.page);
            }
            result.set_success(200);
            result.set_data(dictionary);
            strResult = base.ObjectToJson(result);
        }
Exemple #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Response.Expires = 0;
        base.IsUserLoginByMobile();
        this.lotteryTable = base.GetLotteryList();
        this.userName     = HttpContext.Current.Session["user_name"].ToString();
        cz_users _users = CallBLL.cz_users_bll.UserLogin(this.userName);

        this.kc_kind           = _users.get_kc_kind().Trim();
        this.kc_credit         = Convert.ToDecimal(_users.get_kc_credit());
        this.kc_usable_credit  = Convert.ToDecimal(_users.get_kc_usable_credit());
        this.kc_iscash         = _users.get_kc_iscash().ToString();
        this.six_kind          = _users.get_six_kind().Trim();
        this.six_credit        = Convert.ToDecimal(_users.get_six_credit());
        this.six_usable_credit = Convert.ToDecimal(_users.get_six_usable_credit());
        this.six_iscash        = _users.get_six_iscash().ToString();
        if (base.IsOpenBigLottery(2))
        {
            string str;
            if (base.IsOpenLottery(0))
            {
                str = "86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,123,124,125,126,127,128,129,130,131,132,133,134,135,136";
                this.kl10DataTable = CallBLL.cz_drawback_kl10_bll.GetDrawbackByPlayId(this.userName, str).Tables[0];
            }
            if (base.IsOpenLottery(1))
            {
                this.cqscDataTable = CallBLL.cz_drawback_cqsc_bll.GetDrawbackList(this.userName, "4,5,6,7,8,9,10,11,12,13,14,15").Tables[0];
            }
            if (base.IsOpenLottery(2))
            {
                this.pk10DataTable = CallBLL.cz_drawback_pk10_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            if (base.IsOpenLottery(3))
            {
                this.xyncDataTable = CallBLL.cz_drawback_xync_bll.GetDrawbackList(this.userName, "86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,123,124,125,126,127,128,129,130,131,132,133,134,135,136").Tables[0];
            }
            if (base.IsOpenLottery(4))
            {
                this.jsk3DataTable = CallBLL.cz_drawback_jsk3_bll.GetDrawbackList(this.userName).Tables[0];
            }
            if (base.IsOpenLottery(5))
            {
                this.kl8DataTable = CallBLL.cz_drawback_kl8_bll.GetDrawbackList(this.userName).Tables[0];
            }
            if (base.IsOpenLottery(6))
            {
                this.k8scDataTable = CallBLL.cz_drawback_cqsc_bll.GetDrawbackList(this.userName, "4,5,6,7,8,9,10,11,12,13,14,15").Tables[0];
            }
            if (base.IsOpenLottery(7))
            {
                this.pcddDataTable = CallBLL.cz_drawback_pcdd_bll.GetDrawbackList(this.userName, "71009,71010,71011,71012").Tables[0];
            }
            if (base.IsOpenLottery(9))
            {
                this.xyft5DataTable = CallBLL.cz_drawback_xyft5_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            if (base.IsOpenLottery(8))
            {
                this.pkbjlDataTable = CallBLL.cz_drawback_pkbjl_bll.GetDrawbackList(this.userName, "81001,81002,81003,81004").Tables[0];
            }
            if (base.IsOpenLottery(10))
            {
                this.jscarDataTable = CallBLL.cz_drawback_jscar_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            if (base.IsOpenLottery(11))
            {
                this.speed5DataTable = CallBLL.cz_drawback_speed5_bll.GetDrawbackList(this.userName, "4,5,6,7,8,9,10,11,12,13,14,15").Tables[0];
            }
            if (base.IsOpenLottery(12))
            {
                this.jspk10DataTable = CallBLL.cz_drawback_jspk10_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            if (base.IsOpenLottery(13))
            {
                this.jscqscDataTable = CallBLL.cz_drawback_jscqsc_bll.GetDrawbackList(this.userName, "4,5,6,7,8,9,10,11,12,13,14,15").Tables[0];
            }
            if (base.IsOpenLottery(14))
            {
                str = "86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,123,124,125,126,127,128,129,130,131,132,133,134,135,136";
                this.jssfcDataTable = CallBLL.cz_drawback_jssfc_bll.GetDrawbackByPlayId(this.userName, str).Tables[0];
            }
            if (base.IsOpenLottery(15))
            {
                this.jsft2DataTable = CallBLL.cz_drawback_jsft2_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            if (base.IsOpenLottery(0x10))
            {
                this.car168DataTable = CallBLL.cz_drawback_car168_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            if (base.IsOpenLottery(0x11))
            {
                this.ssc168DataTable = CallBLL.cz_drawback_ssc168_bll.GetDrawbackList(this.userName, "4,5,6,7,8,9,10,11,12,13,14,15").Tables[0];
            }
            if (base.IsOpenLottery(0x12))
            {
                this.vrcarDataTable = CallBLL.cz_drawback_vrcar_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            if (base.IsOpenLottery(0x13))
            {
                this.vrsscDataTable = CallBLL.cz_drawback_vrssc_bll.GetDrawbackList(this.userName, "4,5,6,7,8,9,10,11,12,13,14,15").Tables[0];
            }
            if (base.IsOpenLottery(20))
            {
                this.xyftoaDataTable = CallBLL.cz_drawback_xyftoa_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            if (base.IsOpenLottery(0x15))
            {
                this.xyftsgDataTable = CallBLL.cz_drawback_xyftsg_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            if (base.IsOpenLottery(0x16))
            {
                this.happycarDataTable = CallBLL.cz_drawback_happycar_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
        }
        if (base.IsOpenBigLottery(1))
        {
            if (!FileCacheHelper.get_IsShowLM_B())
            {
                this.sixDataTable = CallBLL.cz_drawback_six_bll.User_GetDrawBackList(this.userName, "91060,91061,91062,91063,91064,91065").Tables[0];
            }
            else
            {
                this.sixDataTable = CallBLL.cz_drawback_six_bll.GetDrawBackList(this.userName).Tables[0];
            }
        }
    }
Exemple #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Response.Expires      = 0;
        base.Response.CacheControl = "no-cache";
        IDictionary <string, object> dictionary = new Dictionary <string, object>();

        if (!base.IsUserLoginByMobileForAjax())
        {
            dictionary.Add("islogin", "0");
            base.OutJson(JsonHandle.ObjectToJson(dictionary));
        }
        else
        {
            dictionary.Add("islogin", "1");
            string   user     = HttpContext.Current.Session["user_name"].ToString();
            cz_users _users   = CallBLL.cz_users_bll.UserLogin(user);
            string   str2     = _users.get_kc_kind().Trim();
            decimal  num      = Convert.ToDecimal(_users.get_kc_credit());
            decimal  num2     = Convert.ToDecimal(_users.get_kc_usable_credit());
            decimal  num3     = Convert.ToDecimal(_users.get_six_credit());
            decimal  num4     = Convert.ToDecimal(_users.get_six_usable_credit());
            string   str3     = num3.ToString("F1");
            string   str4     = num4.ToString("F1");
            string   kCProfit = base.GetKCProfit();
            if (_users.get_kc_iscash().Equals(int.Parse("1")))
            {
                dictionary.Add("t_iscash", "1");
            }
            else
            {
                dictionary.Add("t_iscash", "0");
            }
            dictionary.Add("t_credit", num2.ToString("F1"));
            dictionary.Add("t_amt", double.Parse(kCProfit).ToString("F1"));
            if (_users.get_six_iscash().Equals(int.Parse("1")))
            {
                dictionary.Add("t_iscash_six", "1");
            }
            else
            {
                dictionary.Add("t_iscash_six", "0");
            }
            dictionary.Add("t_credit_six", str3);
            dictionary.Add("t_amt_six", str4);
            if (FileCacheHelper.get_RedisStatOnline().Equals(1))
            {
                base.CheckIsOut(user);
                base.stat_online_redis(user, _users.get_u_type());
            }
            else if (FileCacheHelper.get_RedisStatOnline().Equals(2))
            {
                base.CheckIsOutStack(user);
                base.stat_online_redisStack(user, _users.get_u_type());
            }
            else
            {
                MemberPageBase.stat_online(user, "hy");
            }
            base.OutJson(JsonHandle.ObjectToJson(dictionary));
        }
    }
Exemple #5
0
        private void addRecharge(ref string strResult)
        {
            bool flag;
            bool flag2;

            base.checkLoginByHandler(0);
            new ReturnResult();
            new Dictionary <string, object>();
            new List <object>();
            string str = this.Session["user_name"].ToString();

            this.userModel = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;
            if ((!this.userModel.get_u_type().Trim().Equals("zj") && !this.userModel.get_u_type().Trim().Equals("fgs")) && (!this.userModel.get_u_type().Trim().Equals("gd") && !this.userModel.get_u_type().Trim().Equals("zd")))
            {
                base.Response.End();
            }
            base.checkCloneRight();
            this.lotteryDT = base.GetLotteryList();
            base.Permission_Aspx_ZJ_Ajax(this.userModel, "po_2_1");
            base.Permission_Aspx_DL_Ajax(this.userModel, "po_6_1");
            string   s               = LSRequest.qq("masterid");
            string   str3            = LSRequest.qq("uid");
            string   str4            = LSRequest.qq("czje");
            cz_users userInfoByUID   = null;
            cz_users userInfoByUName = null;

            userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(str3);
            this.Hy_SubmitCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
            if (!base.IsUpperLowerLevels(userInfoByUID.get_u_name(), this.userModel.get_u_type(), this.userModel.get_u_name()))
            {
                this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                base.Response.End();
            }
            cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(userInfoByUID.get_u_name());

            base.En_User_Lock(rateKCByUserName.get_fgs_name());
            userInfoByUName = CallBLL.cz_users_bll.GetUserInfoByUName(userInfoByUID.get_sup_name());
            base.OpenLotteryMaster(out flag, out flag2);
            if (flag && userInfoByUID.get_six_iscash().Equals(int.Parse("1")))
            {
                int num3 = 1;
                if (s.Equals(num3.ToString()))
                {
                    if (!userInfoByUID.get_six_iscash().Equals(int.Parse("1")))
                    {
                        base.Response.End();
                    }
                    if (!Utils.IsDouble(str4))
                    {
                        this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("(⑥)充值格式不正確!");
                        base.Response.End();
                    }
                    if (double.Parse(str4) < 1.0)
                    {
                        this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("(⑥)充值金額不能小於1!");
                        base.Response.End();
                    }
                    if (!userInfoByUName.get_u_type().Equals("zj"))
                    {
                        decimal num4 = decimal.Parse(str4);
                        if (num4 > userInfoByUName.get_six_usable_credit())
                        {
                            this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                            base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                            base.noRightOptMsg("(⑥)充值金額不能大於 “上級可用餘額” !!");
                            base.Response.End();
                        }
                    }
                    string         random = Utils.GetRandom();
                    cz_credit_flow _flow  = new cz_credit_flow();
                    _flow.set_master_id(new int?(int.Parse(s)));
                    _flow.set_credit_old(userInfoByUID.get_six_usable_credit());
                    decimal?nullable4 = userInfoByUID.get_six_usable_credit();
                    decimal num5      = decimal.Parse(str4);
                    _flow.set_credit_new(nullable4.HasValue ? new decimal?(nullable4.GetValueOrDefault() + num5) : null);
                    _flow.set_credit_change(new decimal?(decimal.Parse(str4)));
                    _flow.set_u_name(userInfoByUID.get_u_name());
                    _flow.set_iscash(new int?(int.Parse("1")));
                    _flow.set_operator_name(this.userModel.get_u_name());
                    if (this.userModel.get_users_child_session() != null)
                    {
                        _flow.set_operator_child_name(this.userModel.get_users_child_session().get_u_name());
                    }
                    _flow.set_operator_time(DateTime.Now);
                    _flow.set_flag(0);
                    _flow.set_checkcode(random);
                    _flow.set_isphone(1);
                    _flow.set_ip(LSRequest.GetIP());
                    cz_credit_flow _flow2 = new cz_credit_flow();
                    _flow2.set_master_id(new int?(int.Parse(s)));
                    _flow2.set_credit_old(userInfoByUName.get_six_usable_credit());
                    decimal?nullable6 = userInfoByUName.get_six_usable_credit();
                    decimal num6      = decimal.Parse(str4);
                    _flow2.set_credit_new(nullable6.HasValue ? new decimal?(nullable6.GetValueOrDefault() - num6) : null);
                    _flow2.set_credit_change(new decimal?(-decimal.Parse(str4)));
                    _flow2.set_u_name(userInfoByUName.get_u_name());
                    _flow2.set_iscash(new int?(int.Parse("1")));
                    _flow2.set_operator_name(this.userModel.get_u_name());
                    if (this.userModel.get_users_child_session() != null)
                    {
                        _flow2.set_operator_child_name(this.userModel.get_users_child_session().get_u_name());
                    }
                    _flow2.set_operator_time(DateTime.Now);
                    _flow2.set_flag(1);
                    _flow2.set_checkcode(random);
                    _flow2.set_note(userInfoByUID.get_u_name());
                    _flow2.set_isphone(1);
                    _flow2.set_ip(LSRequest.GetIP());
                    if (CallBLL.cz_users_bll.UserRecharge(userInfoByUName.get_u_type(), userInfoByUName.get_u_id(), userInfoByUID.get_u_id(), double.Parse(str4), _flow, _flow2) > 0)
                    {
                        this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.successOptMsg("(⑥)充值成功!");
                        base.Response.End();
                        return;
                    }
                    this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.noRightOptMsg("(⑥)充值失敗!");
                    base.Response.End();
                    return;
                }
            }
            if (flag2 && userInfoByUID.get_kc_iscash().Equals(int.Parse("1")))
            {
                int num7 = 2;
                if (s.Equals(num7.ToString()))
                {
                    if (!userInfoByUID.get_kc_iscash().Equals(int.Parse("1")))
                    {
                        base.Response.End();
                    }
                    if (!Utils.IsDouble(str4))
                    {
                        this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("(⑥)充值格式不正確!");
                        base.Response.End();
                    }
                    if (double.Parse(str4) < 1.0)
                    {
                        this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("(快)充值金額不能小於!");
                        base.Response.End();
                    }
                    if (!userInfoByUName.get_u_type().Equals("zj"))
                    {
                        decimal num8 = decimal.Parse(str4);
                        if (num8 > userInfoByUName.get_kc_usable_credit())
                        {
                            this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                            base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                            base.noRightOptMsg("(快)充值金額不能大於 “上級可用餘額” !");
                            base.Response.End();
                        }
                    }
                    string         str6   = Utils.GetRandom();
                    cz_credit_flow _flow3 = new cz_credit_flow();
                    _flow3.set_master_id(new int?(int.Parse(s)));
                    _flow3.set_credit_old(userInfoByUID.get_kc_usable_credit());
                    decimal?nullable11 = userInfoByUID.get_kc_usable_credit();
                    decimal num9       = decimal.Parse(str4);
                    _flow3.set_credit_new(nullable11.HasValue ? new decimal?(nullable11.GetValueOrDefault() + num9) : null);
                    _flow3.set_credit_change(new decimal?(decimal.Parse(str4)));
                    _flow3.set_u_name(userInfoByUID.get_u_name());
                    _flow3.set_iscash(new int?(int.Parse("1")));
                    _flow3.set_operator_name(this.userModel.get_u_name());
                    if (this.userModel.get_users_child_session() != null)
                    {
                        _flow3.set_operator_child_name(this.userModel.get_users_child_session().get_u_name());
                    }
                    _flow3.set_operator_time(DateTime.Now);
                    _flow3.set_flag(0);
                    _flow3.set_checkcode(str6);
                    _flow3.set_isphone(1);
                    _flow3.set_ip(LSRequest.GetIP());
                    cz_credit_flow _flow4 = new cz_credit_flow();
                    _flow4.set_master_id(new int?(int.Parse(s)));
                    _flow4.set_credit_old(userInfoByUName.get_kc_usable_credit());
                    decimal?nullable13 = userInfoByUName.get_kc_usable_credit();
                    decimal num10      = decimal.Parse(str4);
                    _flow4.set_credit_new(nullable13.HasValue ? new decimal?(nullable13.GetValueOrDefault() - num10) : null);
                    _flow4.set_credit_change(new decimal?(-decimal.Parse(str4)));
                    _flow4.set_u_name(userInfoByUName.get_u_name());
                    _flow4.set_iscash(new int?(int.Parse("1")));
                    _flow4.set_operator_name(this.userModel.get_u_name());
                    if (this.userModel.get_users_child_session() != null)
                    {
                        _flow4.set_operator_child_name(this.userModel.get_users_child_session().get_u_name());
                    }
                    _flow4.set_operator_time(DateTime.Now);
                    _flow4.set_flag(1);
                    _flow4.set_checkcode(str6);
                    _flow4.set_note(userInfoByUID.get_u_name());
                    _flow4.set_isphone(1);
                    _flow4.set_ip(LSRequest.GetIP());
                    if (CallBLL.cz_users_bll.UserRecharge(userInfoByUName.get_u_type(), userInfoByUName.get_u_id(), userInfoByUID.get_u_id(), double.Parse(str4), _flow3, _flow4) > 0)
                    {
                        this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.successOptMsg("(快)充值成功!");
                        base.Response.End();
                        return;
                    }
                    this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.noRightOptMsg("(快)充值失敗!");
                    base.Response.End();
                    return;
                }
            }
            this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
            base.Un_User_Lock(rateKCByUserName.get_fgs_name());
            base.noRightOptMsg("參數錯誤!");
            base.Response.End();
        }
Exemple #6
0
        private void AddUser()
        {
            string str  = LSRequest.qq("userName").ToLower().Trim();
            string str2 = "0";
            string str3 = LSRequest.qq("userPassword");
            string str4 = LSRequest.qq("userNicker");

            this.upuname = this.u_name;
            string str5 = LSRequest.qq("userCredit_six");
            string str6 = LSRequest.qq("userKind_six");

            if (!this.six_kind_d.Equals("0"))
            {
                str6 = this.six_kind_d;
            }
            else if (string.IsNullOrEmpty(str6) || str6.Equals("0"))
            {
                str6 = "A";
            }
            string str7 = LSRequest.qq("sltDrawback_six");

            if (string.IsNullOrEmpty(str5))
            {
                str5 = "0";
            }
            if (string.IsNullOrEmpty(str7))
            {
                str7 = "0";
            }
            switch (str7)
            {
            case "0":
                str7 = "0";
                break;

            case "1":
                str7 = "0.1";
                break;

            case "2":
                str7 = "0.2";
                break;

            case "3":
                str7 = "0.3";
                break;

            case "4":
                str7 = "0.4";
                break;

            case "5":
                str7 = "NO";
                break;

            case "auto":
                break;

            default:
                base.Response.End();
                break;
            }
            if (str7.Equals("auto"))
            {
                string s = LSRequest.qq("sltDrawbackAuto_six");
                try
                {
                    if (double.Parse(s) < 0.0)
                    {
                        base.Response.Write(base.ShowDialogBox("⑥合彩: 退水設定 不能小於0!", null, 400));
                        base.Response.End();
                    }
                }
                catch
                {
                    base.Response.Write(base.ShowDialogBox("⑥合彩: 退水設定 輸入錯誤!", null, 400));
                    base.Response.End();
                }
                str7 = s;
            }
            string str9  = LSRequest.qq("userCredit_kc");
            string str10 = LSRequest.qq("userKind_kc");

            if (!this.kc_kind_d.Equals("0"))
            {
                str10 = this.kc_kind_d;
            }
            else if (string.IsNullOrEmpty(str10) || str10.Equals("0"))
            {
                str10 = "A";
            }
            string str11 = LSRequest.qq("sltDrawback_kc");

            if (string.IsNullOrEmpty(str9))
            {
                str9 = "0";
            }
            if (string.IsNullOrEmpty(str11))
            {
                str11 = "0";
            }
            switch (str11)
            {
            case "0":
                str11 = "0";
                break;

            case "1":
                str11 = "0.1";
                break;

            case "2":
                str11 = "0.2";
                break;

            case "3":
                str11 = "0.3";
                break;

            case "4":
                str11 = "0.4";
                break;

            case "5":
                str11 = "NO";
                break;

            case "auto":
                break;

            default:
                base.Response.End();
                break;
            }
            if (str11.Equals("auto"))
            {
                string str12 = LSRequest.qq("sltDrawbackAuto_kc");
                try
                {
                    if (double.Parse(str12) < 0.0)
                    {
                        base.Response.Write(base.ShowDialogBox("快彩: 退水設定 不能小於0!", null, 400));
                        base.Response.End();
                    }
                }
                catch
                {
                    base.Response.Write(base.ShowDialogBox("快彩: 退水設定 輸入錯誤!", null, 400));
                    base.Response.End();
                }
                str11 = str12;
            }
            string message = "";

            if (!base.ValidParamByUserAdd("hy", ref message, null, this.lottrty_six, this.lottrty_kc))
            {
                base.Response.Write(base.GetAlert(message));
                base.Response.End();
            }
            if (!Regexlib.IsValidPassword(str3.Trim(), base.get_GetPasswordLU()))
            {
                if (base.get_GetPasswordLU().Equals("1"))
                {
                    base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含大寫字母、小寫字母和数字!", null, 400));
                }
                else
                {
                    base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含字母、和数字!", null, 400));
                }
                base.Response.End();
            }
            if (!string.IsNullOrEmpty(this.lottrty_six))
            {
                if ((!str6.ToUpper().Equals("A") && !str6.ToUpper().Equals("B")) && !str6.ToUpper().Equals("C"))
                {
                    base.Response.End();
                }
                if (string.IsNullOrEmpty(str7))
                {
                    base.Response.End();
                }
            }
            if (!string.IsNullOrEmpty(this.lottrty_kc))
            {
                if ((!str10.ToUpper().Equals("A") && !str10.ToUpper().Equals("B")) && !str10.ToUpper().Equals("C"))
                {
                    base.Response.End();
                }
                if (string.IsNullOrEmpty(str11))
                {
                    base.Response.End();
                }
            }
            cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(this.upuname);

            base.En_User_Lock(rateKCByUserName.get_fgs_name());
            if (CallBLL.cz_users_bll.GetLimitHy_DL(this.upuname).Equals(-1))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                if (this.userModel.get_u_type().Equals("dl"))
                {
                    base.Response.Write(base.ShowDialogBox("下綫人數限製已經滿員,請聯繫上級!", null, 400));
                }
                else
                {
                    base.Response.Write(base.ShowDialogBox("代理【" + this.upuname + "】下綫人數限製已經滿員!", null, 400));
                }
                base.Response.End();
            }
            if (Convert.ToDouble(str5) > Convert.ToDouble(this.six_usable_credit_d))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("⑥合彩:‘信用額度’已超過‘上級可用餘額’,請修改!", null, 400));
                base.Response.End();
            }
            string str14 = LSRequest.qq("userRate_six");

            if (string.IsNullOrEmpty(str14))
            {
                str14 = "0";
            }
            if (Convert.ToDouble(str14) > Convert.ToDouble(this.six_rate_d))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("⑥合彩: 代理占成 不可高於" + this.six_rate_d + ",請修改!", null, 400));
                base.Response.End();
            }
            if (Convert.ToDouble(str9) > Convert.ToDouble(this.kc_usable_credit_d))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("快彩:‘信用額度’已超過‘上級可用餘額’,請修改!", null, 400));
                base.Response.End();
            }
            string str15 = LSRequest.qq("userRate_kc");

            if (string.IsNullOrEmpty(str15))
            {
                str15 = "0";
            }
            if (Convert.ToDouble(str15) > Convert.ToDouble(this.kc_rate_d))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("快彩: 總代占成 不可高於" + this.kc_rate_d + ",請修改!", null, 400));
                base.Response.End();
            }
            int     num4 = 0;
            decimal num5 = 0M;
            decimal num6 = 0M;

            if (!string.IsNullOrEmpty(this.lottrty_six))
            {
                num4 = Convert.ToInt32(str14);
                num5 = Convert.ToDecimal(str5);
                num6 = Convert.ToDecimal(str5);
            }
            int     num7 = 0;
            decimal num8 = 0M;
            decimal num9 = 0M;

            if (!string.IsNullOrEmpty(this.lottrty_kc))
            {
                num7 = Convert.ToInt32(str15);
                num8 = Convert.ToDecimal(str9);
                num9 = Convert.ToDecimal(str9);
            }
            cz_users model = new cz_users();

            model.set_u_id(Guid.NewGuid().ToString().ToUpper());
            model.set_u_name(str);
            string ramSalt = Utils.GetRamSalt(6);

            model.set_u_psw(DESEncrypt.EncryptString(str3, ramSalt));
            model.set_salt(ramSalt);
            model.set_u_nicker(str4);
            model.set_u_skin(base.GetUserSkin("hy"));
            model.set_sup_name(this.upuname);
            model.set_u_type("hy");
            model.set_su_type("dl");
            model.set_add_date(new DateTime?(DateTime.Now));
            model.set_six_rate(new int?(num4));
            model.set_six_credit(new decimal?(num5));
            model.set_six_usable_credit(new decimal?(num6));
            model.set_six_kind(str6);
            model.set_a_state(new int?(Convert.ToInt32(str2)));
            model.set_allow_opt(1);
            model.set_is_changed(0);
            model.set_kc_rate(new int?(num7));
            model.set_kc_credit(new decimal?(num8));
            model.set_kc_usable_credit(new decimal?(num9));
            model.set_kc_kind(str10);
            model.set_kc_crash_payment(0);
            if (!string.IsNullOrEmpty(this.kc_iscash ?? ""))
            {
                model.set_kc_iscash(new int?(int.Parse(this.kc_iscash)));
            }
            if (!string.IsNullOrEmpty(this.six_iscash ?? ""))
            {
                model.set_six_iscash(new int?(int.Parse(this.six_iscash)));
            }
            cz_rate_kc _kc2 = new cz_rate_kc();

            _kc2.set_u_name(str);
            _kc2.set_u_type("hy");
            _kc2.set_dl_name(this.kc_dl_name);
            _kc2.set_zd_name(this.kc_zd_name);
            _kc2.set_gd_name(this.kc_gd_name);
            _kc2.set_fgs_name(this.kc_fgs_name);
            _kc2.set_dl_rate(new decimal?(num7));
            _kc2.set_zd_rate(new decimal?(Convert.ToDecimal(this.kc_zd_rate)));
            _kc2.set_gd_rate(new decimal?(Convert.ToDecimal(this.kc_gd_rate)));
            _kc2.set_fgs_rate(new decimal?(Convert.ToDecimal(this.kc_fgs_rate)));
            _kc2.set_zj_rate(new decimal?(Convert.ToDecimal(this.kc_zj_rate)));
            cz_rate_six _six = new cz_rate_six();

            _six.set_u_name(str);
            _six.set_u_type("hy");
            _six.set_dl_name(this.six_dl_name);
            _six.set_zd_name(this.six_zd_name);
            _six.set_gd_name(this.six_gd_name);
            _six.set_fgs_name(this.six_fgs_name);
            _six.set_dl_rate(new decimal?(num4));
            _six.set_zd_rate(new decimal?(Convert.ToDecimal(this.six_zd_rate)));
            _six.set_gd_rate(new decimal?(Convert.ToDecimal(this.six_gd_rate)));
            _six.set_fgs_rate(new decimal?(Convert.ToDecimal(this.six_fgs_rate)));
            _six.set_zj_rate(new decimal?(Convert.ToDecimal(this.six_zj_rate)));
            string str17 = "";

            if (CallBLL.cz_users_bll.AddUserInfoHY(model, _kc2, _six, ref str17, str7.ToUpper(), str11.ToUpper()))
            {
                int?nullable = model.get_six_iscash();
                int num13    = int.Parse("1");
                if ((nullable.GetValueOrDefault() == num13) && nullable.HasValue)
                {
                    cz_users _users2 = new cz_users();
                    _users2.set_u_name(model.get_u_name());
                    _users2.set_six_usable_credit(0);
                    cz_users _users3 = new cz_users();
                    _users3.set_u_name(model.get_sup_name());
                    _users3.set_six_usable_credit(new decimal?(decimal.Parse(this.six_usable_credit_d)));
                    int num14 = 1;
                    if (base.IsMasterLotteryExist(num14.ToString()))
                    {
                        base.UserRecharge_six(_users2, _users3, str5);
                    }
                }
                int?nullable2 = model.get_kc_iscash();
                int num15     = int.Parse("1");
                if ((nullable2.GetValueOrDefault() == num15) && nullable2.HasValue)
                {
                    cz_users _users4 = new cz_users();
                    _users4.set_u_name(model.get_u_name());
                    _users4.set_kc_usable_credit(0);
                    cz_users _users5 = new cz_users();
                    _users5.set_u_name(model.get_sup_name());
                    _users5.set_kc_usable_credit(new decimal?(decimal.Parse(this.kc_usable_credit_d)));
                    int num16 = 2;
                    if (base.IsMasterLotteryExist(num16.ToString()))
                    {
                        base.UserRecharge_kc(_users4, _users5, str9);
                    }
                }
                int num10 = 2;
                if (this.lottrty_six == "")
                {
                    num10 = 1;
                }
                else if (this.lottrty_kc == "")
                {
                    num10 = 0;
                }
                else if ((this.lottrty_kc != "") && (this.lottrty_six != ""))
                {
                    num10 = 2;
                }
                base.user_add_hy_log(model, false, num10, str7, str11);
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                string url = "/Account/drawback.aspx?uid=" + str17 + "&isadd=1";
                base.Response.Write(base.ShowDialogBox("添加會員成功!", url, 0));
                base.Response.End();
            }
            else
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("添加會員失敗!", base.UserReturnBackUrl, 400));
                base.Response.End();
            }
        }
Exemple #7
0
        private void AddUser()
        {
            string str  = LSRequest.qq("userName").ToLower().Trim();
            string str2 = "0";
            string str3 = LSRequest.qq("userPassword");
            string str4 = LSRequest.qq("userNicker");

            this.upuname = this.u_name;
            string str5 = LSRequest.qq("userCredit_six");
            string str6 = LSRequest.qq("allowmaxrate_six");
            string str7 = LSRequest.qq("lowmaxrate_six");
            string str8 = LSRequest.qq("userAllowSale_six");
            string str9 = LSRequest.qq("userKind_six");

            if (!this.six_kind_d.Equals("0"))
            {
                str9 = this.six_kind_d;
            }
            if (string.IsNullOrEmpty(str5))
            {
                str5 = "0";
            }
            if (string.IsNullOrEmpty(str9))
            {
                str9 = "0";
            }
            string str10 = LSRequest.qq("userCredit_kc");
            string str11 = LSRequest.qq("allowmaxrate_kc");
            string str12 = LSRequest.qq("lowmaxrate_kc");
            string str13 = LSRequest.qq("userAllowSale_kc");
            string str14 = LSRequest.qq("userKind_kc");

            if (!this.kc_kind_d.Equals("0"))
            {
                str14 = this.kc_kind_d;
            }
            if (string.IsNullOrEmpty(str10))
            {
                str10 = "0";
            }
            if (string.IsNullOrEmpty(str14))
            {
                str14 = "0";
            }
            string message = "";

            if (!base.ValidParamByUserAdd("zd", ref message, null, this.lottrty_six, this.lottrty_kc))
            {
                base.Response.Write(base.ShowDialogBox(message, null, 400));
                base.Response.End();
            }
            if (!Regexlib.IsValidPassword(str3.Trim(), base.get_GetPasswordLU()))
            {
                if (base.get_GetPasswordLU().Equals("1"))
                {
                    base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含大寫字母、小寫字母和数字!", null, 400));
                }
                else
                {
                    base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含字母、和数字!", null, 400));
                }
                base.Response.End();
            }
            if (!string.IsNullOrEmpty(this.lottrty_six))
            {
                if ((!str9.ToUpper().Equals("A") && !str9.ToUpper().Equals("B")) && (!str9.ToUpper().Equals("C") && !str9.ToUpper().Equals("0")))
                {
                    base.Response.End();
                }
                if (!str8.ToUpper().Equals("0") && !str8.ToUpper().Equals("1"))
                {
                    base.Response.End();
                }
                if ((this.six_allow_sale_d == "0") && (str8 == "1"))
                {
                    base.Response.Write("<script>alert(\"(⑥合彩)補貨功能选择错误!!\");</script>");
                    base.Response.End();
                }
            }
            if (!string.IsNullOrEmpty(this.lottrty_kc))
            {
                if ((!str14.ToUpper().Equals("A") && !str14.ToUpper().Equals("B")) && (!str14.ToUpper().Equals("C") && !str14.ToUpper().Equals("0")))
                {
                    base.Response.End();
                }
                if (!str13.ToUpper().Equals("0") && !str13.ToUpper().Equals("1"))
                {
                    base.Response.End();
                }
                if ((this.kc_allow_sale_d == "0") && (str13 == "1"))
                {
                    base.Response.Write("<script>alert(\"(快彩)補貨功能选择错误!!\");</script>");
                    base.Response.End();
                }
            }
            cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(this.upuname);

            base.En_User_Lock(rateKCByUserName.get_fgs_name());
            if (Convert.ToDouble(str5) > Convert.ToDouble(this.six_usable_credit_d))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("⑥合彩:‘信用額度’已超過‘上級可用餘額’,請修改!", null, 400));
                base.Response.End();
            }
            string str16 = LSRequest.qq("userRate_six");

            if (string.IsNullOrEmpty(str16))
            {
                str16 = "0";
            }
            if (Convert.ToDouble(str16) > Convert.ToDouble(this.six_rate_d))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("⑥合彩: 股東占成 不可高於" + this.six_rate_d + ",請修改!", null, 400));
                base.Response.End();
            }
            if (str6.Equals("1"))
            {
                if (string.IsNullOrEmpty(str7))
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("⑥合彩:‘占成上限’不可為空,請修改!", null, 400));
                    base.Response.End();
                }
                try
                {
                    int.Parse(str7);
                }
                catch
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("⑥合彩: ‘占成上限’只能為數字,請重新設定!", null, 400));
                    base.Response.End();
                }
                if (Convert.ToInt32(str7) > 100)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("⑥合彩: ‘占成上限’不可高於 100%,請重新設定!", null, 400));
                    base.Response.End();
                }
                else if (Convert.ToInt32(str7) < 0)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("⑥合彩: ‘占成上限’不可低於等於 0%,請重新設定!", null, 400));
                    base.Response.End();
                }
            }
            else
            {
                str7 = "0";
            }
            if (Convert.ToDouble(str10) > Convert.ToDouble(this.kc_usable_credit_d))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("快彩:‘信用額度’已超過‘上級可用餘額’,請修改!", null, 400));
                base.Response.End();
            }
            string str17 = LSRequest.qq("userRate_kc");

            if (string.IsNullOrEmpty(str17))
            {
                str17 = "0";
            }
            if (Convert.ToDouble(str17) > Convert.ToDouble(this.kc_rate_d))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("快彩: 股東占成 不可高於" + this.kc_rate_d + ",請修改!", null, 400));
                base.Response.End();
            }
            if (str11.Equals("1"))
            {
                if (string.IsNullOrEmpty(str12))
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("快彩:‘占成上限’不可為空,請修改!", null, 400));
                    base.Response.End();
                }
                try
                {
                    int.Parse(str12);
                }
                catch
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("快彩: ‘占成上限’只能為數字,請重新設定!", null, 400));
                    base.Response.End();
                }
                if (Convert.ToInt32(str12) > 100)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("快彩: ‘占成上限’不可高於 100%,請重新設定!", null, 400));
                    base.Response.End();
                }
                else if (Convert.ToInt32(str12) < 0)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("快彩: ‘占成上限’不可低於等於 0%,請重新設定!", null, 400));
                    base.Response.End();
                }
            }
            else
            {
                str12 = "0";
            }
            int     num  = 0;
            decimal num2 = 0M;
            decimal num3 = 0M;

            if (!string.IsNullOrEmpty(this.lottrty_six))
            {
                num  = Convert.ToInt32(str16);
                num2 = Convert.ToDecimal(str5);
                num3 = Convert.ToDecimal(str5);
            }
            int     num4 = 0;
            decimal num5 = 0M;
            decimal num6 = 0M;

            if (!string.IsNullOrEmpty(this.lottrty_kc))
            {
                num4 = Convert.ToInt32(str17);
                num5 = Convert.ToDecimal(str10);
                num6 = Convert.ToDecimal(str10);
            }
            cz_users model = new cz_users();

            model.set_u_id(Guid.NewGuid().ToString().ToUpper());
            model.set_u_name(str);
            string ramSalt = Utils.GetRamSalt(6);

            model.set_u_psw(DESEncrypt.EncryptString(str3, ramSalt));
            model.set_salt(ramSalt);
            model.set_u_nicker(str4);
            model.set_u_skin(base.GetUserSkin("agent"));
            model.set_sup_name(this.upuname);
            model.set_u_type("zd");
            model.set_su_type("gd");
            model.set_add_date(new DateTime?(DateTime.Now));
            model.set_six_rate(new int?(num));
            model.set_six_credit(new decimal?(num2));
            model.set_six_usable_credit(new decimal?(num3));
            model.set_six_kind(str9);
            model.set_a_state(new int?(Convert.ToInt32(str2)));
            model.set_allow_sale(new int?(Convert.ToInt32(str8)));
            model.set_six_allow_maxrate(new int?(Convert.ToInt32(str6)));
            model.set_six_low_maxrate(new int?(Convert.ToInt32(str7)));
            model.set_allow_opt(1);
            model.set_is_changed(0);
            model.set_kc_rate(new int?(num4));
            model.set_kc_credit(new decimal?(num5));
            model.set_kc_usable_credit(new decimal?(num6));
            model.set_kc_kind(str14);
            model.set_kc_allow_sale(new int?(Convert.ToInt32(str13)));
            model.set_kc_allow_maxrate(new int?(Convert.ToInt32(str11)));
            model.set_kc_low_maxrate(new int?(Convert.ToInt32(str12)));
            model.set_kc_crash_payment(0);
            model.set_kc_iscash(new int?(Convert.ToInt32(this.kc_iscash)));
            model.set_six_iscash(new int?(Convert.ToInt32(this.six_iscash)));
            cz_rate_kc _kc2 = new cz_rate_kc();

            _kc2.set_u_name(str);
            _kc2.set_u_type("zd");
            _kc2.set_dl_name("");
            _kc2.set_zd_name(str);
            _kc2.set_gd_name(this.kc_gd_name);
            _kc2.set_fgs_name(this.kc_fgs_name);
            _kc2.set_dl_rate(0);
            _kc2.set_zd_rate(0);
            _kc2.set_gd_rate(new decimal?(num4));
            _kc2.set_fgs_rate(new decimal?(Convert.ToDecimal(this.kc_fgs_rate)));
            _kc2.set_zj_rate(new decimal?(Convert.ToDecimal(this.kc_zj_rate)));
            cz_rate_six _six = new cz_rate_six();

            _six.set_u_name(str);
            _six.set_u_type("zd");
            _six.set_dl_name("");
            _six.set_zd_name(str);
            _six.set_gd_name(this.six_gd_name);
            _six.set_fgs_name(this.six_fgs_name);
            _six.set_dl_rate(0);
            _six.set_zd_rate(0);
            _six.set_gd_rate(new decimal?(num));
            _six.set_fgs_rate(new decimal?(Convert.ToDecimal(this.six_fgs_rate)));
            _six.set_zj_rate(new decimal?(Convert.ToDecimal(this.six_zj_rate)));
            string str19 = "";

            if (CallBLL.cz_users_bll.AddUserInfo(model, _kc2, _six, ref str19))
            {
                int?nullable = model.get_six_iscash();
                int num8     = int.Parse("1");
                if ((nullable.GetValueOrDefault() == num8) && nullable.HasValue)
                {
                    cz_users _users2 = new cz_users();
                    _users2.set_u_name(model.get_u_name());
                    _users2.set_six_usable_credit(0);
                    cz_users _users3 = new cz_users();
                    _users3.set_u_name(model.get_sup_name());
                    _users3.set_six_usable_credit(new decimal?(decimal.Parse(this.six_usable_credit_d)));
                    int num9 = 1;
                    if (base.IsMasterLotteryExist(num9.ToString()))
                    {
                        base.UserRecharge_six(_users2, _users3, str5);
                    }
                }
                int?nullable2 = model.get_kc_iscash();
                int num10     = int.Parse("1");
                if ((nullable2.GetValueOrDefault() == num10) && nullable2.HasValue)
                {
                    cz_users _users4 = new cz_users();
                    _users4.set_u_name(model.get_u_name());
                    _users4.set_kc_usable_credit(0);
                    cz_users _users5 = new cz_users();
                    _users5.set_u_name(model.get_sup_name());
                    _users5.set_kc_usable_credit(new decimal?(decimal.Parse(this.kc_usable_credit_d)));
                    int num11 = 2;
                    if (base.IsMasterLotteryExist(num11.ToString()))
                    {
                        base.UserRecharge_kc(_users4, _users5, str10);
                    }
                }
                int num7 = 2;
                if (this.lottrty_six == "")
                {
                    num7 = 1;
                }
                else if (this.lottrty_kc == "")
                {
                    num7 = 0;
                }
                else if ((this.lottrty_kc != "") && (this.lottrty_six != ""))
                {
                    num7 = 2;
                }
                base.user_add_agent_log(model, num7);
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                string url = "/Account/drawback.aspx?uid=" + str19 + "&isadd=1";
                base.Response.Write(base.ShowDialogBox("添加總代理成功!", url, 0));
                base.Response.End();
            }
            else
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("添加總代理失敗!", base.UserReturnBackUrl, 400));
                base.Response.End();
            }
        }
Exemple #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str;

            this.lotteryID = base.q("id");
            this.userName  = HttpContext.Current.Session["user_name"].ToString();
            cz_users _users = CallBLL.cz_users_bll.UserLogin(this.userName);

            this.six_kind          = _users.get_six_kind().Trim();
            this.six_credit        = Convert.ToDecimal(_users.get_six_credit());
            this.six_usable_credit = Convert.ToDecimal(_users.get_six_usable_credit());
            this.six_iscash        = _users.get_six_iscash().ToString();
            this.kc_kind           = _users.get_kc_kind().Trim();
            this.kc_credit         = Convert.ToDecimal(_users.get_kc_credit());
            this.kc_usable_credit  = Convert.ToDecimal(_users.get_kc_usable_credit());
            this.kc_iscash         = _users.get_kc_iscash().ToString();
            this.lotteryDT         = base.GetLotteryList();
            int num = 100;

            if (this.lotteryID == num.ToString())
            {
                if (!FileCacheHelper.get_IsShowLM_B())
                {
                    this.sixDataTable = CallBLL.cz_drawback_six_bll.User_GetDrawBackList(HttpContext.Current.Session["user_name"].ToString(), "91060,91061,91062,91063,91064,91065").Tables[0];
                }
                else
                {
                    this.sixDataTable = CallBLL.cz_drawback_six_bll.GetDrawBackList(HttpContext.Current.Session["user_name"].ToString()).Tables[0];
                }
            }
            num = 0;
            if (this.lotteryID == num.ToString())
            {
                str = "86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,123,124,125,126,127,128,129,130,131,132,133,134,135,136";
                this.kl10DataTable = CallBLL.cz_drawback_kl10_bll.GetDrawbackByPlayId(this.userName, str).Tables[0];
            }
            num = 1;
            if (this.lotteryID == num.ToString())
            {
                this.cqscDataTable = CallBLL.cz_drawback_cqsc_bll.GetDrawbackList(this.userName, "4,5,6,7,8,9,10,11,12,13,14,15").Tables[0];
            }
            num = 2;
            if (this.lotteryID == num.ToString())
            {
                this.pk10DataTable = CallBLL.cz_drawback_pk10_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            num = 3;
            if (this.lotteryID == num.ToString())
            {
                this.xyncDataTable = CallBLL.cz_drawback_xync_bll.GetDrawbackList(this.userName, "86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,123,124,125,126,127,128,129,130,131,132,133,134,135,136").Tables[0];
            }
            num = 4;
            if (this.lotteryID == num.ToString())
            {
                this.jsk3DataTable = CallBLL.cz_drawback_jsk3_bll.GetDrawbackList(this.userName).Tables[0];
            }
            num = 5;
            if (this.lotteryID == num.ToString())
            {
                this.kl8DataTable = CallBLL.cz_drawback_kl8_bll.GetDrawbackList(this.userName).Tables[0];
            }
            num = 6;
            if (this.lotteryID == num.ToString())
            {
                this.k8scDataTable = CallBLL.cz_drawback_k8sc_bll.GetDrawbackList(this.userName, "4,5,6,7,8,9,10,11,12,13,14,15").Tables[0];
            }
            num = 7;
            if (this.lotteryID == num.ToString())
            {
                this.pcddDataTable = CallBLL.cz_drawback_pcdd_bll.GetDrawbackList(this.userName, "71009,71010,71011,71012").Tables[0];
            }
            num = 9;
            if (this.lotteryID == num.ToString())
            {
                this.xyft5DataTable = CallBLL.cz_drawback_xyft5_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            num = 8;
            if (this.lotteryID == num.ToString())
            {
                this.pkbjlDataTable = CallBLL.cz_drawback_pkbjl_bll.GetDrawbackList(this.userName, "81001,81002,81003,81004").Tables[0];
            }
            num = 10;
            if (this.lotteryID == num.ToString())
            {
                this.jscarDataTable = CallBLL.cz_drawback_jscar_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            num = 11;
            if (this.lotteryID == num.ToString())
            {
                this.speed5DataTable = CallBLL.cz_drawback_speed5_bll.GetDrawbackList(this.userName, "4,5,6,7,8,9,10,11,12,13,14,15").Tables[0];
            }
            num = 13;
            if (this.lotteryID == num.ToString())
            {
                this.jscqscDataTable = CallBLL.cz_drawback_jscqsc_bll.GetDrawbackList(this.userName, "4,5,6,7,8,9,10,11,12,13,14,15").Tables[0];
            }
            num = 12;
            if (this.lotteryID == num.ToString())
            {
                this.jspk10DataTable = CallBLL.cz_drawback_jspk10_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            num = 14;
            if (this.lotteryID == num.ToString())
            {
                str = "86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,123,124,125,126,127,128,129,130,131,132,133,134,135,136";
                this.jssfcDataTable = CallBLL.cz_drawback_jssfc_bll.GetDrawbackByPlayId(this.userName, str).Tables[0];
            }
            num = 15;
            if (this.lotteryID == num.ToString())
            {
                this.jsft2DataTable = CallBLL.cz_drawback_jsft2_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            num = 0x10;
            if (this.lotteryID == num.ToString())
            {
                this.car168DataTable = CallBLL.cz_drawback_car168_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            num = 0x11;
            if (this.lotteryID == num.ToString())
            {
                this.ssc168DataTable = CallBLL.cz_drawback_ssc168_bll.GetDrawbackList(this.userName, "4,5,6,7,8,9,10,11,12,13,14,15").Tables[0];
            }
            num = 0x12;
            if (this.lotteryID == num.ToString())
            {
                this.vrcarDataTable = CallBLL.cz_drawback_vrcar_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            num = 0x13;
            if (this.lotteryID == num.ToString())
            {
                this.vrsscDataTable = CallBLL.cz_drawback_vrssc_bll.GetDrawbackList(this.userName, "4,5,6,7,8,9,10,11,12,13,14,15").Tables[0];
            }
            num = 20;
            if (this.lotteryID == num.ToString())
            {
                this.xyftoaDataTable = CallBLL.cz_drawback_xyftoa_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            num = 0x15;
            if (this.lotteryID == num.ToString())
            {
                this.xyftsgDataTable = CallBLL.cz_drawback_xyftsg_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
            num = 0x16;
            if (this.lotteryID == num.ToString())
            {
                this.happycarDataTable = CallBLL.cz_drawback_happycar_bll.GetDrawbackList(this.userName, "1,2,3,4,36,37,38").Tables[0];
            }
        }
Exemple #9
0
        private void addWithdraw(ref string strResult)
        {
            bool flag;
            bool flag2;

            base.checkLoginByHandler(0);
            new ReturnResult();
            new Dictionary <string, object>();
            new List <object>();
            string str = this.Session["user_name"].ToString();

            this.userModel = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;
            if ((!this.userModel.get_u_type().Trim().Equals("zj") && !this.userModel.get_u_type().Trim().Equals("fgs")) && (!this.userModel.get_u_type().Trim().Equals("gd") && !this.userModel.get_u_type().Trim().Equals("zd")))
            {
                base.Response.End();
            }
            base.checkCloneRight();
            this.lotteryDT = base.GetLotteryList();
            base.Permission_Aspx_ZJ_Ajax(this.userModel, "po_2_1");
            base.Permission_Aspx_DL_Ajax(this.userModel, "po_6_1");
            string   s               = LSRequest.qq("masterid");
            string   str3            = LSRequest.qq("uid");
            string   str4            = LSRequest.qq("txje");
            cz_users userInfoByUID   = null;
            cz_users userInfoByUName = null;

            userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(str3);
            this.Hy_SubmitCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
            if (!base.IsUpperLowerLevels(userInfoByUID.get_u_name(), this.userModel.get_u_type(), this.userModel.get_u_name()))
            {
                this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                base.Response.End();
            }
            cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(userInfoByUID.get_u_name());

            base.En_User_Lock(rateKCByUserName.get_fgs_name());
            userInfoByUName = CallBLL.cz_users_bll.GetUserInfoByUName(userInfoByUID.get_sup_name());
            base.OpenLotteryMaster(out flag, out flag2);
            if (flag && userInfoByUID.get_six_iscash().Equals(int.Parse("1")))
            {
                int num3 = 1;
                if (s.Equals(num3.ToString()))
                {
                    if (!userInfoByUID.get_six_iscash().Equals(int.Parse("1")))
                    {
                        base.Response.End();
                    }
                    if (!Utils.IsDouble(str4))
                    {
                        this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("(⑥)提現格式不正確!");
                        base.Response.End();
                    }
                    if (double.Parse(str4) < 1.0)
                    {
                        this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("(⑥)提現金額不能小於1!");
                        base.Response.End();
                    }
                    if (double.Parse(str4) > double.Parse(userInfoByUID.get_six_usable_credit().ToString()))
                    {
                        this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg(string.Format("(⑥)提現金額不能大於{0}!", Utils.GetMathRound(double.Parse(userInfoByUID.get_six_usable_credit().ToString()), null)));
                        base.Response.End();
                    }
                    if (CallBLL.cz_users_bll.UserWithdraw_six(userInfoByUID, userInfoByUName, double.Parse(str4), int.Parse(s), this.userModel.get_u_name(), (this.userModel.get_users_child_session() != null) ? this.userModel.get_users_child_session().get_u_name() : "", 1) > 0)
                    {
                        this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.successOptMsg("(⑥)提現成功!");
                        base.Response.End();
                        return;
                    }
                    this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.noRightOptMsg("(⑥)提現失敗!");
                    base.Response.End();
                    return;
                }
            }
            if (flag2 && userInfoByUID.get_kc_iscash().Equals(int.Parse("1")))
            {
                int num4 = 2;
                if (s.Equals(num4.ToString()))
                {
                    if (!userInfoByUID.get_kc_iscash().Equals(int.Parse("1")))
                    {
                        base.Response.End();
                    }
                    if (!Utils.IsDouble(str4))
                    {
                        this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("(快)提現格式不正確!");
                        base.Response.End();
                    }
                    if (double.Parse(str4) < 1.0)
                    {
                        this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("(快)提現金額不能小於1!");
                        base.Response.End();
                    }
                    if (double.Parse(str4) > double.Parse(userInfoByUID.get_kc_usable_credit().ToString()))
                    {
                        this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg(string.Format("(快)提現金額不能大於{0}!", Utils.GetMathRound(double.Parse(userInfoByUID.get_kc_usable_credit().ToString()), null)));
                        base.Response.End();
                    }
                    if (CallBLL.cz_users_bll.UserWithdraw_kc(userInfoByUID, userInfoByUName, double.Parse(str4), int.Parse(s), this.userModel.get_u_name(), (this.userModel.get_users_child_session() != null) ? this.userModel.get_users_child_session().get_u_name() : "", 1) > 0)
                    {
                        this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.successOptMsg("(快)提現成功!");
                        base.Response.End();
                        return;
                    }
                    this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.noRightOptMsg("(快)提現失敗!");
                    base.Response.End();
                    return;
                }
            }
            this.Hy_DeleteCreditLock(userInfoByUID.get_u_name(), userInfoByUID.get_u_type());
            base.Un_User_Lock(rateKCByUserName.get_fgs_name());
            base.noRightOptMsg("參數錯誤!");
            base.Response.End();
        }
Exemple #10
0
        private void AddUser()
        {
            string str  = LSRequest.qq("userName").ToLower().Trim();
            string str2 = "0";

            LSRequest.qq("userState");
            string str3 = LSRequest.qq("userPassword");
            string str4 = LSRequest.qq("userNicker");

            this.upuname = this.u_name;
            string   str5          = LSRequest.qq("sltupuser");
            cz_users userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(str5);

            this.upuname = userInfoByUID.get_u_name();
            if (!userInfoByUID.get_u_type().ToLower().Equals(this.checkredio.ToLower()))
            {
                base.Response.Redirect("../MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0");
                base.Response.End();
            }
            if (userInfoByUID.get_u_type().ToLower().Equals("dl") || userInfoByUID.get_u_type().ToLower().Equals("zj"))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            if (!string.IsNullOrEmpty(this.upuname) && !base.IsUpperLowerLevels(this.upuname, this.userModel.get_u_type(), this.userModel.get_u_name()))
            {
                base.Response.Redirect("../MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0");
                base.Response.End();
            }
            this.GetRateInfo(userInfoByUID.get_u_id(), this.checkredio);
            string str6 = LSRequest.qq("userCredit_six");
            string str7 = LSRequest.qq("userKind_six");

            if (!this.six_kind_d.Equals("0"))
            {
                str7 = this.six_kind_d;
            }
            else if (string.IsNullOrEmpty(str7) || str7.Equals("0"))
            {
                str7 = "A";
            }
            string str8 = LSRequest.qq("sltDrawback_six");

            if (string.IsNullOrEmpty(str6))
            {
                str6 = "0";
            }
            if (string.IsNullOrEmpty(str8))
            {
                str8 = "0";
            }
            switch (str8)
            {
            case "0":
                str8 = "0";
                break;

            case "1":
                str8 = "0.1";
                break;

            case "2":
                str8 = "0.2";
                break;

            case "3":
                str8 = "0.3";
                break;

            case "4":
                str8 = "0.4";
                break;

            case "5":
                str8 = "NO";
                break;

            case "auto":
                break;

            default:
                base.Response.End();
                break;
            }
            if (str8.Equals("auto"))
            {
                string s = LSRequest.qq("sltDrawbackAuto_six");
                try
                {
                    if (double.Parse(s) < 0.0)
                    {
                        base.Response.Write(base.ShowDialogBox("⑥合彩: 退水設定 不能小於0!", null, 400));
                        base.Response.End();
                    }
                }
                catch
                {
                    base.Response.Write(base.ShowDialogBox("⑥合彩: 退水設定 輸入錯誤!", null, 400));
                    base.Response.End();
                }
                str8 = s;
            }
            string str10 = LSRequest.qq("userCredit_kc");
            string str11 = LSRequest.qq("userKind_kc");

            if (!this.kc_kind_d.Equals("0"))
            {
                str11 = this.kc_kind_d;
            }
            else if (string.IsNullOrEmpty(str11) || str11.Equals("0"))
            {
                str11 = "A";
            }
            string str12 = LSRequest.qq("sltDrawback_kc");

            if (string.IsNullOrEmpty(str10))
            {
                str10 = "0";
            }
            if (string.IsNullOrEmpty(str12))
            {
                str12 = "0";
            }
            switch (str12)
            {
            case "0":
                str12 = "0";
                break;

            case "1":
                str12 = "0.1";
                break;

            case "2":
                str12 = "0.2";
                break;

            case "3":
                str12 = "0.3";
                break;

            case "4":
                str12 = "0.4";
                break;

            case "5":
                str12 = "NO";
                break;

            case "auto":
                break;

            default:
                base.Response.End();
                break;
            }
            if (str12.Equals("auto"))
            {
                string str13 = LSRequest.qq("sltDrawbackAuto_kc");
                try
                {
                    if (double.Parse(str13) < 0.0)
                    {
                        base.Response.Write(base.ShowDialogBox("快彩: 退水設定 不能小於0!", null, 400));
                        base.Response.End();
                    }
                }
                catch
                {
                    base.Response.Write(base.ShowDialogBox("快彩: 退水設定 輸入錯誤!", null, 400));
                    base.Response.End();
                }
                str12 = str13;
            }
            string message = "";

            if (!base.ValidParamByUserAdd("hydu", ref message, null, this.lottrty_six, this.lottrty_kc))
            {
                base.Response.Write(base.GetAlert(message));
                base.Response.End();
            }
            if (!Regexlib.IsValidPassword(str3.Trim(), base.get_GetPasswordLU()))
            {
                if (base.get_GetPasswordLU().Equals("1"))
                {
                    base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含大寫字母、小寫字母和数字!", null, 400));
                }
                else
                {
                    base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含字母、和数字!", null, 400));
                }
                base.Response.End();
            }
            if (!string.IsNullOrEmpty(this.lottrty_six))
            {
                if ((!str7.ToUpper().Equals("A") && !str7.ToUpper().Equals("B")) && !str7.ToUpper().Equals("C"))
                {
                    base.Response.End();
                }
                if (string.IsNullOrEmpty(str8))
                {
                    base.Response.End();
                }
            }
            if (!string.IsNullOrEmpty(this.lottrty_kc))
            {
                if ((!str11.ToUpper().Equals("A") && !str11.ToUpper().Equals("B")) && !str11.ToUpper().Equals("C"))
                {
                    base.Response.End();
                }
                if (string.IsNullOrEmpty(str12))
                {
                    base.Response.End();
                }
            }
            cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(this.upuname);

            base.En_User_Lock(rateKCByUserName.get_fgs_name());
            if (Convert.ToDouble(str6) > Convert.ToDouble(this.six_usable_credit_d))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("⑥合彩:‘信用額度’已超過‘上級可用餘額’,請修改!", null, 400));
                base.Response.End();
            }
            string str15 = LSRequest.qq("userRate_six");

            if (string.IsNullOrEmpty(str15))
            {
                str15 = "0";
            }
            if (Convert.ToDouble(str15) > Convert.ToDouble(this.six_rate_d))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("⑥合彩: " + this.utypeTxt + "占成 不可高於" + this.six_rate_d + ",請修改!", null, 400));
                base.Response.End();
            }
            if (Convert.ToDouble(str10) > Convert.ToDouble(this.kc_usable_credit_d))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("快彩:‘信用額度’已超過‘上級可用餘額’,請修改!", null, 400));
                base.Response.End();
            }
            string str16 = LSRequest.qq("userRate_kc");

            if (string.IsNullOrEmpty(str16))
            {
                str16 = "0";
            }
            if (Convert.ToDouble(str16) > Convert.ToDouble(this.kc_rate_d))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("快彩: " + this.utypeTxt + "占成 不可高於" + this.kc_rate_d + ",請修改!", null, 400));
                base.Response.End();
            }
            int     num3 = 0;
            decimal num4 = 0M;
            decimal num5 = 0M;

            if (!string.IsNullOrEmpty(this.lottrty_six))
            {
                num3 = Convert.ToInt32(str15);
                num4 = Convert.ToDecimal(str6);
                num5 = Convert.ToDecimal(str6);
            }
            int     num6 = 0;
            decimal num7 = 0M;
            decimal num8 = 0M;

            if (!string.IsNullOrEmpty(this.lottrty_kc))
            {
                num6 = Convert.ToInt32(str16);
                num7 = Convert.ToDecimal(str10);
                num8 = Convert.ToDecimal(str10);
            }
            cz_users model = new cz_users();

            model.set_u_id(Guid.NewGuid().ToString().ToUpper());
            model.set_u_name(str);
            string ramSalt = Utils.GetRamSalt(6);

            model.set_u_psw(DESEncrypt.EncryptString(str3, ramSalt));
            model.set_salt(ramSalt);
            model.set_u_nicker(str4);
            model.set_u_skin(base.GetUserSkin("hy"));
            model.set_sup_name(this.upuname);
            model.set_u_type("hy");
            model.set_su_type(this.checkredio);
            model.set_add_date(new DateTime?(DateTime.Now));
            model.set_six_rate(new int?(num3));
            model.set_six_credit(new decimal?(num4));
            model.set_six_usable_credit(new decimal?(num5));
            model.set_six_kind(str7);
            model.set_kc_rate(new int?(num6));
            model.set_kc_credit(new decimal?(num7));
            model.set_kc_usable_credit(new decimal?(num8));
            model.set_kc_kind(str11);
            model.set_kc_crash_payment(0);
            model.set_a_state(new int?(Convert.ToInt32(str2)));
            model.set_allow_opt(1);
            model.set_is_changed(0);
            if (!string.IsNullOrEmpty(this.kc_iscash ?? ""))
            {
                model.set_kc_iscash(new int?(int.Parse(this.kc_iscash)));
            }
            if (!string.IsNullOrEmpty(this.six_iscash ?? ""))
            {
                model.set_six_iscash(new int?(int.Parse(this.six_iscash)));
            }
            cz_rate_kc _kc2 = new cz_rate_kc();

            _kc2.set_u_name(str);
            _kc2.set_u_type("hy");
            string checkredio = this.checkredio;

            if (checkredio != null)
            {
                if (!(checkredio == "fgs"))
                {
                    if (checkredio == "gd")
                    {
                        _kc2.set_dl_name("");
                        _kc2.set_zd_name(str);
                        _kc2.set_gd_name(this.kc_gd_name);
                        _kc2.set_fgs_name(this.kc_fgs_name);
                        _kc2.set_dl_rate(0);
                        _kc2.set_zd_rate(0);
                        _kc2.set_gd_rate(new decimal?(num6));
                        _kc2.set_fgs_rate(new decimal?(Convert.ToDecimal(this.kc_fgs_rate)));
                        _kc2.set_zj_rate(new decimal?(Convert.ToDecimal(this.kc_zj_rate)));
                    }
                    else if (checkredio == "zd")
                    {
                        _kc2.set_dl_name(str);
                        _kc2.set_zd_name(this.kc_zd_name);
                        _kc2.set_gd_name(this.kc_gd_name);
                        _kc2.set_fgs_name(this.kc_fgs_name);
                        _kc2.set_dl_rate(0);
                        _kc2.set_zd_rate(new decimal?(num6));
                        _kc2.set_gd_rate(new decimal?(Convert.ToDecimal(this.kc_gd_rate)));
                        _kc2.set_fgs_rate(new decimal?(Convert.ToDecimal(this.kc_fgs_rate)));
                        _kc2.set_zj_rate(new decimal?(Convert.ToDecimal(this.kc_zj_rate)));
                    }
                }
                else
                {
                    _kc2.set_dl_name("");
                    _kc2.set_zd_name("");
                    _kc2.set_gd_name(str);
                    _kc2.set_fgs_name(this.kc_fgs_name);
                    _kc2.set_dl_rate(0);
                    _kc2.set_zd_rate(0);
                    _kc2.set_gd_rate(0);
                    _kc2.set_fgs_rate(new decimal?(Convert.ToDecimal(num6)));
                    _kc2.set_zj_rate(new decimal?(Convert.ToDecimal(this.kc_zj_rate)));
                }
            }
            cz_rate_six _six = new cz_rate_six();

            _six.set_u_name(str);
            _six.set_u_type("hy");
            string str23 = this.checkredio;

            if (str23 != null)
            {
                if (!(str23 == "fgs"))
                {
                    if (str23 == "gd")
                    {
                        _six.set_dl_name("");
                        _six.set_zd_name(str);
                        _six.set_gd_name(this.six_gd_name);
                        _six.set_fgs_name(this.six_fgs_name);
                        _six.set_dl_rate(0);
                        _six.set_zd_rate(0);
                        _six.set_gd_rate(new decimal?(num3));
                        _six.set_fgs_rate(new decimal?(Convert.ToDecimal(this.six_fgs_rate)));
                        _six.set_zj_rate(new decimal?(Convert.ToDecimal(this.six_zj_rate)));
                    }
                    else if (str23 == "zd")
                    {
                        _six.set_dl_name(str);
                        _six.set_zd_name(this.six_zd_name);
                        _six.set_gd_name(this.six_gd_name);
                        _six.set_fgs_name(this.six_fgs_name);
                        _six.set_dl_rate(0);
                        _six.set_zd_rate(new decimal?(num3));
                        _six.set_gd_rate(new decimal?(Convert.ToDecimal(this.six_gd_rate)));
                        _six.set_fgs_rate(new decimal?(Convert.ToDecimal(this.six_fgs_rate)));
                        _six.set_zj_rate(new decimal?(Convert.ToDecimal(this.six_zj_rate)));
                    }
                }
                else
                {
                    _six.set_dl_name("");
                    _six.set_zd_name("");
                    _six.set_gd_name(str);
                    _six.set_fgs_name(this.six_fgs_name);
                    _six.set_dl_rate(0);
                    _six.set_zd_rate(0);
                    _six.set_gd_rate(0);
                    _six.set_fgs_rate(new decimal?(Convert.ToDecimal(num3)));
                    _six.set_zj_rate(new decimal?(Convert.ToDecimal(this.six_zj_rate)));
                }
            }
            string str18 = "";

            if (CallBLL.cz_users_bll.AddUserInfoHY(model, _kc2, _six, ref str18, str8.ToUpper(), str12.ToUpper()))
            {
                int?nullable = model.get_six_iscash();
                int num12    = int.Parse("1");
                if ((nullable.GetValueOrDefault() == num12) && nullable.HasValue)
                {
                    cz_users _users3 = new cz_users();
                    _users3.set_u_name(model.get_u_name());
                    _users3.set_six_usable_credit(0);
                    cz_users _users4 = new cz_users();
                    _users4.set_u_name(model.get_sup_name());
                    _users4.set_six_usable_credit(new decimal?(decimal.Parse(this.six_usable_credit_d)));
                    int num13 = 1;
                    if (base.IsMasterLotteryExist(num13.ToString()))
                    {
                        base.UserRecharge_six(_users3, _users4, str6);
                    }
                }
                int?nullable2 = model.get_kc_iscash();
                int num14     = int.Parse("1");
                if ((nullable2.GetValueOrDefault() == num14) && nullable2.HasValue)
                {
                    cz_users _users5 = new cz_users();
                    _users5.set_u_name(model.get_u_name());
                    _users5.set_kc_usable_credit(0);
                    cz_users _users6 = new cz_users();
                    _users6.set_u_name(model.get_sup_name());
                    _users6.set_kc_usable_credit(new decimal?(decimal.Parse(this.kc_usable_credit_d)));
                    int num15 = 2;
                    if (base.IsMasterLotteryExist(num15.ToString()))
                    {
                        base.UserRecharge_kc(_users5, _users6, str10);
                    }
                }
                int num9 = 2;
                if (this.lottrty_six == "")
                {
                    num9 = 1;
                }
                else if (this.lottrty_kc == "")
                {
                    num9 = 0;
                }
                else if ((this.lottrty_kc != "") && (this.lottrty_six != ""))
                {
                    num9 = 2;
                }
                base.user_add_hy_log(model, true, num9, str8, str12);
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                string url = "/Account/drawback.aspx?uid=" + str18 + "&isadd=1";
                base.Response.Write(base.ShowDialogBox("添加直屬會員成功!", url, 0));
                base.Response.End();
            }
            else
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("添加直屬會員失敗!", base.UserReturnBackUrl, 400));
                base.Response.End();
            }
        }