Exemple #1
0
        private void InitSelect(string checkredio)
        {
            string str = "";

            if (string.IsNullOrEmpty(this.upuid))
            {
                string str2 = "";
                if (this.userModel.get_u_type().Equals("zj"))
                {
                    str2 = "";
                }
                else
                {
                    str2 = " and " + this.userModel.get_u_type() + "_name='" + this.userModel.get_u_name() + "'";
                }
                str = "select u_name from  cz_rate_six  where u_type='" + checkredio + "' " + str2;
            }
            else
            {
                cz_users userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(this.upuid);
                str = string.Format("select u_name from cz_rate_six where u_type='" + checkredio + "' and {0}_name='{1}'", userInfoByUID.get_u_type(), userInfoByUID.get_u_name());
            }
            DataTable userListByAddUser = CallBLL.cz_users_bll.GetUserListByAddUser(str, checkredio);

            if (userListByAddUser == null)
            {
                base.Response.End();
            }
            for (int i = 0; i < userListByAddUser.Rows.Count; i++)
            {
                this.sltuid = LSRequest.qq("sltuid");
                if (string.IsNullOrEmpty(this.sltuid))
                {
                    if (i == 0)
                    {
                        this.up_userString = this.up_userString + string.Format("<option value=\"{0}\" selected=selected>{1}</option>", userListByAddUser.Rows[i]["u_id"].ToString(), userListByAddUser.Rows[i]["u_name"].ToString());
                        this.GetRateInfo(userListByAddUser.Rows[i]["u_id"].ToString(), checkredio);
                    }
                    else
                    {
                        this.up_userString = this.up_userString + string.Format("<option value=\"{0}\" >{1}</option>", userListByAddUser.Rows[i]["u_id"].ToString(), userListByAddUser.Rows[i]["u_name"].ToString());
                    }
                }
                else
                {
                    if (!string.IsNullOrEmpty(this.sltuid) && this.sltuid.ToUpper().Equals(userListByAddUser.Rows[i]["u_id"].ToString().ToUpper()))
                    {
                        this.up_userString = this.up_userString + string.Format("<option value=\"{0}\" selected=selected>{1}</option>", userListByAddUser.Rows[i]["u_id"].ToString(), userListByAddUser.Rows[i]["u_name"].ToString());
                        this.GetRateInfo(this.sltuid, checkredio);
                    }
                    if (!this.sltuid.ToUpper().Equals(userListByAddUser.Rows[i]["u_id"].ToString().ToUpper()))
                    {
                        this.up_userString = this.up_userString + string.Format("<option value=\"{0}\" >{1}</option>", userListByAddUser.Rows[i]["u_id"].ToString(), userListByAddUser.Rows[i]["u_name"].ToString());
                    }
                }
            }
        }
Exemple #2
0
        private void InitSelect()
        {
            string str = "";

            if (string.IsNullOrEmpty(this.upuid))
            {
                string str2 = "";
                if (this.userModel.get_u_type().Equals("zj"))
                {
                    str2 = "";
                }
                else
                {
                    str2 = " and " + this.userModel.get_u_type() + "_name='" + this.userModel.get_u_name() + "'";
                }
                str = "select u_name from  cz_rate_six  where u_type='fgs' " + str2;
            }
            else
            {
                cz_users userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(this.upuid);
                str = string.Format("select u_name from cz_rate_six where u_type='fgs' and {0}_name='{1}'", userInfoByUID.get_u_type(), userInfoByUID.get_u_name());
            }
            DataTable userListByAddUser = CallBLL.cz_users_bll.GetUserListByAddUser(str, "fgs");

            if (userListByAddUser == null)
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100058&url=&issuccess=1&isback=0&isopen=0");
                base.Response.End();
            }
            for (int i = 0; i < userListByAddUser.Rows.Count; i++)
            {
                if (string.IsNullOrEmpty(this.sltuid))
                {
                    if (i == 0)
                    {
                        this.up_userString = this.up_userString + string.Format("<option value=\"{0}\" selected=selected>{1}</option>", userListByAddUser.Rows[i]["u_id"].ToString(), userListByAddUser.Rows[i]["u_name"].ToString());
                        this.GetRateInfo(userListByAddUser.Rows[i]["u_id"].ToString());
                    }
                    else
                    {
                        this.up_userString = this.up_userString + string.Format("<option value=\"{0}\" >{1}</option>", userListByAddUser.Rows[i]["u_id"].ToString(), userListByAddUser.Rows[i]["u_name"].ToString());
                    }
                }
                else
                {
                    if (!string.IsNullOrEmpty(this.sltuid) && this.sltuid.ToUpper().Equals(userListByAddUser.Rows[i]["u_id"].ToString().ToUpper()))
                    {
                        this.up_userString = this.up_userString + string.Format("<option value=\"{0}\" selected=selected>{1}</option>", userListByAddUser.Rows[i]["u_id"].ToString(), userListByAddUser.Rows[i]["u_name"].ToString());
                        this.GetRateInfo(this.sltuid);
                    }
                    if (!this.sltuid.ToUpper().Equals(userListByAddUser.Rows[i]["u_id"].ToString().ToUpper()))
                    {
                        this.up_userString = this.up_userString + string.Format("<option value=\"{0}\" >{1}</option>", userListByAddUser.Rows[i]["u_id"].ToString(), userListByAddUser.Rows[i]["u_name"].ToString());
                    }
                }
            }
        }
Exemple #3
0
        private void UpdateStatus()
        {
            string   uid           = LSRequest.qq("uid").Trim();
            string   str2          = LSRequest.qq("status").Trim();
            cz_users userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(uid);
            string   str3          = "";

            if (userInfoByUID != null)
            {
                str3 = userInfoByUID.get_a_state().ToString();
            }
            if (userInfoByUID == null)
            {
                base.Response.Redirect("../MessagePage.aspx?code=u100034&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            if ((!str2.Equals("0") && !str2.Equals("1")) && !str2.Equals("2"))
            {
                base.Response.End();
            }
            string rateName = this.Session["user_name"].ToString();
            agent_userinfo_session model = this.Session[rateName + "lottery_session_user_info"] as agent_userinfo_session;

            base.Permission_Aspx_ZJ(model, "po_2_1");
            base.Permission_Aspx_DL(model, "po_6_1");
            if (model.get_u_name().Equals(userInfoByUID.get_u_name()))
            {
                base.Response.End();
            }
            if (!base.IsUnderLing(userInfoByUID.get_u_name(), rateName, model.get_u_type().Trim()))
            {
                base.Response.End();
            }
            if (!base.IsUpperLowerLevels(userInfoByUID.get_u_name(), model.get_u_type(), model.get_u_name()))
            {
                base.Response.End();
            }
            if (CallBLL.cz_users_bll.UpdateStatus(uid, str2))
            {
                if (FileCacheHelper.get_RedisStatOnline().Equals(1))
                {
                    base.UpdateIsOutOpts(userInfoByUID.get_u_name());
                }
                else if (FileCacheHelper.get_RedisStatOnline().Equals(2))
                {
                    base.UpdateIsOutOptsStack(userInfoByUID.get_u_name());
                }
                base.user_change_status_log(uid, str3, false);
                base.Response.Write("1");
            }
            else
            {
                base.Response.Write("0");
            }
        }
Exemple #4
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 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();

            this.userModel = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;
            this.lotteryDT = base.GetLotteryList();
            if (base.GetLotteryMasterID(this.lotteryDT).Split(new char[] { ',' }).Length > 1)
            {
                this.bol_masterid = true;
            }
            this.uid    = LSRequest.qq("uid");
            this.mlid   = LSRequest.qq("mlid");
            this.flag   = LSRequest.qq("flag");
            this.flagDS = this.flag;
            if (this.flag.Equals("0"))
            {
                this.flagDS = "0,1";
            }
            else if (this.flag.Equals("2"))
            {
                this.flagDS = "2,3";
            }
            else if (this.flag.Equals("4"))
            {
                this.flagDS = "4";
            }
            else
            {
                this.flagDS = "";
            }
            this.edit_model = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid);
            if (!this.edit_model.get_kc_iscash().Equals(int.Parse("1")))
            {
                base.Response.End();
            }
            base.Permission_Aspx_ZJ(this.userModel, "po_2_1");
            base.Permission_Aspx_DL(this.userModel, "po_6_1");
            if (!base.IsUpperLowerLevels(this.edit_model.get_u_name(), this.userModel.get_u_type(), this.userModel.get_u_name()))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            this.page = LSRequest.qq("page");
            if (string.IsNullOrEmpty(this.page))
            {
                this.page = "1";
            }
            else if (int.Parse(this.page) < 1)
            {
                this.page = "1";
            }
            this.InitData();
        }
Exemple #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Utils.ValidLotteryID(LSRequest.qq("lid"), true))
            {
                base.Response.End();
            }
            this.PrevUrl   = CookieHelper.GetCookie("cookiesreportprev");
            this.beginDate = LSRequest.qq("findDate");
            this.op        = LSRequest.qq("op");
            this.isback    = LSRequest.qq("isback");
            if (!string.IsNullOrEmpty(base.q("page")))
            {
                this.page = Convert.ToInt32(base.q("page"));
            }
            if (this.page < 1)
            {
                this.page = 1;
            }
            this.FiledValue = new string[] { this.beginDate, this.op, this.isback };
            this.userName   = HttpContext.Current.Session["user_name"].ToString();
            this.users      = CallBLL.cz_users_bll.UserLogin(this.userName);
            string str2 = this.users.get_su_type().ToString().Trim();

            if (str2 != null)
            {
                if (!(str2 == "dl"))
                {
                    if (str2 == "zd")
                    {
                        this.u_drawback = "dl_drawback";
                    }
                    else if (str2 == "gd")
                    {
                        this.u_drawback = "zd_drawback";
                    }
                    else if (str2 == "fgs")
                    {
                        this.u_drawback = "gd_drawback";
                    }
                }
                else
                {
                    this.u_drawback = "hy_drawback";
                }
            }
            this.dataTable = CallBLL.cz_betold_six_bll.GetReportByPageList(this.userName, this.page - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginDate + " 08:00:00", this.beginDate + " 23:59:59").Tables[0];
        }
Exemple #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.uModel = this.Session[this.Session["user_name"] + "lottery_session_user_info"] as agent_userinfo_session;
     base.Permission_Aspx_ZJ(this.uModel, "po_4_2");
     base.Permission_Aspx_DL(this.uModel, "po_7_2");
     this.uid = LSRequest.qq("uid");
     if (!string.IsNullOrEmpty(this.uid))
     {
         this.g_UserModel = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid);
         if ((!this.uModel.get_u_type().Equals("fgs") && !this.uModel.get_allow_view_report().Equals(1)) && !base.IsUpperLowerLevels(this.g_UserModel.get_u_name(), this.uModel.get_u_type(), this.uModel.get_u_name()))
         {
             base.Response.Redirect("../MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=0");
             base.Response.End();
         }
     }
     LSRequest.AddReportCookies();
 }
Exemple #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.uModel = this.Session[this.Session["user_name"] + "lottery_session_user_info"] as agent_userinfo_session;
            base.Permission_Aspx_ZJ(this.uModel, "po_4_2");
            base.Permission_Aspx_DL(this.uModel, "po_7_2");
            this.uid = LSRequest.qq("uid");
            if (!string.IsNullOrEmpty(this.uid))
            {
                this.g_UserModel = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid);
                if ((!this.uModel.get_u_type().Equals("fgs") && !this.uModel.get_allow_view_report().Equals(1)) && !base.IsUpperLowerLevels(this.g_UserModel.get_u_name(), this.uModel.get_u_type(), this.uModel.get_u_name()))
                {
                    base.Response.Redirect("../MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=0");
                    base.Response.End();
                }
            }
            string   str   = base.q("BeginDate");
            string   str2  = base.q("EndDate");
            DateTime time  = Convert.ToDateTime(str);
            DateTime time2 = Convert.ToDateTime(str2);

            if (time > Convert.ToDateTime(DateTime.Now.ToString("d")))
            {
                str = DateTime.Now.ToString("d");
            }
            if (time2 > Convert.ToDateTime(DateTime.Now.ToString("d")))
            {
                str2 = DateTime.Now.ToString("d");
            }
            if (time > time2)
            {
                base.Response.End();
            }
            string str3 = "select  *  from R_stat where R_date  between @bet_time1 and @bet_time2";

            SqlParameter[] parameterArray = new SqlParameter[] { new SqlParameter("@bet_time1", SqlDbType.DateTime), new SqlParameter("@bet_time2", SqlDbType.DateTime) };
            parameterArray[0].Value = str;
            parameterArray[1].Value = str2;
            DataTable table = DbHelperSQL.Query(str3, parameterArray).Tables[0];

            if (table.Rows.Count == 0)
            {
                base.Server.Transfer("ReportList_T_kc.aspx", true);
                base.Response.End();
            }
            LSRequest.AddReportCookies();
        }
Exemple #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();

            this.userModel  = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;
            this.lotteryDT  = base.GetLotteryList();
            this.uid        = LSRequest.qq("uid");
            this.lid        = LSRequest.qq("lid");
            this.ispc       = LSRequest.qq("isPc");
            this.edit_model = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid, "hy");
            if (!this.edit_model.get_kc_iscash().Equals(int.Parse("0")))
            {
                base.Response.End();
            }
            base.Permission_Aspx_ZJ(this.userModel, "po_2_1");
            base.Permission_Aspx_DL(this.userModel, "po_6_1");
            if (!base.IsUpperLowerLevels(this.edit_model.get_u_name(), this.userModel.get_u_type(), this.userModel.get_u_name()))
            {
                if (this.ispc.Equals("1"))
                {
                    base.Response.Redirect("../MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=1");
                    base.Response.End();
                }
                else
                {
                    base.Response.Redirect("../MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=0");
                    base.Response.End();
                }
            }
            this.InitData();
            if (!this.edit_model.get_six_iscash().Equals(1))
            {
                this.six_show = false;
            }
            this.six_show = false;
            if (LSRequest.qq("addprofit").Equals("add"))
            {
                if (!base.IsCreditLock(this.edit_model.get_u_name()))
                {
                    base.Response.Write(base.ShowDialogBox("系統繁忙,請稍後!", null, 400));
                    base.Response.End();
                }
                this.AddData();
                base.DeleteCreditLock(this.edit_model.get_u_name());
            }
        }
Exemple #10
0
        private void AddUser()
        {
            string str  = LSRequest.qq("userState");
            string str2 = LSRequest.qq("password");
            string str3 = LSRequest.qq("nicker");
            string str4 = LSRequest.qq("isLocked");
            string s    = LSRequest.qq("userCreditSix");

            if (this.d_six_iscash.Equals("1"))
            {
                s = this.d_six_credit;
            }
            string str6  = LSRequest.qq("userRateSix");
            string str7  = LSRequest.qq("userAllowSaleSix");
            string str8  = LSRequest.qq("userKindSix");
            string str9  = LSRequest.qq("allowMaxRateSix");
            string str10 = LSRequest.qq("downRateSix");
            string str11 = LSRequest.qq("userCreditKc");

            if (this.d_kc_iscash.Equals("1"))
            {
                str11 = this.d_kc_credit;
            }
            string str12   = LSRequest.qq("userRateKc");
            string str13   = LSRequest.qq("userAllowSaleKc");
            string str14   = LSRequest.qq("userKindKc");
            string str15   = LSRequest.qq("allowMaxRateKc");
            string str16   = LSRequest.qq("downRateKc");
            string message = "";

            if (!base.ValidParamByUserEditPhone("zd", ref message, null, this.lottrty_six, this.lottrty_kc))
            {
                base.noRightOptMsg(message);
            }
            if (!string.IsNullOrEmpty(str2.Trim()) && !Regexlib.IsValidPassword(str2.Trim(), base.get_GetPasswordLU()))
            {
                if (base.get_GetPasswordLU().Equals("1"))
                {
                    base.noRightOptMsg("密碼要8-20位,且必需包含大寫字母、小寫字母和数字!");
                }
                else
                {
                    base.noRightOptMsg("密碼要8-20位,且必需包含字母、和数字!");
                }
                base.Response.End();
            }
            if ((!str.Equals("0") && !str.Equals("1")) && !str.Equals("2"))
            {
                base.Response.End();
            }
            if (!string.IsNullOrEmpty(this.lottrty_six))
            {
                if ((!str8.ToUpper().Equals("A") && !str8.ToUpper().Equals("B")) && (!str8.ToUpper().Equals("C") && !str8.ToUpper().Equals("0")))
                {
                    base.Response.End();
                }
                if (!str7.ToUpper().Equals("0") && !str7.ToUpper().Equals("1"))
                {
                    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();
                }
            }
            cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(this.d_u_name);

            base.En_User_Lock(rateKCByUserName.get_fgs_name());
            double num = 0.0;

            if (!string.IsNullOrEmpty(this.lottrty_six))
            {
                if ((double.Parse(s) - double.Parse(this.d_six_credit)) > double.Parse(this.d_up_six_usable_credit))
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.noRightOptMsg("⑥合彩: 設定增加‘信用額度’超過上级可以用餘額!");
                }
                if (double.Parse(str6) > this.d_maxRate_six)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.noRightOptMsg("⑥合彩: 分公司占成 數不正确,请核实后重新输入!");
                }
                num = double.Parse(s) - double.Parse(this.d_six_credit);
                if (double.Parse(s) < (double.Parse(this.d_six_credit) - Convert.ToDouble(this.d_six_usable_credit)))
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.noRightOptMsg("⑥合彩: 設定減少‘信用額度’超過可‘回收’餘額!");
                }
                if (str9.Equals("1"))
                {
                    if (string.IsNullOrEmpty(str10))
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("⑥合彩:‘占成上限’不可為空,請修改!");
                    }
                    try
                    {
                        int.Parse(str10);
                    }
                    catch
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("⑥合彩: ‘占成上限’只能為數字,請重新設定!");
                    }
                    if (Convert.ToInt32(str10) > 100)
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("⑥合彩: ‘占成上限’不可高於 100%,請重新設定!");
                    }
                    else if (Convert.ToInt32(str10) < 0)
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("⑥合彩: ‘占成上限’不可低於等於 0%,請重新設定!");
                    }
                    if (double.Parse(str10) < this.d_downRate_six)
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg(string.Format("⑥合彩: ‘占成上限’不可低於 {0}%,請重新設定!", this.d_downRate_six));
                    }
                }
                else
                {
                    str10 = "0";
                }
            }
            double num2 = 0.0;

            if (!string.IsNullOrEmpty(this.lottrty_kc))
            {
                if ((double.Parse(str11) - double.Parse(this.d_kc_credit)) > double.Parse(this.d_up_kc_usable_credit))
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.noRightOptMsg("快彩: 設定增加‘信用額度’超過上级可以用餘額!");
                }
                if (double.Parse(str12) > this.d_maxRate_kc)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.noRightOptMsg("快彩: 分公司占成 數不正确,请核实后重新输入!");
                }
                num2 = double.Parse(str11) - double.Parse(this.d_kc_credit);
                if (double.Parse(str11) < (double.Parse(this.d_kc_credit) - Convert.ToDouble(this.d_kc_usable_credit)))
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.noRightOptMsg("快彩: 設定減少‘信用額度’超過可‘回收’餘額!");
                }
                if (str15.Equals("1"))
                {
                    if (string.IsNullOrEmpty(str16))
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("快彩:‘占成上限’不可為空,請修改!");
                    }
                    try
                    {
                        int.Parse(str16);
                    }
                    catch
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("快彩: ‘占成上限’只能為數字,請重新設定!");
                    }
                    if (Convert.ToInt32(str16) > 100)
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("快彩: ‘占成上限’不可高於 100%,請重新設定!");
                    }
                    else if (Convert.ToInt32(str16) < 0)
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg("快彩: ‘占成上限’不可低於等於 0%,請重新設定!");
                    }
                    if (double.Parse(str16) < this.d_downRate_kc)
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        base.noRightOptMsg(string.Format("快彩: ‘占成上限’不可低於 {0}%,請重新設定!", this.d_downRate_kc));
                    }
                }
                else
                {
                    str16 = "0";
                }
            }
            int     num3 = 0;
            decimal num4 = 0M;
            decimal num5 = 0M;

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

            if (!string.IsNullOrEmpty(this.lottrty_kc))
            {
                num6 = Convert.ToInt32(str12);
                num7 = Convert.ToDecimal(num2);
                num8 = Convert.ToDecimal(num2);
            }
            cz_users _users = new cz_users();

            _users.set_u_id(this.r_u_id.ToUpper());
            _users.set_u_name(this.d_u_name);
            if (!string.IsNullOrEmpty(str4) && (str4 == "1"))
            {
                _users.set_retry_times(0);
            }
            if (!string.IsNullOrEmpty(str2))
            {
                string ramSalt = Utils.GetRamSalt(6);
                _users.set_u_psw(DESEncrypt.EncryptString(str2, ramSalt));
                _users.set_salt(ramSalt);
            }
            _users.set_u_nicker(str3);
            _users.set_a_state(new int?(Convert.ToInt32(str)));
            _users.set_u_type(this.d_u_type);
            _users.set_six_rate(new int?(num3));
            _users.set_six_credit(new decimal?(num4));
            _users.set_six_usable_credit(new decimal?(num5));
            _users.set_allow_sale(new int?(Convert.ToInt32(str7)));
            if (str9.Equals("1"))
            {
                _users.set_six_allow_maxrate(1);
                _users.set_six_low_maxrate(new int?(Convert.ToInt32(str10)));
            }
            else
            {
                _users.set_six_allow_maxrate(0);
                _users.set_six_low_maxrate(0);
            }
            _users.set_kc_rate(new int?(num6));
            _users.set_kc_credit(new decimal?(num7));
            _users.set_kc_usable_credit(new decimal?(num8));
            _users.set_kc_allow_sale(new int?(Convert.ToInt32(str13)));
            if (str15.Equals("1"))
            {
                _users.set_kc_allow_maxrate(1);
                _users.set_kc_low_maxrate(new int?(Convert.ToInt32(str16)));
            }
            else
            {
                _users.set_kc_allow_maxrate(0);
                _users.set_kc_low_maxrate(0);
            }
            bool flag2 = true;
            bool flag3 = true;
            bool flag4 = false;
            bool flag5 = false;

            if (str7.Equals("0") && this.d_six_allow_sale.Equals("1"))
            {
                flag4 = true;
            }
            if (str13.Equals("0") && this.d_kc_allow_sale.Equals("1"))
            {
                flag5 = true;
            }
            if (this.d_six_ExistsBet && this.d_six_OpenPhase)
            {
                flag2 = false;
                _users.set_allow_sale(new int?(int.Parse(this.d_six_allow_sale)));
                flag4 = false;
            }
            if (this.d_kc_ExistsBet && this.d_kc_OpenPhase)
            {
                flag3 = false;
                _users.set_kc_allow_sale(new int?(int.Parse(this.d_kc_allow_sale)));
                flag5 = false;
            }
            DataTable userInfoTableByUID = CallBLL.cz_users_bll.GetUserInfoTableByUID(this.r_u_id);

            if (CallBLL.cz_users_bll.UpdateUserInfo(_users, flag2, flag3, flag4, flag5, this.d_up_u_type, this.d_up_u_name))
            {
                if (!this.d_kc_rate.Equals(_users.get_kc_rate().ToString()))
                {
                    FileCacheHelper.UpdateRateFile_kc();
                }
                if (!this.d_six_rate.Equals(_users.get_six_rate().ToString()))
                {
                    FileCacheHelper.UpdateRateFile_six();
                }
                base.user_edit_agent_log(userInfoTableByUID, CallBLL.cz_users_bll.GetUserInfoTableByUID(this.r_u_id), _users.get_u_name(), _users.get_u_type());
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.successOptMsg("已經成功修改總代!");
            }
            else
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.noRightOptMsg("修改總代失敗!");
            }
        }
Exemple #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();
            agent_userinfo_session model = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;

            if (!model.get_u_type().Trim().Equals("zj") && !model.get_u_type().Trim().Equals("fgs"))
            {
                base.Response.Redirect("../MessagePage.aspx?code=u100035&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            base.Permission_Aspx_ZJ(model, "po_2_1");
            base.Permission_Aspx_DL(model, "po_6_1");
            DataTable table2 = base.GetLotteryList().DefaultView.ToTable(true, new string[] { "master_id" });

            for (int i = 0; i < table2.Rows.Count; i++)
            {
                if (Convert.ToInt32(table2.Rows[i][0]).Equals(1))
                {
                    this.lottrty_six = table2.Rows[i][0].ToString();
                }
                else if (Convert.ToInt32(table2.Rows[i][0]).Equals(2))
                {
                    this.lottrty_kc = table2.Rows[i][0].ToString();
                }
            }
            this.lid   = LSRequest.qq("lid");
            this.ml    = LSRequest.qq("ml");
            this.state = LSRequest.qq("state");
            this.uid   = LSRequest.qq("uid");
            this.ut    = LSRequest.qq("ut");
            if (model.get_u_type().Equals("fgs") && string.IsNullOrEmpty(this.ut))
            {
                this.ut  = "fgs";
                this.uid = model.get_u_id();
            }
            if (!model.get_u_type().Equals("zj"))
            {
                cz_users userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid);
                if (!base.IsUpperLowerLevels(userInfoByUID.get_u_name(), model.get_u_type(), model.get_u_name()))
                {
                    base.Response.Redirect("../MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0");
                    base.Response.End();
                }
            }
            this.sortNameState = LSRequest.qq("sortName");
            this.sortTypeState = LSRequest.qq("sortType");
            if (string.IsNullOrEmpty(this.sortNameState))
            {
                this.sortNameState = "0";
            }
            if (string.IsNullOrEmpty(this.sortTypeState))
            {
                this.sortTypeState = "0";
            }
            this.namesort = this.sortNameState;
            this.timesort = this.sortTypeState;
            if (string.IsNullOrEmpty(this.state))
            {
                this.state = "0";
            }
            this.flag = LSRequest.qq("flag");
            if (string.IsNullOrEmpty(this.flag))
            {
                this.flag = "0";
            }
            this.keyword = LSRequest.qq("keyword");
            this.page    = LSRequest.qq("page");
            if (string.IsNullOrEmpty(this.page))
            {
                this.page = "1";
            }
            this.url = string.Format("?lid={0}&ml={1}&state={2}&flag={3}&keyword={4}&sortName={5}&sortType={6}&page={7}&uid={8}&ut={9}", new object[] { this.lid, this.ml, this.state, this.flag, this.keyword, this.namesort, this.timesort, this.page, this.uid, this.ut });
            if (LSRequest.qq("searchHidden").Equals("search"))
            {
                this.ml       = LSRequest.qq("ml");
                this.state    = LSRequest.qq("userState");
                this.flag     = LSRequest.qq("userFlag");
                this.keyword  = LSRequest.qq("searchkey");
                this.page     = LSRequest.qq("page");
                this.namesort = LSRequest.qq("sortName");
                this.timesort = LSRequest.qq("sortType");
                this.url      = string.Format("?lid={0}&ml={1}&state={2}&flag={3}&keyword={4}&sortName={5}&sortType={6}&page={7}&uid={8}&ut={9}", new object[] { this.lid, this.ml, this.state, this.flag, this.keyword, this.namesort, this.timesort, 1, this.uid, this.ut });
                base.Response.Redirect(string.Format("gd_list.aspx{0}", this.url));
            }
            if (int.Parse(this.page) < 1)
            {
                this.page = "1";
            }
            if (FileCacheHelper.get_RedisStatOnline().Equals(1) || FileCacheHelper.get_RedisStatOnline().Equals(2))
            {
                this.userDT = CallBLL.cz_users_bll.GetUserGDList(this.state, "gd", this.flag, this.keyword, Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.namesort, this.timesort, this.uid, this.ut, "redis");
            }
            else
            {
                this.userDT = CallBLL.cz_users_bll.GetUserGDList(this.state, "gd", this.flag, this.keyword, Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.namesort, this.timesort, this.uid, this.ut);
            }
            this.FiledValue = new string[] { this.lid, this.ml, this.state, this.flag, this.namesort, this.timesort, this.keyword, this.uid, this.ut, this.sortNameState, this.sortTypeState };
        }
Exemple #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();

            this.login_u_type = this.Session["user_type"].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"))) && !this.userModel.get_u_type().Trim().Equals("dl"))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100035&url=&issuccess=1&isback=0");
            }
            DataTable lotteryList = base.GetLotteryList();

            this.isOpenSIX_M = base.GetMasterLotteryIsOpen(lotteryList, 1);
            this.isOpenKC_M  = base.GetMasterLotteryIsOpen(lotteryList, 2);
            DataTable table2 = lotteryList.DefaultView.ToTable(true, new string[] { "master_id" });

            for (int i = 0; i < table2.Rows.Count; i++)
            {
                if (Convert.ToInt32(table2.Rows[i][0]).Equals(1))
                {
                    this.lottrty_six = table2.Rows[i][0].ToString();
                }
                else if (Convert.ToInt32(table2.Rows[i][0]).Equals(2))
                {
                    this.lottrty_kc = table2.Rows[i][0].ToString();
                }
            }
            this.lid    = LSRequest.qq("lid");
            this.ml     = LSRequest.qq("ml");
            this.state  = LSRequest.qq("state");
            this.uid    = LSRequest.qq("uid");
            this.ut     = LSRequest.qq("ut");
            this.zstype = LSRequest.qq("zstype");
            if (this.userModel.get_u_type().Equals("dl") && string.IsNullOrEmpty(this.ut))
            {
                this.ut  = "dl";
                this.uid = this.userModel.get_u_id();
            }
            if (this.userModel.get_u_type().Equals("zd") && string.IsNullOrEmpty(this.ut))
            {
                this.ut  = "zd";
                this.uid = this.userModel.get_u_id();
            }
            if (this.userModel.get_u_type().Equals("gd") && string.IsNullOrEmpty(this.ut))
            {
                this.ut  = "gd";
                this.uid = this.userModel.get_u_id();
            }
            if (this.userModel.get_u_type().Equals("fgs") && string.IsNullOrEmpty(this.ut))
            {
                this.ut  = "fgs";
                this.uid = this.userModel.get_u_id();
            }
            if (!this.userModel.get_u_type().Equals("zj"))
            {
                cz_users userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid);
                if (!base.IsUpperLowerLevels(userInfoByUID.get_u_name(), 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.sortNameState = LSRequest.qq("sortName");
            this.sortTypeState = LSRequest.qq("sortType");
            if (string.IsNullOrEmpty(this.sortNameState))
            {
                this.sortNameState = "0";
            }
            if (string.IsNullOrEmpty(this.sortTypeState))
            {
                this.sortTypeState = "0";
            }
            this.namesort = this.sortNameState;
            this.timesort = this.sortTypeState;
            if (string.IsNullOrEmpty(this.state))
            {
                this.state = "0";
            }
            this.flag = LSRequest.qq("flag");
            if (string.IsNullOrEmpty(this.flag))
            {
                this.flag = "0";
            }
            this.keyword = LSRequest.qq("keyword");
            this.page    = LSRequest.qq("page");
            if (string.IsNullOrEmpty(this.page))
            {
                this.page = "1";
            }
            this.url = string.Format("?lid={0}&ml={1}&state={2}&flag={3}&keyword={4}&sortName={5}&sortType={6}&page={7}&uid={8}&ut={9}&zstype={10}", new object[] { this.lid, this.ml, this.state, this.flag, this.keyword, this.namesort, this.timesort, this.page, this.uid, this.ut, this.zstype });
            if (LSRequest.qq("searchHidden").Equals("search"))
            {
                this.ml       = LSRequest.qq("ml");
                this.state    = LSRequest.qq("userState");
                this.flag     = LSRequest.qq("userFlag");
                this.keyword  = LSRequest.qq("searchkey");
                this.page     = LSRequest.qq("page");
                this.namesort = LSRequest.qq("sortName");
                this.timesort = LSRequest.qq("sortType");
                this.url      = string.Format("?lid={0}&ml={1}&state={2}&flag={3}&keyword={4}&sortName={5}&sortType={6}&page={7}&uid={8}&ut={9}&zstype={10}", new object[] { this.lid, this.ml, this.state, this.flag, this.keyword, this.namesort, this.timesort, 1, this.uid, this.ut, this.zstype });
                base.Response.Redirect(string.Format("hy_list.aspx{0}", this.url));
            }
            if (int.Parse(this.page) < 1)
            {
                this.page = "1";
            }
            if (FileCacheHelper.get_RedisStatOnline().Equals(1) || FileCacheHelper.get_RedisStatOnline().Equals(2))
            {
                this.userDT = CallBLL.cz_users_bll.GetUserHYList(this.state, "hy", this.flag, this.keyword, Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.namesort, this.timesort, this.uid, this.ut, this.zstype, "redis");
            }
            else
            {
                this.userDT = CallBLL.cz_users_bll.GetUserHYList(this.state, "hy", this.flag, this.keyword, Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.namesort, this.timesort, this.uid, this.ut, this.zstype);
            }
            this.FiledValue = new string[] { this.lid, this.ml, this.state, this.flag, this.namesort, this.timesort, this.keyword, this.uid, this.ut, this.zstype, this.sortNameState, this.sortTypeState };
            DataTable table3 = CallBLL.cz_users_bll.GetUserHYCreditSum(this.state, "hy", this.uid, this.ut, this.zstype);

            if (table3 != null)
            {
                this.six_usable_credit_sum = Utils.GetMathRound(Convert.ToDouble(table3.Rows[0]["six_usable_credit"].ToString()), 0);
                this.kc_usable_credit_sum  = Utils.GetMathRound(Convert.ToDouble(table3.Rows[0]["kc_usable_credit"].ToString()), 0);
            }
        }
Exemple #13
0
        private void AddUser()
        {
            string str     = LSRequest.qq("userName").ToLower().Trim();
            string str2    = "0";
            string str3    = LSRequest.qq("userPassword");
            string str4    = LSRequest.qq("userNicker");
            string str5    = LSRequest.qq("userReport");
            string str6    = LSRequest.qq("userCredit_six");
            string str7    = LSRequest.qq("userRate_six");
            string str8    = LSRequest.qq("userAllowSale_six");
            string str9    = LSRequest.qq("userRateOwner_six");
            string str10   = LSRequest.qq("userKind_six");
            string str11   = LSRequest.qq("op_six");
            string str12   = LSRequest.qq("userCredit_kc");
            string str13   = LSRequest.qq("userRate_kc");
            string str14   = LSRequest.qq("userAllowSale_kc");
            string str15   = LSRequest.qq("userRateOwner_kc");
            string str16   = LSRequest.qq("userKind_kc");
            string str17   = LSRequest.qq("isCash_kc");
            string str18   = LSRequest.qq("isCash_six");
            string str19   = LSRequest.qq("op_kc");
            string str20   = LSRequest.qq("isAutoBack_kc");
            string message = "";

            if (!base.ValidParamByUserAdd("fgs", ref message, null, this.lottrty_six, this.lottrty_kc))
            {
                base.noRightOptMsg(message);
            }
            if (!Regexlib.IsValidPassword(str3.Trim(), base.get_GetPasswordLU()))
            {
                if (base.get_GetPasswordLU().Equals("1"))
                {
                    base.noRightOptMsg("密碼要8-20位,且必需包含大寫字母、小寫字母和数字!");
                }
                else
                {
                    base.noRightOptMsg("<script>alert('密碼要8-20位,且必需包含字母、和数字!');</script>");
                }
            }
            if (!str5.ToUpper().Equals("0") && !str5.ToUpper().Equals("1"))
            {
                base.Response.End();
            }
            if (!str17.ToUpper().Equals("0") && !str17.ToUpper().Equals("1"))
            {
                base.Response.End();
            }
            if (!str18.ToUpper().Equals("0") && !str18.ToUpper().Equals("1"))
            {
                base.Response.End();
            }
            if (!str11.ToUpper().Equals("0") && !str11.ToUpper().Equals("1"))
            {
                base.Response.End();
            }
            if (!str19.ToUpper().Equals("0") && !str19.ToUpper().Equals("1"))
            {
                base.Response.End();
            }
            if (!string.IsNullOrEmpty(this.lottrty_six))
            {
                if ((!str10.ToUpper().Equals("A") && !str10.ToUpper().Equals("B")) && (!str10.ToUpper().Equals("C") && !str10.ToUpper().Equals("0")))
                {
                    base.Response.End();
                }
                if (!str8.ToUpper().Equals("0") && !str8.ToUpper().Equals("1"))
                {
                    base.Response.End();
                }
                if (!str9.ToUpper().Equals("0") && !str9.ToUpper().Equals("1"))
                {
                    base.Response.End();
                }
            }
            if (!string.IsNullOrEmpty(this.lottrty_kc))
            {
                if ((!str16.ToUpper().Equals("A") && !str16.ToUpper().Equals("B")) && (!str16.ToUpper().Equals("C") && !str16.ToUpper().Equals("0")))
                {
                    base.Response.End();
                }
                if (!str14.ToUpper().Equals("0") && !str14.ToUpper().Equals("1"))
                {
                    base.Response.End();
                }
                if (!str15.ToUpper().Equals("0") && !str15.ToUpper().Equals("1"))
                {
                    base.Response.End();
                }
            }
            int     num  = 100;
            decimal num2 = 0M;
            decimal num3 = 0M;

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

            if (!string.IsNullOrEmpty(this.lottrty_kc))
            {
                num4 = Convert.ToInt32(str13);
                num5 = Convert.ToDecimal(str12);
                num6 = Convert.ToDecimal(str12);
            }
            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.Session["user_name"].ToString());
            model.set_u_type("fgs");
            model.set_su_type("zj");
            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(str10);
            model.set_a_state(new int?(Convert.ToInt32(str2)));
            model.set_allow_sale(new int?(Convert.ToInt32(str8)));
            model.set_allow_view_report(new int?(Convert.ToInt32(str5)));
            model.set_six_allow_maxrate(0);
            model.set_six_low_maxrate(0);
            model.set_six_rate_owner(new int?(Convert.ToInt32(str9)));
            model.set_six_iscash(new int?(Convert.ToInt32(str18)));
            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(str16);
            model.set_kc_allow_sale(new int?(Convert.ToInt32(str14)));
            model.set_kc_allow_maxrate(0);
            model.set_kc_low_maxrate(0);
            model.set_kc_rate_owner(new int?(Convert.ToInt32(str15)));
            model.set_kc_crash_payment(0);
            model.set_kc_iscash(new int?(Convert.ToInt32(str17)));
            model.set_six_op_odds(new int?(Convert.ToInt32(str11)));
            model.set_kc_op_odds(new int?(Convert.ToInt32(str19)));
            if (base.get_GetIsShowFgsWT().Equals("0"))
            {
                model.set_six_op_odds(0);
                model.set_kc_op_odds(0);
            }
            model.set_kc_isauto_back(new int?(Convert.ToInt32(str20)));
            cz_rate_kc _kc = new cz_rate_kc();

            _kc.set_u_name(str);
            _kc.set_u_type("fgs");
            _kc.set_dl_name("");
            _kc.set_zd_name("");
            _kc.set_gd_name("");
            _kc.set_fgs_name(str);
            _kc.set_dl_rate(0);
            _kc.set_zd_rate(0);
            _kc.set_gd_rate(0);
            _kc.set_fgs_rate(0);
            _kc.set_zj_rate(new decimal?(num4));
            cz_rate_six _six = new cz_rate_six();

            _six.set_u_name(str);
            _six.set_u_type("fgs");
            _six.set_dl_name("");
            _six.set_zd_name("");
            _six.set_gd_name("");
            _six.set_fgs_name(str);
            _six.set_dl_rate(0);
            _six.set_zd_rate(0);
            _six.set_gd_rate(0);
            _six.set_fgs_rate(0);
            _six.set_zj_rate(new decimal?(num));
            string str23 = "";
            Dictionary <string, string> data = new Dictionary <string, string>();

            if (CallBLL.cz_users_bll.AddUserInfoFGS(model, _kc, _six, ref str23))
            {
                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_fgs_log(model, num7);
                string text1 = "/Account/drawback.aspx?uid=" + str23 + "&isadd=1";
                data.Add("uname", model.get_u_name());
                data.Add("uid", model.get_u_id());
                base.successOptMsg("添加分公司成功!", data);
            }
            else
            {
                base.noRightOptMsg("添加分公司失敗!");
            }
        }
Exemple #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str  = LSRequest.qq("hdnsubmit");
            string str2 = LSRequest.qq("txtoldpwd");
            string str3 = LSRequest.qq("txtnewpwd");
            string str4 = LSRequest.qq("txtnewpwdcf");

            if (str.Equals("submit"))
            {
                if ((string.IsNullOrEmpty(str2) || string.IsNullOrEmpty(str3)) || string.IsNullOrEmpty(str4))
                {
                    base.Response.Write("<script>alert('請輸入完整的密碼!');</script>");
                    base.Response.End();
                }
                if (str3 == str2)
                {
                    base.Response.Write("<script>alert('新密碼和舊密碼不能相同!');</script>");
                    base.Response.End();
                }
                if (str3 != str4)
                {
                    base.Response.Write("<script>alert('新密碼和確認新密碼不一致!');</script>");
                    base.Response.End();
                }
                if (!Regexlib.IsValidPassword(str3.Trim(), base.get_GetPasswordLU()))
                {
                    if (base.get_GetPasswordLU().Equals("1"))
                    {
                        base.Response.Write("<script>alert('密碼要8-20位,且必需包含大寫字母、小寫字母和数字!');</script>");
                    }
                    else
                    {
                        base.Response.Write("<script>alert('密碼要8-20位,且必需包含字母、和数字!');</script>");
                    }
                    base.Response.End();
                }
                cz_users _users = CallBLL.cz_users_bll.UserLogin(this.Session["user_name"].ToString());
                if (_users != null)
                {
                    string str5 = _users.get_salt().Trim();
                    string str6 = DESEncrypt.EncryptString(str2, str5);
                    if (_users.get_u_psw() != str6)
                    {
                        base.Response.Write("<script>alert('您輸入原密碼不正確!');</script>");
                        base.Response.End();
                    }
                    else
                    {
                        string ramSalt = Utils.GetRamSalt(6);
                        string str8    = DESEncrypt.EncryptString(str3, ramSalt);
                        if (CallBLL.cz_users_bll.UpUserPwd(this.Session["user_name"].ToString(), str8, ramSalt) > 0)
                        {
                            if (CallBLL.cz_users_bll.UpdateUserPwdStutas(this.Session["user_name"].ToString()) > 0)
                            {
                                MemberPageBase.log_user_reset_password(this.Session["user_name"].ToString(), this.Session["modifypassword"]);
                                this.Session["modifypassword"] = null;
                                base.Response.Write("<script>alert('修改密碼成功!');location.href='Quit.aspx';</script>");
                                base.Response.End();
                            }
                            else
                            {
                                base.Response.Write("<script>alert('修改密碼不成功!');</script>");
                                base.Response.End();
                            }
                        }
                        else
                        {
                            base.Response.Write("<script>alert('修改密碼不成功!');</script>");
                            base.Response.End();
                        }
                    }
                }
            }
        }
Exemple #15
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 #16
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 #17
0
        private void AddUser()
        {
            cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(this.d_u_name);

            base.En_User_Lock(rateKCByUserName.get_fgs_name());
            this.InitData();
            string str  = LSRequest.qq("userState");
            string str2 = LSRequest.qq("userPassword");
            string str3 = LSRequest.qq("userNicker");
            string str4 = LSRequest.qq("unlock");
            string s    = LSRequest.qq("userCredit_six");

            if (this.d_six_iscash.Equals("1"))
            {
                s = this.d_six_credit;
            }
            string str6  = LSRequest.qq("userRate_six");
            string str7  = LSRequest.qq("userAllowSale_six");
            string str8  = this.d_six_kind;
            string str9  = LSRequest.qq("allowmaxrate_six");
            string str10 = LSRequest.qq("lowmaxrate_six");
            string str11 = LSRequest.qq("userCredit_kc");

            if (this.d_kc_iscash.Equals("1"))
            {
                str11 = this.d_kc_credit;
            }
            string str12   = LSRequest.qq("userRate_kc");
            string str13   = LSRequest.qq("userAllowSale_kc");
            string str14   = this.d_kc_kind;
            string str15   = LSRequest.qq("allowmaxrate_kc");
            string str16   = LSRequest.qq("lowmaxrate_kc");
            string message = "";

            if (!base.ValidParamByUserEdit("dl", ref message, null, this.lottrty_six, this.lottrty_kc))
            {
                base.Response.Write(base.ShowDialogBox(message, null, 400));
                base.Response.End();
            }
            if (!string.IsNullOrEmpty(str2.Trim()) && !Regexlib.IsValidPassword(str2.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();
            }
            int num = 0;

            if (LSRequest.qq("sltlimithy").ToString().Trim().Equals("0"))
            {
                num = 0;
            }
            else
            {
                string str19 = LSRequest.qq("txtlimithy") ?? "";
                if (!string.IsNullOrEmpty(str19))
                {
                    num = int.Parse(str19);
                }
                if (num < int.Parse(this.currentLimit))
                {
                    base.Response.Write(base.ShowDialogBox(string.Format("代理下線人數不能小於 {0} 人", this.currentLimit), null, 400));
                    base.Response.End();
                }
            }
            if ((!str.Equals("0") && !str.Equals("1")) && !str.Equals("2"))
            {
                base.Response.End();
            }
            if (!string.IsNullOrEmpty(this.lottrty_six))
            {
                if ((!str8.ToUpper().Equals("A") && !str8.ToUpper().Equals("B")) && (!str8.ToUpper().Equals("C") && !str8.ToUpper().Equals("0")))
                {
                    base.Response.End();
                }
                if (!str7.ToUpper().Equals("0") && !str7.ToUpper().Equals("1"))
                {
                    base.Response.Write("<script>alert(\"(⑥合彩)補貨功能选择错误!!\");</script>");
                    base.Response.End();
                }
                if ((this.d_up_six_allow_sale == "0") && (str7 == "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.Write("<script>alert(\"(快彩)補貨功能选择错误!!\");</script>");
                    base.Response.End();
                }
                if ((this.d_up_kc_allow_sale == "0") && (str13 == "1"))
                {
                    base.Response.Write("<script>alert(\"(快彩)補貨功能选择错误!!\");</script>");
                    base.Response.End();
                }
            }
            if ((double.Parse(s) - double.Parse(this.d_six_credit)) > double.Parse(this.d_up_six_usable_credit))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("⑥合彩: 設定增加‘信用額度’超過上级可以用餘額!", null, 400));
                base.Response.End();
            }
            if (double.Parse(str6) > this.d_maxRate_six)
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("⑥合彩: 分公司占成 數不正确,请核实后重新输入!", null, 400));
                base.Response.End();
            }
            double num2 = double.Parse(s) - double.Parse(this.d_six_credit);

            if (double.Parse(s) < (double.Parse(this.d_six_credit) - Convert.ToDouble(this.d_six_usable_credit)))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("⑥合彩: 設定減少‘信用額度’超過可‘回收’餘額!", null, 400));
                base.Response.End();
            }
            if (str9.Equals("1"))
            {
                if (string.IsNullOrEmpty(str10))
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("⑥合彩:‘占成上限’不可為空,請修改!", null, 400));
                    base.Response.End();
                }
                try
                {
                    int.Parse(str10);
                }
                catch
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("⑥合彩: ‘占成上限’只能為數字,請重新設定!", null, 400));
                    base.Response.End();
                }
                if (Convert.ToInt32(str10) > 100)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("⑥合彩: ‘占成上限’不可高於 100%,請重新設定!", null, 400));
                    base.Response.End();
                }
                else if (Convert.ToInt32(str10) < 0)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("⑥合彩: ‘占成上限’不可低於等於 0%,請重新設定!", null, 400));
                    base.Response.End();
                }
                if (double.Parse(str10) < this.d_downRate_six)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox(string.Format("⑥合彩: ‘占成上限’不可低於 {0}%,請重新設定!", this.d_downRate_six), null, 400));
                    base.Response.End();
                }
            }
            else
            {
                str10 = "0";
            }
            if ((double.Parse(str11) - double.Parse(this.d_kc_credit)) > double.Parse(this.d_up_kc_usable_credit))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("快彩: 設定增加‘信用額度’超過上级可以用餘額!", null, 400));
                base.Response.End();
            }
            if (double.Parse(str12) > this.d_maxRate_kc)
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("快彩: 分公司占成 數不正确,请核实后重新输入!", null, 400));
                base.Response.End();
            }
            double num3 = double.Parse(str11) - double.Parse(this.d_kc_credit);

            if (double.Parse(str11) < (double.Parse(this.d_kc_credit) - Convert.ToDouble(this.d_kc_usable_credit)))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("快彩: 設定減少‘信用額度’超過可‘回收’餘額!", null, 400));
                base.Response.End();
            }
            if (str15.Equals("1"))
            {
                if (string.IsNullOrEmpty(str16))
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("快彩:‘占成上限’不可為空,請修改!", null, 400));
                    base.Response.End();
                }
                try
                {
                    int.Parse(str16);
                }
                catch
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("快彩: ‘占成上限’只能為數字,請重新設定!", null, 400));
                    base.Response.End();
                }
                if (Convert.ToInt32(str16) > 100)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("快彩: ‘占成上限’不可高於 100%,請重新設定!", null, 400));
                    base.Response.End();
                }
                else if (Convert.ToInt32(str16) < 0)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("快彩: ‘占成上限’不可低於等於 0%,請重新設定!", null, 400));
                    base.Response.End();
                }
                if (double.Parse(str16) < this.d_downRate_kc)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox(string.Format("快彩: ‘占成上限’不可低於 {0}%,請重新設定!", this.d_downRate_kc), null, 400));
                    base.Response.End();
                }
            }
            else
            {
                str16 = "0";
            }
            int     num4 = 0;
            decimal num5 = 0M;
            decimal num6 = 0M;

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

            if (!string.IsNullOrEmpty(this.lottrty_kc))
            {
                num7 = Convert.ToInt32(str12);
                num8 = Convert.ToDecimal(num3);
                num9 = Convert.ToDecimal(num3);
            }
            cz_users _users = new cz_users();

            _users.set_u_id(this.r_u_id.ToUpper());
            _users.set_u_name(this.d_u_name);
            _users.set_limit_hy(new int?(num));
            if (!string.IsNullOrEmpty(str4) && (str4 == "1"))
            {
                _users.set_retry_times(0);
            }
            if (!string.IsNullOrEmpty(str2))
            {
                string ramSalt = Utils.GetRamSalt(6);
                _users.set_u_psw(DESEncrypt.EncryptString(str2, ramSalt));
                _users.set_salt(ramSalt);
            }
            _users.set_u_nicker(str3);
            _users.set_a_state(new int?(Convert.ToInt32(str)));
            _users.set_u_type(this.d_u_type);
            _users.set_six_rate(new int?(num4));
            _users.set_six_credit(new decimal?(num5));
            _users.set_six_usable_credit(new decimal?(num6));
            _users.set_allow_sale(new int?(Convert.ToInt32(str7)));
            if (str9.Equals("1"))
            {
                _users.set_six_allow_maxrate(1);
                _users.set_six_low_maxrate(new int?(Convert.ToInt32(str10)));
            }
            else
            {
                _users.set_six_allow_maxrate(0);
                _users.set_six_low_maxrate(0);
            }
            _users.set_kc_rate(new int?(num7));
            _users.set_kc_credit(new decimal?(num8));
            _users.set_kc_usable_credit(new decimal?(num9));
            _users.set_kc_allow_sale(new int?(Convert.ToInt32(str13)));
            if (str15.Equals("1"))
            {
                _users.set_kc_allow_maxrate(1);
                _users.set_kc_low_maxrate(new int?(Convert.ToInt32(str16)));
            }
            else
            {
                _users.set_kc_allow_maxrate(0);
                _users.set_kc_low_maxrate(0);
            }
            bool flag2 = true;
            bool flag3 = true;
            bool flag4 = false;
            bool flag5 = false;

            if (str7.Equals("0") && this.d_six_allow_sale.Equals("1"))
            {
                flag4 = true;
            }
            if (str13.Equals("0") && this.d_kc_allow_sale.Equals("1"))
            {
                flag5 = true;
            }
            if (this.d_six_ExistsBet && this.d_six_OpenPhase)
            {
                flag2 = false;
                _users.set_allow_sale(new int?(int.Parse(this.d_six_allow_sale)));
                flag4 = false;
            }
            if (this.d_kc_ExistsBet && this.d_kc_OpenPhase)
            {
                flag3 = false;
                _users.set_kc_allow_sale(new int?(int.Parse(this.d_kc_allow_sale)));
                flag5 = false;
            }
            if (string.IsNullOrEmpty(this.lottrty_six))
            {
                flag2 = false;
            }
            if (string.IsNullOrEmpty(this.lottrty_kc))
            {
                flag3 = false;
            }
            DataTable userInfoTableByUID = CallBLL.cz_users_bll.GetUserInfoTableByUID(this.r_u_id);

            if (CallBLL.cz_users_bll.UpdateUserInfo(_users, flag2, flag3, flag4, flag5, this.d_up_u_type, this.d_up_u_name))
            {
                if (!this.d_kc_rate.Equals(_users.get_kc_rate().ToString()))
                {
                    FileCacheHelper.UpdateRateFile_kc();
                }
                if (!this.d_six_rate.Equals(_users.get_six_rate().ToString()))
                {
                    FileCacheHelper.UpdateRateFile_six();
                }
                base.user_edit_agent_log(userInfoTableByUID, CallBLL.cz_users_bll.GetUserInfoTableByUID(this.r_u_id), _users.get_u_name(), _users.get_u_type());
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("修改代理成功!", base.UserReturnBackUrl, 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 #18
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("dl", ref message, null, this.lottrty_six, this.lottrty_kc))
            {
                base.noRightOptMsg(message);
            }
            if (!Regexlib.IsValidPassword(str3.Trim(), base.get_GetPasswordLU()))
            {
                if (base.get_GetPasswordLU().Equals("1"))
                {
                    base.noRightOptMsg("密碼要8-20位,且必需包含大寫字母、小寫字母和数字!");
                }
                else
                {
                    base.noRightOptMsg("密碼要8-20位,且必需包含字母、和数字!");
                }
                base.Response.End();
            }
            int num = 0;

            if (LSRequest.qq("sltlimithy").ToString().Trim().Equals("0"))
            {
                num = 0;
            }
            else
            {
                string str17 = LSRequest.qq("txtlimithy") ?? "";
                if (!string.IsNullOrEmpty(str17))
                {
                    num = int.Parse(str17);
                }
            }
            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 (!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();
                }
            }
            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.noRightOptMsg("⑥合彩:‘信用額度’已超過‘上級可用餘額’,請修改!");
            }
            string str18 = LSRequest.qq("userRate_six");

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

            if (string.IsNullOrEmpty(str19))
            {
                str19 = "0";
            }
            if (Convert.ToDouble(str19) > Convert.ToDouble(this.kc_rate_d))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.noRightOptMsg("快彩: 總代占成 不可高於" + this.kc_rate_d + ",請修改!");
            }
            if (str11.Equals("1"))
            {
                if (string.IsNullOrEmpty(str12))
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.noRightOptMsg("快彩: ‘占成上限’ 不可為空,請修改!");
                }
                try
                {
                    int.Parse(str12);
                }
                catch
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.noRightOptMsg("快彩: ‘占成上限’只能為數字,請重新設定!");
                }
                if (Convert.ToInt32(str12) > 100)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.noRightOptMsg("快彩: ‘占成上限’不可高於 100%,請重新設定!");
                }
                else if (Convert.ToInt32(str12) < 0)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.noRightOptMsg("");
                }
            }
            else
            {
                str12 = "0";
            }
            int     num2 = 0;
            decimal num3 = 0M;
            decimal num4 = 0M;

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

            if (!string.IsNullOrEmpty(this.lottrty_kc))
            {
                num5 = Convert.ToInt32(str19);
                num6 = Convert.ToDecimal(str10);
                num7 = 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("dl");
            model.set_su_type("zd");
            model.set_limit_hy(new int?(num));
            model.set_add_date(new DateTime?(DateTime.Now));
            model.set_six_rate(new int?(num2));
            model.set_six_credit(new decimal?(num3));
            model.set_six_usable_credit(new decimal?(num4));
            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?(num5));
            model.set_kc_credit(new decimal?(num6));
            model.set_kc_usable_credit(new decimal?(num7));
            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("dl");
            _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?(num5));
            _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("dl");
            _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?(num2));
            _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 str21 = "";
            Dictionary <string, string> data = new Dictionary <string, string>();

            if (CallBLL.cz_users_bll.AddUserInfo(model, _kc2, _six, ref str21))
            {
                int num8 = 2;
                if (this.lottrty_six == "")
                {
                    num8 = 1;
                }
                else if (this.lottrty_kc == "")
                {
                    num8 = 0;
                }
                else if ((this.lottrty_kc != "") && (this.lottrty_six != ""))
                {
                    num8 = 2;
                }
                base.user_add_agent_log(model, num8);
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                string text1 = "/Account/drawback.aspx?uid=" + str21 + "&isadd=1";
                data.Add("uname", model.get_u_name());
                data.Add("uid", model.get_u_id());
                base.successOptMsg("添加代理成功!", data);
            }
            else
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.noRightOptMsg("添加代理失敗!");
            }
        }
Exemple #19
0
        private void user_login(HttpContext context, ref string strResult)
        {
            string       str    = "";
            string       str2   = "";
            string       str3   = "";
            string       str4   = "";
            ReturnResult result = new ReturnResult();
            Dictionary <string, object> dictionary = new Dictionary <string, object> {
                {
                    "type",
                    "user_login"
                }
            };
            string loginName    = LSRequest.qq("loginName").Trim().ToLower();
            string loginPwd     = LSRequest.qq("loginPwd").Trim();
            string ValidateCode = LSRequest.qq("ValidateCode").Trim();

            if (PageBase.is_ip_locked())
            {
                context.Session["lottery_session_img_code"] = null;
                result.set_success(400);
                result.set_tipinfo("由於輸入錯誤次數過多,您已被禁用,請稍後再試!");
                strResult = JsonHandle.ObjectToJson(result);
            }
            else if (string.IsNullOrEmpty(loginName) || string.IsNullOrEmpty(loginPwd))
            {
                context.Response.End();
            }
            else
            {
                DateTime time = new DateTime();
                string   retry_times;
                string   str10;
                string   str11;
                string   str14;
                DateTime?nullable;
                int      num2;
                DateTime?nullable3;
                DateTime time2;
                if (int.Parse(FileCacheHelper.get_GetLockedPasswordCount()) == 0)
                {
                    context.Session["lottery_session_img_code_display"] = 1;
                }
                if (context.Session["lottery_session_img_code_display"] == null)
                {
                    if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(loginName))
                    {
//                        TODO 登录超时
//                        if (PageBase.IsErrTimesAbove(ref time, str5))
//                        {
//                            if (!PageBase.IsErrTimeout(time))
//                            {
//                                context.Session["lottery_session_img_code"] = null;
//                                result.set_success(400);
//                                result.set_tipinfo("");
//                                dictionary.Add("is_display_code", "1");
//                                result.set_data(dictionary);
//                                strResult = JsonHandle.ObjectToJson(result);
//                                context.Session["lottery_session_img_code_display"] = 1;
//                                return;
//                            }
//                            CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(str5);
//                            context.Session["lottery_session_img_code"] = null;
//                            context.Session["lottery_session_img_code_display"] = 0;
//                        }
//                        else
//                        {
//                            context.Session["lottery_session_img_code"] = null;
//                            context.Session["lottery_session_img_code_display"] = 0;
//                        }
                    }
                    else
                    {
                        context.Session["lottery_session_img_code"]         = null;
                        context.Session["lottery_session_img_code_display"] = 0;
                    }
                }
                if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                {
                    if (string.IsNullOrEmpty(loginName) || string.IsNullOrEmpty(loginPwd))
                    {
                        context.Response.End();
                        return;
                    }
                }
                else
                {
                    if (string.IsNullOrEmpty(loginName) || string.IsNullOrEmpty(loginPwd))
                    {
                        context.Response.End();
                        return;
                    }
                    if (string.IsNullOrEmpty(ValidateCode))
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("");
                        dictionary.Add("is_display_code", "1");
                        result.set_data(dictionary);
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["lottery_session_img_code_display"] = 1;
                        return;
                    }
                    if (context.Session["lottery_session_img_code"] == null)
                    {
                        context.Response.End();
                        return;
                    }
                    if (context.Session["lottery_session_img_code"].ToString().ToLower() != ValidateCode.ToLower())
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100001", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        return;
                    }
                }
                cz_users       _users = CallBLL.cz_users_bll.AgentLogin(loginName.ToLower());
                cz_users_child _child = null;
                if (_users == null)
                {
                    _child = CallBLL.cz_users_child_bll.AgentLogin(loginName.ToLower());
                    if (_child != null)
                    {
                        retry_times = _child.get_retry_times().ToString();
                        if (!string.IsNullOrEmpty(retry_times) && (int.Parse(retry_times) > int.Parse(FileCacheHelper.get_GetLockedUserCount())))
                        {
                            if (!PageBase.IsLockedTimeout(loginName, "child"))
                            {
                                context.Session["lottery_session_img_code"] = null;
                                result.set_success(560);
                                result.set_tipinfo("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!");
                                strResult = JsonHandle.ObjectToJson(result);
                                return;
                            }
                            PageBase.zero_retry_times_children(loginName);
                        }
                        str10 = _child.get_salt().Trim();
                        str11 = DESEncrypt.EncryptString(loginPwd, str10);
                        if (_child.get_u_psw() != str11)
                        {
                            context.Session["lottery_session_img_code"] = null;
                            PageBase.inc_retry_times_children(loginName);
                            PageBase.login_error_ip();
                            result.set_success(400);
                            result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                            strResult = JsonHandle.ObjectToJson(result);
                            if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                            {
                                if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(loginName))
                                {
                                    CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(loginName);
                                }
                                else
                                {
                                    CallBLL.cz_user_psw_err_log_bll.AddUser(loginName);
                                }
                                if (PageBase.IsErrTimesAbove(ref time, loginName))
                                {
                                    context.Session["lottery_session_img_code"] = null;
                                    result.set_success(400);
                                    result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                                    dictionary.Add("is_display_code", "1");
                                    result.set_data(dictionary);
                                    strResult = JsonHandle.ObjectToJson(result);
                                    context.Session["lottery_session_img_code_display"] = 1;
                                }
                            }
                            return;
                        }
                        str2   = _child.get_status().ToString();
                        str3   = PageBase.upper_user_status(_child.get_parent_u_name());
                        _users = CallBLL.cz_users_bll.AgentLogin(_child.get_parent_u_name());
                    }
                    else
                    {
                        context.Session["lottery_session_img_code"] = null;
                        PageBase.login_error_ip();
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100002", "MessageHint"));
                        dictionary.Add("fs_name", "loginName");
                        strResult = JsonHandle.ObjectToJson(result);
                        return;
                    }
                    PageBase.zero_retry_times_children(loginName);
                }
                else
                {
                    retry_times = _users.get_retry_times().ToString();
                    if (!string.IsNullOrEmpty(retry_times) && (int.Parse(retry_times) > int.Parse(FileCacheHelper.get_GetLockedUserCount())))
                    {
                        if (!PageBase.IsLockedTimeout(loginName, "master"))
                        {
                            context.Session["lottery_session_img_code"] = null;
                            result.set_success(560);
                            result.set_tipinfo("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!");
                            strResult = JsonHandle.ObjectToJson(result);
                            return;
                        }
                        PageBase.zero_retry_times(loginName);
                    }
                    str = _users.get_a_state().ToString();
                    string str12 = _users.get_a_state().ToString();
                    str4 = PageBase.upper_user_status(_users.get_u_name());
                    if (str12.Equals("2"))
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100005", "MessageHint"));
                        dictionary.Add("fs_name", "loginName");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    if (str4 == "2")
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的上級帳號已被停用,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    str   = (str12 == null) ? "0" : str;
                    str10 = _users.get_salt().Trim();
                    str11 = DESEncrypt.EncryptString(loginPwd, str10);
                    if (_users.get_u_psw() != str11)
                    {
                        context.Session["lottery_session_img_code"] = null;
                        PageBase.inc_retry_times(loginName);
                        PageBase.login_error_ip();
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                        {
                            if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(loginName))
                            {
                                CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(loginName);
                            }
                            else
                            {
                                CallBLL.cz_user_psw_err_log_bll.AddUser(loginName);
                            }
                            if (PageBase.IsErrTimesAbove(ref time, loginName))
                            {
                                context.Session["lottery_session_img_code"] = null;
                                result.set_success(400);
                                result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                                dictionary.Add("is_display_code", "1");
                                result.set_data(dictionary);
                                strResult = JsonHandle.ObjectToJson(result);
                                context.Session["lottery_session_img_code_display"] = 1;
                            }
                        }
                        return;
                    }
                    PageBase.zero_retry_times(loginName);
                }
                if (!string.IsNullOrEmpty(str2))
                {
                    context.Session["user_name"]       = _users.get_u_name().Trim();
                    context.Session["user_type"]       = _users.get_u_type().Trim();
                    context.Session["child_user_name"] = _child.get_u_name().Trim();
                    context.Session["user_state"]      = str2.Trim();
                    if (str2.Equals("2"))
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的帳號已被停用,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    if (_users.get_a_state() == 2)
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的主帳號已被停用,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    if (str3 == "2")
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的上級帳號已被停用,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    if (str2 == "1")
                    {
                        result.set_success(200);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = str2;
                    }
                    else if (_users.get_a_state() == 1)
                    {
                        result.set_success(200);
                        result.set_tipinfo("您的主帳號已被凍結,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = _users.get_a_state().ToString();
                    }
                    else if (str3 == "1")
                    {
                        result.set_success(200);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = str3;
                    }
                    else
                    {
                        context.Session["user_state"] = "0";
                        result.set_success(200);
                        strResult = JsonHandle.ObjectToJson(result);
                    }
                }
                else
                {
                    context.Session["user_name"]  = _users.get_u_name().Trim();
                    context.Session["user_type"]  = _users.get_u_type().Trim();
                    context.Session["user_state"] = str.Trim();
                    if (str.Equals("1"))
                    {
                        result.set_success(200);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = str;
                    }
                    else if (str4 == "1")
                    {
                        result.set_success(200);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = str4;
                    }
                    else
                    {
                        context.Session["user_state"] = "0";
                        result.set_success(200);
                        strResult = JsonHandle.ObjectToJson(result);
                    }
                }
                agent_userinfo_session _session = new agent_userinfo_session();
                _session.set_u_id(_users.get_u_id());
                _session.set_u_name(_users.get_u_name().Trim());
                _session.set_u_psw(_users.get_u_psw().Trim());
                _session.set_u_nicker(_users.get_u_nicker().Trim());
                _session.set_u_skin(_users.get_u_skin().Trim());
                if (_child != null)
                {
                    if (string.IsNullOrEmpty(_child.get_u_skin()))
                    {
                        _session.set_u_skin("");
                    }
                    else
                    {
                        _session.set_u_skin(_child.get_u_skin());
                    }
                }
                _session.set_sup_name(_users.get_sup_name().Trim());
                _session.set_u_type(_users.get_u_type().Trim());
                _session.set_su_type(_users.get_su_type().Trim());
                _session.set_a_state(_users.get_a_state());
                _session.set_six_kind(_users.get_six_kind());
                _session.set_kc_kind(_users.get_kc_kind());
                _session.set_allow_sale(_users.get_allow_sale());
                _session.set_kc_allow_sale(_users.get_kc_allow_sale());
                _session.set_negative_sale(_users.get_negative_sale());
                if (!_users.get_allow_view_report().HasValue)
                {
                    _session.set_allow_view_report(0);
                }
                else
                {
                    _session.set_allow_view_report(_users.get_allow_view_report());
                }
                DataRow item = CallBLL.cz_admin_sysconfig_bll.GetItem();
                if (item == null)
                {
                    _session.set_u_skin("Blue");
                }
                else
                {
                    string str13 = item["agent_skin"].ToString();
                    if (string.IsNullOrEmpty(_session.get_u_skin()) || (str13.IndexOf(_session.get_u_skin()) < 0))
                    {
                        _session.set_u_skin(str13.Split(new char[] { '|' })[0]);
                    }
                }
                if (_child != null)
                {
                    _child.set_salt("");
                }
                _session.set_users_child_session(_child);
                DataTable zJInfo = CallBLL.cz_users_bll.GetZJInfo();
                if (zJInfo != null)
                {
                    _session.set_zjname(zJInfo.Rows[0]["u_name"].ToString().Trim());
                }
                if (!_session.get_u_type().ToLower().Equals("zj"))
                {
                    cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(_session.get_u_name());
                    _session.set_fgs_name(rateKCByUserName.get_fgs_name());
                    _session.set_gd_name(rateKCByUserName.get_gd_name());
                    _session.set_zd_name(rateKCByUserName.get_zd_name());
                    _session.set_dl_name(rateKCByUserName.get_dl_name());
                    DataTable userOpOdds = CallBLL.cz_rate_kc_bll.GetUserOpOdds(_session.get_u_name());
                    if (userOpOdds != null)
                    {
                        if ((userOpOdds.Rows[0]["six_op_odds"] != null) && (userOpOdds.Rows[0]["six_op_odds"].ToString() != ""))
                        {
                            _session.set_six_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["six_op_odds"].ToString())));
                        }
                        if ((userOpOdds.Rows[0]["kc_op_odds"] != null) && (userOpOdds.Rows[0]["kc_op_odds"].ToString() != ""))
                        {
                            _session.set_kc_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["kc_op_odds"].ToString())));
                        }
                    }
                }
                context.Session["child_user_name"] = null;
                if (_child != null)
                {
                    context.Session["child_user_name"] = _child.get_u_name();
                }
                context.Session["user_name"] = _users.get_u_name();
                context.Session[_users.get_u_name() + "lottery_session_user_info"] = _session;
                PageBase.SetAppcationFlag(loginName);
                if (FileCacheHelper.get_RedisStatOnline().Equals(1) || FileCacheHelper.get_RedisStatOnline().Equals(2))
                {
                    bool flag4 = false;
                    if ((_session.get_users_child_session() != null) && _session.get_users_child_session().get_is_admin().Equals(1))
                    {
                        flag4 = true;
                    }
                    if (!flag4)
                    {
//                        if (FileCacheHelper.get_RedisStatOnline().Equals(1))
//                        {
//                            new PageBase_Redis().InitUserOnlineTopToRedis(str5, _session.get_u_type());
//                        }
//                        if (FileCacheHelper.get_RedisStatOnline().Equals(2))
//                        {
//                            new PageBase_Redis().InitUserOnlineTopToRedisStack(str5, _session.get_u_type());
//                        }
                    }
                }
                else
                {
                    MemberPageBase.stat_top_online(loginName);
                    MemberPageBase.stat_online(loginName, _session.get_u_type());
                }
                if (FileCacheHelper.get_RedisStatOnline() == 0)
                {
                    PageBase.ZeroIsOutFlag(loginName);
                }
                CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(loginName);
                cz_login_log _log = new cz_login_log();
                _log.set_ip(LSRequest.GetIP());
                _log.set_login_time(new DateTime?(DateTime.Now));
                _log.set_u_name(loginName);
                PageBase base2 = new PageBase();
//                _log.set_browser_type(Utils.GetBrowserInfo(HttpContext.Current));
                bool flag5 = CallBLL.cz_login_log_bll.Add(_log);
                if (_child == null)
                {
                    str14 = _users.get_is_changed().ToString();
                    if (string.IsNullOrEmpty(str14))
                    {
                        result.set_success(550);
                        result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["modifypassword"] = "******";
                    }
                    else if (str14 == "0")
                    {
                        result.set_success(550);
                        result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["modifypassword"] = "******";
                    }
                    else
                    {
                        nullable  = _users.get_last_changedate();
                        num2      = PageBase.PasswordExpire();
                        nullable3 = nullable;
                        time2     = DateTime.Now.AddDays((double)-num2);
                        if (nullable3.HasValue ? (nullable3.GetValueOrDefault() < time2) : false)
                        {
                            result.set_success(550);
                            result.set_tipinfo("密碼過期,需重置密碼!");
                            strResult = JsonHandle.ObjectToJson(result);
                            context.Session["modifypassword"] = "******";
                        }
                    }
                }
                else
                {
                    str14 = _child.get_is_changed().ToString();
                    if (string.IsNullOrEmpty(str14))
                    {
                        result.set_success(550);
                        result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["modifypassword"] = "******";
                    }
                    else if (str14 == "0")
                    {
                        result.set_success(550);
                        result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["modifypassword"] = "******";
                    }
                    else
                    {
                        nullable = _child.get_last_changedate();
                        num2     = PageBase.PasswordExpire();
                        if (nullable.HasValue && ((nullable3 = nullable).HasValue ? (nullable3.GetValueOrDefault() < (time2 = DateTime.Now.AddDays((double)-num2))) : false))
                        {
                            result.set_success(550);
                            result.set_tipinfo("密碼過期,需重置密碼!");
                            strResult = JsonHandle.ObjectToJson(result);
                            context.Session["modifypassword"] = "******";
                        }
                    }
                }
            }
        }
Exemple #20
0
        private void userLogin(HttpContext context, ref string strResult)
        {
            DateTime?    nullable12;
            DateTime     time4;
            string       str    = "";
            string       str2   = "";
            string       str3   = "";
            string       str4   = "";
            ReturnResult result = new ReturnResult();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            dictionary.Add("type", "user_login");
            string str5 = LSRequest.qq("loginName").Trim().ToLower();
            string str6 = LSRequest.qq("loginPwd").Trim();
            string str7 = LSRequest.qq("ValidateCode").Trim();

            if (PageBase.is_ip_locked())
            {
                context.Session["lottery_session_img_code"] = null;
                result.set_success(400);
                result.set_tipinfo("由於輸入錯誤次數過多,您已被禁用,請稍後再試!");
                strResult = JsonHandle.ObjectToJson(result);
                return;
            }
            if (string.IsNullOrEmpty(str5) || string.IsNullOrEmpty(str6))
            {
                context.Response.End();
                return;
            }
            if (int.Parse(FileCacheHelper.get_GetLockedPasswordCount()) == 0)
            {
                context.Session["lottery_session_img_code_display"] = 1;
            }
            if (context.Session["lottery_session_img_code_display"] == null)
            {
                if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(str5))
                {
                    DateTime time;
                    if (PageBase.IsErrTimesAbove(ref time, str5))
                    {
                        if (!PageBase.IsErrTimeout(time))
                        {
                            context.Session["lottery_session_img_code"] = null;
                            result.set_success(400);
                            result.set_tipinfo("");
                            dictionary.Add("isDisplayCode", 1);
                            result.set_data(dictionary);
                            strResult = JsonHandle.ObjectToJson(result);
                            context.Session["lottery_session_img_code_display"] = 1;
                            return;
                        }
                        CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(str5);
                        context.Session["lottery_session_img_code"]         = null;
                        context.Session["lottery_session_img_code_display"] = 0;
                    }
                    else
                    {
                        context.Session["lottery_session_img_code"]         = null;
                        context.Session["lottery_session_img_code_display"] = 0;
                    }
                }
                else
                {
                    context.Session["lottery_session_img_code"]         = null;
                    context.Session["lottery_session_img_code_display"] = 0;
                }
            }
            if (context.Session["lottery_session_img_code_display"].ToString() == "0")
            {
                if (string.IsNullOrEmpty(str5) || string.IsNullOrEmpty(str6))
                {
                    context.Response.End();
                    return;
                }
            }
            else
            {
                if (string.IsNullOrEmpty(str5) || string.IsNullOrEmpty(str6))
                {
                    context.Response.End();
                    return;
                }
                if (string.IsNullOrEmpty(str7))
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(410);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100001", "MessageHint"));
                    dictionary.Add("isDisplayCode", 1);
                    result.set_data(dictionary);
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["lottery_session_img_code_display"] = 1;
                    return;
                }
                if (context.Session["lottery_session_img_code"] == null)
                {
                    result.set_success(410);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100001", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    return;
                }
                if (context.Session["lottery_session_img_code"].ToString().ToLower() != str7.ToLower())
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(410);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100001", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    return;
                }
            }
            cz_users       _users = CallBLL.cz_users_bll.AgentLogin(str5.ToLower());
            cz_users_child _child = null;

            if (_users == null)
            {
                _child = CallBLL.cz_users_child_bll.AgentLogin(str5.ToLower());
                if (_child != null)
                {
                    string str9 = _child.get_retry_times().ToString();
                    if (!string.IsNullOrEmpty(str9) && (int.Parse(str9) > int.Parse(FileCacheHelper.get_GetLockedUserCount())))
                    {
                        if (!PageBase.IsLockedTimeout(str5, "child"))
                        {
                            context.Session["lottery_session_img_code"] = null;
                            result.set_success(560);
                            result.set_tipinfo("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!");
                            strResult = JsonHandle.ObjectToJson(result);
                            return;
                        }
                        PageBase.zero_retry_times_children(str5);
                    }
                    string str10 = _child.get_salt().Trim();
                    string str11 = DESEncrypt.EncryptString(str6, str10);
                    if (_child.get_u_psw() != str11)
                    {
                        context.Session["lottery_session_img_code"] = null;
                        PageBase.inc_retry_times_children(str5);
                        PageBase.login_error_ip();
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                        {
                            DateTime time2;
                            if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(str5))
                            {
                                CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(str5);
                            }
                            else
                            {
                                CallBLL.cz_user_psw_err_log_bll.AddUser(str5);
                            }
                            if (PageBase.IsErrTimesAbove(ref time2, str5))
                            {
                                context.Session["lottery_session_img_code"] = null;
                                result.set_success(400);
                                result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                                dictionary.Add("isDisplayCode", 1);
                                result.set_data(dictionary);
                                strResult = JsonHandle.ObjectToJson(result);
                                context.Session["lottery_session_img_code_display"] = 1;
                            }
                        }
                        return;
                    }
                    str2   = _child.get_status().ToString();
                    str3   = PageBase.upper_user_status(_child.get_parent_u_name());
                    _users = CallBLL.cz_users_bll.AgentLogin(_child.get_parent_u_name());
                }
                else
                {
                    context.Session["lottery_session_img_code"] = null;
                    PageBase.login_error_ip();
                    result.set_success(400);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100002", "MessageHint"));
                    dictionary.Add("fs_name", "loginName");
                    strResult = JsonHandle.ObjectToJson(result);
                    return;
                }
                PageBase.zero_retry_times_children(str5);
            }
            else
            {
                string str12 = _users.get_retry_times().ToString();
                if (!string.IsNullOrEmpty(str12) && (int.Parse(str12) > int.Parse(FileCacheHelper.get_GetLockedUserCount())))
                {
                    if (!PageBase.IsLockedTimeout(str5, "master"))
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        return;
                    }
                    PageBase.zero_retry_times(str5);
                }
                str = _users.get_a_state().ToString();
                string str13 = _users.get_a_state().ToString();
                str4 = PageBase.upper_user_status(_users.get_u_name());
                if (str13.Equals("2"))
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100005", "MessageHint"));
                    dictionary.Add("fs_name", "loginName");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                if (str4 == "2")
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo("您的上級帳號已被停用,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                str = (str13 == null) ? "0" : str;
                string str14 = _users.get_salt().Trim();
                string str15 = DESEncrypt.EncryptString(str6, str14);
                if (_users.get_u_psw() != str15)
                {
                    context.Session["lottery_session_img_code"] = null;
                    PageBase.inc_retry_times(str5);
                    PageBase.login_error_ip();
                    result.set_success(400);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                    {
                        DateTime time3;
                        if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(str5))
                        {
                            CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(str5);
                        }
                        else
                        {
                            CallBLL.cz_user_psw_err_log_bll.AddUser(str5);
                        }
                        if (PageBase.IsErrTimesAbove(ref time3, str5))
                        {
                            context.Session["lottery_session_img_code"] = null;
                            result.set_success(400);
                            result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                            dictionary.Add("isDisplayCode", 1);
                            result.set_data(dictionary);
                            strResult = JsonHandle.ObjectToJson(result);
                            context.Session["lottery_session_img_code_display"] = 1;
                        }
                    }
                    return;
                }
                PageBase.zero_retry_times(str5);
            }
            if (!string.IsNullOrEmpty(str2))
            {
                context.Session["user_name"]       = _users.get_u_name().Trim();
                context.Session["user_type"]       = _users.get_u_type().Trim();
                context.Session["child_user_name"] = _child.get_u_name().Trim();
                context.Session["user_state"]      = str2.Trim();
                if (str2.Equals("2"))
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo("您的帳號已被停用,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                if (_users.get_a_state() == 2)
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo("您的主帳號已被停用,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                if (str3 == "2")
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo("您的上級帳號已被停用,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                if (str2 == "1")
                {
                    result.set_success(200);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = str2;
                }
                else if (_users.get_a_state() == 1)
                {
                    result.set_success(200);
                    result.set_tipinfo("您的主帳號已被凍結,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = _users.get_a_state().ToString();
                }
                else if (str3 == "1")
                {
                    result.set_success(200);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = str3;
                }
                else
                {
                    context.Session["user_state"] = "0";
                    result.set_success(200);
                    strResult = JsonHandle.ObjectToJson(result);
                }
            }
            else
            {
                context.Session["user_name"]  = _users.get_u_name().Trim();
                context.Session["user_type"]  = _users.get_u_type().Trim();
                context.Session["user_state"] = str.Trim();
                if (str.Equals("1"))
                {
                    result.set_success(200);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = str;
                }
                else if (str4 == "1")
                {
                    result.set_success(200);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = str4;
                }
                else
                {
                    context.Session["user_state"] = "0";
                    result.set_success(200);
                    strResult = JsonHandle.ObjectToJson(result);
                }
            }
            agent_userinfo_session _session = new agent_userinfo_session();

            _session.set_u_id(_users.get_u_id());
            _session.set_u_name(_users.get_u_name().Trim());
            _session.set_u_psw(_users.get_u_psw().Trim());
            _session.set_u_nicker(_users.get_u_nicker().Trim());
            _session.set_u_skin(_users.get_u_skin().Trim());
            if (_child != null)
            {
                if (string.IsNullOrEmpty(_child.get_u_skin()))
                {
                    _session.set_u_skin("");
                }
                else
                {
                    _session.set_u_skin(_child.get_u_skin());
                }
            }
            _session.set_sup_name(_users.get_sup_name().Trim());
            _session.set_u_type(_users.get_u_type().Trim());
            _session.set_su_type(_users.get_su_type().Trim());
            _session.set_a_state(_users.get_a_state());
            _session.set_six_kind(_users.get_six_kind());
            _session.set_kc_kind(_users.get_kc_kind());
            _session.set_allow_sale(_users.get_allow_sale());
            _session.set_kc_allow_sale(_users.get_kc_allow_sale());
            _session.set_negative_sale(_users.get_negative_sale());
            if (!_users.get_allow_view_report().HasValue)
            {
                _session.set_allow_view_report(0);
            }
            else
            {
                _session.set_allow_view_report(_users.get_allow_view_report());
            }
            DataRow item = CallBLL.cz_admin_sysconfig_bll.GetItem();

            if (item == null)
            {
                _session.set_u_skin("Blue");
            }
            else
            {
                string str16 = item["agent_skin"].ToString();
                if (string.IsNullOrEmpty(_session.get_u_skin()) || (str16.IndexOf(_session.get_u_skin()) < 0))
                {
                    _session.set_u_skin(str16.Split(new char[] { '|' })[0]);
                }
            }
            if (_child != null)
            {
                _child.set_salt("");
            }
            _session.set_users_child_session(_child);
            DataTable zJInfo = CallBLL.cz_users_bll.GetZJInfo();

            if (zJInfo != null)
            {
                _session.set_zjname(zJInfo.Rows[0]["u_name"].ToString().Trim());
            }
            if (!_session.get_u_type().ToLower().Equals("zj"))
            {
                cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(_session.get_u_name());
                _session.set_fgs_name(rateKCByUserName.get_fgs_name());
                _session.set_gd_name(rateKCByUserName.get_gd_name());
                _session.set_zd_name(rateKCByUserName.get_zd_name());
                _session.set_dl_name(rateKCByUserName.get_dl_name());
                DataTable userOpOdds = CallBLL.cz_rate_kc_bll.GetUserOpOdds(_session.get_u_name());
                if (userOpOdds != null)
                {
                    if ((userOpOdds.Rows[0]["six_op_odds"] != null) && (userOpOdds.Rows[0]["six_op_odds"].ToString() != ""))
                    {
                        _session.set_six_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["six_op_odds"].ToString())));
                    }
                    if ((userOpOdds.Rows[0]["kc_op_odds"] != null) && (userOpOdds.Rows[0]["kc_op_odds"].ToString() != ""))
                    {
                        _session.set_kc_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["kc_op_odds"].ToString())));
                    }
                }
            }
            context.Session["child_user_name"] = null;
            if (_child != null)
            {
                context.Session["child_user_name"] = _child.get_u_name();
            }
            context.Session["user_name"] = _users.get_u_name();
            context.Session[_users.get_u_name() + "lottery_session_user_info"] = _session;
            PageBase.SetAppcationFlag(str5);
            if (FileCacheHelper.get_RedisStatOnline().Equals(1) || FileCacheHelper.get_RedisStatOnline().Equals(2))
            {
                bool flag6 = false;
                if ((_session.get_users_child_session() != null) && _session.get_users_child_session().get_is_admin().Equals(1))
                {
                    flag6 = true;
                }
                if (!flag6)
                {
                    if (FileCacheHelper.get_RedisStatOnline().Equals(1))
                    {
                        new PageBase_Redis().InitUserOnlineTopToRedis(str5, _session.get_u_type());
                    }
                    else if (FileCacheHelper.get_RedisStatOnline().Equals(2))
                    {
                        new PageBase_Redis().InitUserOnlineTopToRedisStack(str5, _session.get_u_type());
                    }
                }
            }
            else
            {
                MemberPageBase.stat_top_online(str5);
                MemberPageBase.stat_online(str5, _session.get_u_type());
            }
            if (FileCacheHelper.get_RedisStatOnline().Equals(0))
            {
                PageBase.ZeroIsOutFlag(str5);
            }
            CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(str5);
            cz_login_log _log = new cz_login_log();

            _log.set_ip(LSRequest.GetIP());
            _log.set_login_time(new DateTime?(DateTime.Now));
            _log.set_u_name(str5);
            new PageBase();
            _log.set_browser_type(Utils.GetBrowserInfo(HttpContext.Current));
            CallBLL.cz_login_log_bll.Add(_log);
            if (_child == null)
            {
                string str17 = _users.get_is_changed().ToString();
                if (string.IsNullOrEmpty(str17) || (str17 == "0"))
                {
                    result.set_success(550);
                    result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                    strResult = JsonHandle.ObjectToJson(result);
                    return;
                }
                DateTime?nullable = _users.get_last_changedate();
                int      num2     = PageBase.PasswordExpire();
                if (nullable.HasValue)
                {
                    nullable12 = nullable;
                    time4      = DateTime.Now.AddDays((double)-num2);
                    if (!(nullable12.HasValue ? (nullable12.GetValueOrDefault() < time4) : false))
                    {
                        goto Label_131D;
                    }
                }
                result.set_success(550);
                result.set_tipinfo("密碼過期,需重置密碼!");
                strResult = JsonHandle.ObjectToJson(result);
                return;
            }
            string str18 = _child.get_is_changed().ToString();

            if (string.IsNullOrEmpty(str18) || (str18 == "0"))
            {
                result.set_success(550);
                result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                strResult = JsonHandle.ObjectToJson(result);
                return;
            }
            DateTime?nullable2 = _child.get_last_changedate();
            int      num3      = PageBase.PasswordExpire();

            if (nullable2.HasValue)
            {
                nullable12 = nullable2;
                time4      = DateTime.Now.AddDays((double)-num3);
                if (!(nullable12.HasValue ? (nullable12.GetValueOrDefault() < time4) : false))
                {
                    goto Label_131D;
                }
            }
            result.set_success(550);
            result.set_tipinfo("密碼過期,需重置密碼!");
            strResult = JsonHandle.ObjectToJson(result);
            return;

Label_131D:
            dictionary.Add("uid", _session.get_u_id());
            DataTable lotteryList = base.GetLotteryList();

            string[] source = base.GetLotteryMasterID(lotteryList).Split(new char[] { ',' });
            int      num4   = 1;

            if (source.Contains <string>(num4.ToString()))
            {
                dictionary.Add("hasSix", 1);
            }
            else
            {
                dictionary.Add("hasSix", 0);
            }
            num4 = 2;
            if (source.Contains <string>(num4.ToString()))
            {
                dictionary.Add("hasKc", 1);
            }
            else
            {
                dictionary.Add("hasKc", 0);
            }
            dictionary.Add("utype", _session.get_u_type().ToLower());
            List <object> list = new List <object>();

            foreach (DataRow row2 in lotteryList.Rows)
            {
                string str20 = row2["lottery_name"].ToString();
                string s     = row2["id"].ToString();
                Dictionary <string, object> dictionary2 = new Dictionary <string, object>();
                dictionary2.Add("name", str20);
                dictionary2.Add("id", int.Parse(s));
                list.Add(dictionary2);
            }
            dictionary.Add("lotteryCfg", list);
            dictionary.Add("PasswordLU", ConfigurationManager.AppSettings["PasswordLU"]);
            dictionary.Add("roleCfg", MemberPageBase_Mobile.roleCfg);
            result.set_data(dictionary);
            strResult = JsonHandle.ObjectToJson(result);
        }
Exemple #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            agent_userinfo_session _session = this.Session[this.Session["user_name"].ToString() + "lottery_session_user_info"] as agent_userinfo_session;

            this.skin = _session.get_u_skin();
            string str  = LSRequest.qq("hdnsubmit");
            string str2 = LSRequest.qq("txtoldpwd");
            string str3 = LSRequest.qq("txtnewpwd");
            string str4 = LSRequest.qq("txtnewpwdcf");

            if (str.Equals("submit"))
            {
                if ((string.IsNullOrEmpty(str2) || string.IsNullOrEmpty(str3)) || string.IsNullOrEmpty(str4))
                {
                    base.Response.Write(base.ShowDialogBox("請輸入完整的密碼!", "", 400));
                    base.Response.End();
                }
                if (str3 == str2)
                {
                    base.Response.Write(base.ShowDialogBox("新密碼和舊密碼不能相同!", "", 400));
                    base.Response.End();
                }
                if (str3 != str4)
                {
                    base.Response.Write(base.ShowDialogBox("新密碼和確認新密碼不一致!", "", 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位,且必需包含大寫字母、小寫字母和数字!", "", 400));
                        base.Response.End();
                    }
                    else
                    {
                        base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含字母、和数字!", "", 400));
                        base.Response.End();
                    }
                    base.Response.End();
                }
                if (_session.get_users_child_session() == null)
                {
                    cz_users _users = CallBLL.cz_users_bll.AgentLogin(this.Session["user_name"].ToString());
                    if (_users != null)
                    {
                        string str5 = _users.get_salt().Trim();
                        string str6 = DESEncrypt.EncryptString(str2, str5);
                        if (_users.get_u_psw() != str6)
                        {
                            base.Response.Write(base.ShowDialogBox("您輸入原密碼不正確!", "", 400));
                            base.Response.End();
                        }
                        else
                        {
                            string ramSalt = Utils.GetRamSalt(6);
                            if (CallBLL.cz_users_bll.UpUserPwd(this.Session["user_name"].ToString(), DESEncrypt.EncryptString(str3, ramSalt), ramSalt) > 0)
                            {
                                int num = CallBLL.cz_users_bll.UpdateUserPwdStutas(this.Session["user_name"].ToString());
                                base.log_user_reset_password(this.Session["user_name"].ToString(), this.Session["user_name"].ToString(), "", this.Session["modifypassword"]);
                                this.Session["modifypassword"] = null;
                                string url = "Quit.aspx";
                                base.Response.Write(base.ShowDialogBox("修改密碼成功!", url, 0));
                                base.Response.End();
                            }
                            else
                            {
                                base.Response.Write(base.ShowDialogBox("修改密碼不成功!", "", 400));
                                base.Response.End();
                            }
                        }
                    }
                }
                else
                {
                    cz_users_child _child = CallBLL.cz_users_child_bll.AgentLogin(this.Session["child_user_name"].ToString().ToLower());
                    if (_child != null)
                    {
                        string str9  = _child.get_salt().Trim();
                        string str10 = DESEncrypt.EncryptString(str2, str9);
                        if (_child.get_u_psw() != str10)
                        {
                            base.Response.Write(base.ShowDialogBox("您輸入原密碼不正確!", "", 400));
                            base.Response.End();
                        }
                        else
                        {
                            string str11 = Utils.GetRamSalt(6);
                            if (CallBLL.cz_users_child_bll.UpUserPwd(this.Session["child_user_name"].ToString(), DESEncrypt.EncryptString(str3, str11), str11) > 0)
                            {
                                int num2 = CallBLL.cz_users_bll.UpdateUserPwdStutas(this.Session["child_user_name"].ToString().ToLower());
                                base.log_user_reset_password(this.Session["child_user_name"].ToString(), this.Session["child_user_name"].ToString(), "", this.Session["modifypassword"]);
                                this.Session["modifypassword"] = null;
                                string str12 = "Quit.aspx";
                                base.Response.Write(base.ShowDialogBox("修改密碼成功!", str12, 0));
                                base.Response.End();
                            }
                            else
                            {
                                base.Response.Write(base.ShowDialogBox("修改密碼不成功!", "", 400));
                                base.Response.End();
                            }
                        }
                    }
                }
            }
        }
Exemple #22
0
        private void userEditPwd(ref string strResult)
        {
            base.checkLoginByHandler(0);
            ReturnResult           result   = new ReturnResult();
            agent_userinfo_session _session = this.Session[this.Session["user_name"].ToString() + "lottery_session_user_info"] as agent_userinfo_session;
            string str  = LSRequest.qq("txtoldpwd");
            string str2 = LSRequest.qq("txtnewpwd");
            string str3 = LSRequest.qq("txtnewpwdcf");

            if ((string.IsNullOrEmpty(str) || string.IsNullOrEmpty(str2)) || string.IsNullOrEmpty(str3))
            {
                result.set_tipinfo("請輸入完整的密碼!");
                result.set_success(400);
                strResult = base.ObjectToJson(result);
            }
            else if (str2 == str)
            {
                result.set_tipinfo("新密碼和舊密碼不能相同!");
                result.set_success(400);
                strResult = base.ObjectToJson(result);
            }
            else if (str2 != str3)
            {
                result.set_tipinfo("新密碼和確認新密碼不一致!");
                result.set_success(400);
                strResult = base.ObjectToJson(result);
            }
            else if (!Regexlib.IsValidPassword(str2.Trim(), base.get_GetPasswordLU()))
            {
                if (base.get_GetPasswordLU().Equals("1"))
                {
                    result.set_tipinfo("密碼要8-20位,且必需包含大寫字母、小寫字母和数字!");
                    result.set_success(400);
                    strResult = base.ObjectToJson(result);
                }
                else
                {
                    result.set_tipinfo("密碼要8-20位,且必需包含字母、和数字!");
                    result.set_success(400);
                    strResult = base.ObjectToJson(result);
                }
            }
            else if (_session.get_users_child_session() == null)
            {
                cz_users _users = CallBLL.cz_users_bll.AgentLogin(this.Session["user_name"].ToString());
                if (_users != null)
                {
                    string str4 = _users.get_salt().Trim();
                    string str5 = DESEncrypt.EncryptString(str, str4);
                    if (_users.get_u_psw() != str5)
                    {
                        result.set_tipinfo("您輸入原密碼不正確!");
                        result.set_success(400);
                        strResult = base.ObjectToJson(result);
                    }
                    else
                    {
                        string ramSalt = Utils.GetRamSalt(6);
                        if (CallBLL.cz_users_bll.UpUserPwd(this.Session["user_name"].ToString(), DESEncrypt.EncryptString(str2, ramSalt), ramSalt) > 0)
                        {
                            int num = CallBLL.cz_users_bll.UpdateUserPwdStutas(this.Session["user_name"].ToString());
                            base.log_user_reset_password(this.Session["user_name"].ToString(), this.Session["user_name"].ToString(), "", this.Session["modifypassword"]);
                            this.Session["modifypassword"] = null;
                            this.Session.Abandon();
                            result.set_tipinfo("修改密碼成功!");
                            result.set_success(210);
                            strResult = base.ObjectToJson(result);
                        }
                        else
                        {
                            result.set_tipinfo("修改密碼失敗!");
                            result.set_success(400);
                            strResult = base.ObjectToJson(result);
                        }
                    }
                }
            }
            else
            {
                cz_users_child _child = CallBLL.cz_users_child_bll.AgentLogin(this.Session["child_user_name"].ToString().ToLower());
                if (_child != null)
                {
                    string str7 = _child.get_salt().Trim();
                    string str8 = DESEncrypt.EncryptString(str, str7);
                    if (_child.get_u_psw() != str8)
                    {
                        result.set_tipinfo("您輸入原密碼不正確!");
                        result.set_success(400);
                        strResult = base.ObjectToJson(result);
                    }
                    else
                    {
                        string str9 = Utils.GetRamSalt(6);
                        if (CallBLL.cz_users_child_bll.UpUserPwd(this.Session["child_user_name"].ToString(), DESEncrypt.EncryptString(str2, str9), str9) > 0)
                        {
                            int num2 = CallBLL.cz_users_bll.UpdateUserPwdStutas(this.Session["child_user_name"].ToString().ToLower());
                            base.log_user_reset_password(this.Session["child_user_name"].ToString(), this.Session["child_user_name"].ToString(), "", this.Session["modifypassword"]);
                            this.Session["modifypassword"] = null;
                            this.Session.Abandon();
                            result.set_tipinfo("修改密碼成功!");
                            result.set_success(210);
                            strResult = base.ObjectToJson(result);
                        }
                        else
                        {
                            result.set_tipinfo("修改密碼失敗!");
                            result.set_success(400);
                            strResult = base.ObjectToJson(result);
                        }
                    }
                }
            }
        }
Exemple #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            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"))
            {
                base.Response.Redirect("../MessagePage.aspx?code=u100035&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            base.Permission_Aspx_ZJ(this.userModel, "po_2_1");
            base.Permission_Aspx_DL(this.userModel, "po_6_1");
            this.lotteryDT = base.GetLotteryList();
            DataTable table = this.lotteryDT.DefaultView.ToTable(true, new string[] { "master_id" });

            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (Convert.ToInt32(table.Rows[i][0]).Equals(1))
                {
                    this.lottrty_six = table.Rows[i][0].ToString();
                }
                else if (Convert.ToInt32(table.Rows[i][0]).Equals(2))
                {
                    this.lottrty_kc = table.Rows[i][0].ToString();
                }
            }
            if (!string.IsNullOrEmpty(this.lottrty_six) && !string.IsNullOrEmpty(this.lottrty_kc))
            {
                this.tabState_six = "on";
            }
            else if (!string.IsNullOrEmpty(this.lottrty_six) && string.IsNullOrEmpty(this.lottrty_kc))
            {
                this.tabState_six = "on";
            }
            else if (string.IsNullOrEmpty(this.lottrty_six) && !string.IsNullOrEmpty(this.lottrty_kc))
            {
                this.tabState_kc = "on";
            }
            this.r_u_id = LSRequest.qq("uid");
            if (!Utils.IsGuid(this.r_u_id))
            {
                base.Response.Redirect("../MessagePage.aspx?code=u100079&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            cz_users userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(this.r_u_id, "gd");

            if (userInfoByUID == null)
            {
                base.Response.Redirect("../MessagePage.aspx?code=u100079&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            this.is_locked = base.is_locked_user(userInfoByUID.get_retry_times().ToString());
            this.InitData();
            if (this.d_u_name.Equals(this.userModel.get_u_name()))
            {
                base.Response.Redirect("../MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            if (!base.IsUpperLowerLevels(this.d_u_name, this.userModel.get_u_type(), this.userModel.get_u_name()))
            {
                base.Response.Redirect("../MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            if (LSRequest.qq("hdnadd").Equals("hdnadd") && !string.IsNullOrEmpty(this.d_u_name))
            {
                this.AddUser();
            }
        }
Exemple #24
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 #25
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 #26
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 #27
0
        private void getMemberDetail(ref string strResult)
        {
            bool flag2;
            bool flag3;

            base.checkLoginByHandler(0);
            this.r_u_id = LSRequest.qq("uid");
            string str  = LSRequest.qq("memberId");
            string str2 = LSRequest.qq("submitType");

            if (str != "zd")
            {
                base.Response.End();
            }
            ReturnResult result = new ReturnResult();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            new List <object>();
            string str3 = this.Session["user_name"].ToString();
            agent_userinfo_session _session = this.Session[str3 + "lottery_session_user_info"] as agent_userinfo_session;

            if (!Utils.IsGuid(this.r_u_id))
            {
                base.Response.End();
            }
            if ((!_session.get_u_type().Trim().Equals("zj") && !_session.get_u_type().Trim().Equals("fgs")) && !_session.get_u_type().Trim().Equals("gd"))
            {
                base.noRightOptMsg();
            }
            base.checkCloneRight();
            this.lotteryDT = base.GetLotteryList();
            DataTable table = this.lotteryDT.DefaultView.ToTable(true, new string[] { "master_id" });

            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (Convert.ToInt32(table.Rows[i][0]).Equals(1))
                {
                    this.lottrty_six = table.Rows[i][0].ToString();
                }
                else if (Convert.ToInt32(table.Rows[i][0]).Equals(2))
                {
                    this.lottrty_kc = table.Rows[i][0].ToString();
                }
            }
            cz_users userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(this.r_u_id, str);

            if (userInfoByUID == null)
            {
                base.Response.End();
            }
            bool flag = base.is_locked_user(userInfoByUID.get_retry_times().ToString());
            Dictionary <string, string> dictionary2 = new Dictionary <string, string>();
            Dictionary <string, string> dictionary3 = new Dictionary <string, string>();
            DataTable editGD = CallBLL.cz_rate_six_bll.GetEditGD(this.r_u_id, ref dictionary2);
            DataTable table3 = CallBLL.cz_rate_kc_bll.GetEditGD(this.r_u_id, ref dictionary3);

            if ((editGD == null) || (table3 == null))
            {
                base.Response.End();
            }
            this.d_u_name            = editGD.Rows[0]["u_name"].ToString();
            this.d_u_type            = editGD.Rows[0]["u_type"].ToString();
            this.d_u_nicker          = editGD.Rows[0]["u_nicker"].ToString();
            this.d_a_state           = editGD.Rows[0]["a_state"].ToString();
            this.d_allow_view_report = editGD.Rows[0]["allow_view_report"].ToString();
            this.d_six_credit        = string.Format("{0:F0}", Convert.ToDouble(editGD.Rows[0]["six_credit"].ToString()));
            this.d_six_usable_credit = string.Format("{0:F0}", Convert.ToDouble(editGD.Rows[0]["six_usable_credit"].ToString()));
            this.d_six_rate          = editGD.Rows[0]["six_rate"].ToString();
            this.d_six_allow_sale    = editGD.Rows[0]["allow_sale"].ToString();
            this.d_six_allow_maxrate = editGD.Rows[0]["six_allow_maxrate"].ToString();
            this.d_six_low_maxrate   = editGD.Rows[0]["six_low_maxrate"].ToString();
            if (string.IsNullOrEmpty(editGD.Rows[0]["six_kind"]))
            {
                this.d_six_kind = "0";
            }
            else
            {
                this.d_six_kind = editGD.Rows[0]["six_kind"].ToString();
            }
            if (string.IsNullOrEmpty(editGD.Rows[0]["six_iscash"]))
            {
                this.d_six_iscash = "0";
            }
            else
            {
                this.d_six_iscash = editGD.Rows[0]["six_iscash"].ToString();
            }
            this.d_six_ExistsBet        = CallBLL.cz_bet_six_bll.ExistsBetByUserName(this.d_u_type, this.d_u_name);
            this.d_six_OpenPhase        = CallBLL.cz_phase_six_bll.IsOpenPhase();
            this.d_up_u_name            = dictionary2["u_name"];
            this.d_up_u_nicker          = dictionary2["u_nicker"];
            this.d_up_u_type            = dictionary2["u_type"];
            this.d_up_six_allow_sale    = dictionary2["six_allow_sale"];
            this.d_up_six_usable_credit = dictionary2["six_usable_credit"];
            this.d_maxRate_six          = Convert.ToDouble(dictionary2["six_maxRate"].ToString());
            this.d_downRate_six         = Convert.ToDouble(dictionary2["six_downRate"].ToString());
            this.d_kc_credit            = string.Format("{0:F0}", Convert.ToDouble(table3.Rows[0]["kc_credit"].ToString()));
            this.d_kc_usable_credit     = string.Format("{0:F0}", Convert.ToDouble(table3.Rows[0]["kc_usable_credit"].ToString()));
            this.d_kc_rate          = table3.Rows[0]["kc_rate"].ToString();
            this.d_kc_allow_sale    = table3.Rows[0]["kc_allow_sale"].ToString();
            this.d_kc_allow_maxrate = table3.Rows[0]["kc_allow_maxrate"].ToString();
            this.d_kc_low_maxrate   = table3.Rows[0]["kc_low_maxrate"].ToString();
            if (string.IsNullOrEmpty(table3.Rows[0]["kc_kind"]))
            {
                this.d_kc_kind = "0";
            }
            else
            {
                this.d_kc_kind = table3.Rows[0]["kc_kind"].ToString();
            }
            if (string.IsNullOrEmpty(table3.Rows[0]["kc_iscash"]))
            {
                this.d_kc_iscash = "0";
            }
            else
            {
                this.d_kc_iscash = table3.Rows[0]["kc_iscash"].ToString();
            }
            this.d_kc_ExistsBet        = CallBLL.cz_bet_kc_bll.ExistsBetByUserName(this.d_u_type, this.d_u_name);
            this.d_kc_OpenPhase        = base.IsOpenPhase_KC();
            this.d_up_kc_allow_sale    = dictionary3["kc_allow_sale"];
            this.d_up_kc_usable_credit = dictionary3["kc_usable_credit"];
            this.d_maxRate_kc          = Convert.ToDouble(dictionary3["kc_maxRate"].ToString());
            this.d_downRate_kc         = Convert.ToDouble(dictionary3["kc_downRate"].ToString());
            if (this.d_u_name.Equals(_session.get_u_name()))
            {
                base.noRightOptMsg();
            }
            if (!base.IsUpperLowerLevels(this.d_u_name, _session.get_u_type(), _session.get_u_name()))
            {
                base.noRightOptMsg();
            }
            base.OpenLotteryMaster(out flag2, out flag3);
            if (str2 == "view")
            {
                if (flag2 && flag3)
                {
                    int num2 = (this.d_six_ExistsBet && this.d_six_OpenPhase) ? 0 : 1;
                    int num3 = (this.d_kc_ExistsBet && this.d_kc_OpenPhase) ? 0 : 1;
                    Dictionary <string, object> dictionary4 = new Dictionary <string, object>();
                    dictionary4.Add("disabledKc", num3.ToString());
                    dictionary4.Add("disabledSix", num2.ToString());
                    dictionary4.Add("supName", this.d_up_u_name);
                    dictionary4.Add("supNameNicker", this.d_up_u_nicker);
                    dictionary4.Add("name", this.d_u_name);
                    dictionary4.Add("isLocked", flag ? "1" : "0");
                    dictionary4.Add("userState", this.d_a_state);
                    dictionary4.Add("nicker", this.d_u_nicker);
                    dictionary4.Add("userCreditSix", this.d_six_credit);
                    dictionary4.Add("recoverCreditSix", this.d_six_usable_credit);
                    dictionary4.Add("supCreditSix", string.Format("{0:F0}", Convert.ToDouble(this.d_up_six_usable_credit)));
                    dictionary4.Add("userRateSix", this.d_six_rate);
                    dictionary4.Add("maxRateSix", this.d_maxRate_six.ToString());
                    dictionary4.Add("allowMaxRateSix", this.d_six_allow_maxrate);
                    dictionary4.Add("downRateSix", this.d_downRate_six.ToString());
                    dictionary4.Add("userAllowSaleSix", this.d_six_allow_sale);
                    dictionary4.Add("userKindSix", this.d_six_kind);
                    dictionary4.Add("isCashSix", this.d_six_iscash);
                    dictionary4.Add("userCreditKc", this.d_kc_credit);
                    dictionary4.Add("recoverCreditKc", this.d_kc_usable_credit);
                    dictionary4.Add("supCreditKc", string.Format("{0:F0}", Convert.ToDouble(this.d_up_kc_usable_credit)));
                    dictionary4.Add("userRateKc", this.d_kc_rate);
                    dictionary4.Add("maxRateKc", this.d_maxRate_kc.ToString());
                    dictionary4.Add("allowMaxRateKc", this.d_kc_allow_maxrate);
                    dictionary4.Add("downRateKc", this.d_downRate_kc.ToString());
                    dictionary4.Add("userAllowSaleKc", this.d_kc_allow_sale);
                    dictionary4.Add("userKindKc", this.d_kc_kind);
                    dictionary4.Add("isCashKc", this.d_kc_iscash);
                    dictionary4.Add("date", userInfoByUID.get_add_date());
                    dictionary = dictionary4;
                }
                else if (flag2)
                {
                    int num4 = (this.d_six_ExistsBet && this.d_six_OpenPhase) ? 0 : 1;
                    Dictionary <string, object> dictionary5 = new Dictionary <string, object>();
                    dictionary5.Add("disabledSix", num4.ToString());
                    dictionary5.Add("supName", this.d_up_u_name);
                    dictionary5.Add("supNameNicker", this.d_up_u_nicker);
                    dictionary5.Add("name", this.d_u_name);
                    dictionary5.Add("isLocked", flag ? "1" : "0");
                    dictionary5.Add("userState", this.d_a_state);
                    dictionary5.Add("nicker", this.d_u_nicker);
                    dictionary5.Add("userCreditSix", this.d_six_credit);
                    dictionary5.Add("recoverCreditSix", this.d_six_usable_credit);
                    dictionary5.Add("supCreditSix", string.Format("{0:F0}", Convert.ToDouble(this.d_up_six_usable_credit)));
                    dictionary5.Add("userRateSix", this.d_six_rate);
                    dictionary5.Add("maxRateSix", this.d_maxRate_six.ToString());
                    dictionary5.Add("allowMaxRateSix", this.d_six_allow_maxrate);
                    dictionary5.Add("downRateSix", this.d_downRate_six.ToString());
                    dictionary5.Add("userAllowSaleSix", this.d_six_allow_sale);
                    dictionary5.Add("userKindSix", this.d_six_kind);
                    dictionary5.Add("isCashSix", this.d_six_iscash);
                    dictionary5.Add("date", userInfoByUID.get_add_date());
                    dictionary = dictionary5;
                }
                else if (flag3)
                {
                    int num5 = (this.d_kc_ExistsBet && this.d_kc_OpenPhase) ? 0 : 1;
                    Dictionary <string, object> dictionary6 = new Dictionary <string, object>();
                    dictionary6.Add("disabledKc", num5.ToString());
                    dictionary6.Add("supName", this.d_up_u_name);
                    dictionary6.Add("supNameNicker", this.d_up_u_nicker);
                    dictionary6.Add("name", this.d_u_name);
                    dictionary6.Add("isLocked", flag ? "1" : "0");
                    dictionary6.Add("userState", this.d_a_state);
                    dictionary6.Add("nicker", this.d_u_nicker);
                    dictionary6.Add("userCreditKc", this.d_kc_credit);
                    dictionary6.Add("recoverCreditKc", this.d_kc_usable_credit);
                    dictionary6.Add("supCreditKc", string.Format("{0:F0}", Convert.ToDouble(this.d_up_kc_usable_credit)));
                    dictionary6.Add("userRateKc", this.d_kc_rate);
                    dictionary6.Add("maxRateKc", this.d_maxRate_kc.ToString());
                    dictionary6.Add("allowMaxRateKc", this.d_kc_allow_maxrate);
                    dictionary6.Add("downRateKc", this.d_downRate_kc.ToString());
                    dictionary6.Add("userAllowSaleKc", this.d_kc_allow_sale);
                    dictionary6.Add("userKindKc", this.d_kc_kind);
                    dictionary6.Add("isCashKc", this.d_kc_iscash);
                    dictionary6.Add("date", userInfoByUID.get_add_date());
                    dictionary = dictionary6;
                }
                result.set_success(200);
                result.set_data(dictionary);
                strResult = base.ObjectToJson(result);
            }
            else if ((str2 == "edit") && !string.IsNullOrEmpty(this.d_u_name))
            {
                this.AddUser();
            }
        }
Exemple #28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();
            agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;

            this.skin      = _session.get_u_skin();
            this.lotteryDT = base.GetLotteryList();
            this.lotteryId = LSRequest.qq("lid");
            this.mId       = LSRequest.qq("mid");
            this.uid       = LSRequest.qq("uid");
            int num = 1;

            if (!this.mId.Equals(num.ToString()))
            {
                base.Response.Redirect(string.Format("/AutoLet/AutoLet_Show_kc.aspx?uid={0}&mid={1}", this.uid, this.mId), true);
            }
            this.cz_users_model = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid);
            if (this.cz_users_model == null)
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100038&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            if (!this.cz_users_model.get_allow_sale().Equals(1))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100037&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            if (!_session.get_u_type().Equals("zj") && !base.IsUpperLowerLevels(this.cz_users_model.get_u_name(), _session.get_u_type(), _session.get_u_name()))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            DataTable play = null;

            if (!FileCacheHelper.get_IsShowLM_B())
            {
                play = CallBLL.cz_play_six_bll.GetPlay("91060,91061,91062,91063,91064,91065");
            }
            else
            {
                play = CallBLL.cz_play_six_bll.GetPlay();
            }
            if (play != null)
            {
                this.play_Row = play.Select(" play_id <>91002 and play_id <>91015 ");
            }
            DataSet autosaleByUserName = null;

            if (!FileCacheHelper.get_IsShowLM_B())
            {
                autosaleByUserName = CallBLL.cz_autosale_six_bll.GetAutosaleByUserName(this.cz_users_model.get_u_name(), "91060,91061,91062,91063,91064,91065");
            }
            else
            {
                autosaleByUserName = CallBLL.cz_autosale_six_bll.GetAutosaleByUserName(this.cz_users_model.get_u_name());
            }
            if (((autosaleByUserName != null) && (autosaleByUserName.Tables.Count > 0)) && (autosaleByUserName.Tables[0].Rows.Count > 0))
            {
                this.Autosale_DT = autosaleByUserName.Tables[0];
            }
        }
Exemple #29
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 #30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();

            this.userModel = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;
            this.lotteryDT = base.GetLotteryList();
            if (base.GetLotteryMasterID(this.lotteryDT).Split(new char[] { ',' }).Length > 1)
            {
                this.bol_masterid = true;
            }
            if (!base.GetMasterLotteryIsOpen(this.lotteryDT, 1))
            {
                base.Response.End();
            }
            this.uid        = LSRequest.qq("uid");
            this.mlid       = LSRequest.qq("mlid");
            this.ispc       = LSRequest.qq("isPc");
            this.mlid       = 1.ToString();
            this.edit_model = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid);
            if (!this.edit_model.get_six_iscash().Equals(int.Parse("1")))
            {
                base.Response.End();
            }
            base.Permission_Aspx_ZJ(this.userModel, "po_2_1");
            base.Permission_Aspx_DL(this.userModel, "po_6_1");
            if (this.edit_model.get_u_name().Equals(this.userModel.get_u_name()))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=0");
                base.Response.End();
            }
            if (!base.IsUpperLowerLevels(this.edit_model.get_u_name(), this.userModel.get_u_type(), this.userModel.get_u_name()))
            {
                if (this.ispc.Equals("1"))
                {
                    base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=1");
                    base.Response.End();
                }
                else
                {
                    base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=0");
                    base.Response.End();
                }
            }
            this.up_edit_model = CallBLL.cz_users_bll.GetUserInfoByUName(this.edit_model.get_sup_name());
            string str3 = LSRequest.qq("hdn_recharge");
            string s    = LSRequest.qq("txt_recharge");

            if (str3.Equals("rhrg"))
            {
                this.Hy_SubmitCreditLock();
                cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(this.edit_model.get_u_name());
                base.En_User_Lock(rateKCByUserName.get_fgs_name());
                this.up_edit_model = CallBLL.cz_users_bll.GetUserInfoByUName(this.edit_model.get_sup_name());
                if (!Utils.IsDouble(s))
                {
                    if (this.ispc.Equals("1"))
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        this.Hy_DeleteCreditLock();
                        base.Response.Write(base.ShowDialogBox("(⑥)充值格式不正確!", "", 400));
                        base.Response.End();
                    }
                    else
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        this.Hy_DeleteCreditLock();
                        base.Response.Write(string.Format("<script>alert('{0}');</script>", "(⑥)充值格式不正確!"));
                        base.Response.End();
                    }
                }
                if (double.Parse(s) < 1.0)
                {
                    if (this.ispc.Equals("1"))
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        this.Hy_DeleteCreditLock();
                        base.Response.Write(base.ShowDialogBox("(⑥)充值金額不能小於1!", "", 400));
                        base.Response.End();
                    }
                    else
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        this.Hy_DeleteCreditLock();
                        base.Response.Write(string.Format("<script>alert('{0}');</script>", "(⑥)充值金額不能小於1!"));
                        base.Response.End();
                    }
                }
                if (!this.up_edit_model.get_u_type().Equals("zj"))
                {
                    decimal num3 = decimal.Parse(s);
                    if (num3 > this.up_edit_model.get_six_usable_credit())
                    {
                        if (this.ispc.Equals("1"))
                        {
                            base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                            this.Hy_DeleteCreditLock();
                            base.Response.Write(base.ShowDialogBox("(⑥)充值金額不能大於 “上級可用餘額” !", "", 400));
                            base.Response.End();
                        }
                        else
                        {
                            base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                            this.Hy_DeleteCreditLock();
                            base.Response.Write(string.Format("<script>alert('{0}');</script>", "(⑥)充值金額不能大於 “上級可用餘額” !"));
                            base.Response.End();
                        }
                    }
                }
                string         random = Utils.GetRandom();
                cz_credit_flow _flow  = new cz_credit_flow();
                _flow.set_master_id(new int?(int.Parse(this.mlid)));
                _flow.set_credit_old(this.edit_model.get_six_usable_credit());
                decimal?nullable3 = this.edit_model.get_six_usable_credit();
                decimal num4      = decimal.Parse(s);
                _flow.set_credit_new(nullable3.HasValue ? new decimal?(nullable3.GetValueOrDefault() + num4) : null);
                _flow.set_credit_change(new decimal?(decimal.Parse(s)));
                _flow.set_u_name(this.edit_model.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(0);
                _flow.set_ip(LSRequest.GetIP());
                cz_credit_flow _flow2 = new cz_credit_flow();
                _flow2.set_master_id(new int?(int.Parse(this.mlid)));
                _flow2.set_credit_old(this.up_edit_model.get_six_usable_credit());
                decimal?nullable5 = this.up_edit_model.get_six_usable_credit();
                decimal num5      = decimal.Parse(s);
                _flow2.set_credit_new(nullable5.HasValue ? new decimal?(nullable5.GetValueOrDefault() - num5) : null);
                _flow2.set_credit_change(new decimal?(-decimal.Parse(s)));
                _flow2.set_u_name(this.up_edit_model.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(this.edit_model.get_u_name());
                _flow2.set_isphone(0);
                _flow2.set_ip(LSRequest.GetIP());
                if (CallBLL.cz_users_bll.UserRecharge(this.up_edit_model.get_u_type(), this.up_edit_model.get_u_id(), this.edit_model.get_u_id(), double.Parse(s), _flow, _flow2) > 0)
                {
                    if (this.ispc.Equals("1"))
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        this.Hy_DeleteCreditLock();
                        base.Response.Write(base.ShowDialogBox("(⑥)充值成功!", base.UserReturnBackUrl, 3));
                        base.Response.End();
                    }
                    else
                    {
                        base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                        this.Hy_DeleteCreditLock();
                        base.Response.Write(string.Format("<script>alert('{0}');location.href='{1}';</script>", "(⑥)充值成功!", base.UserReturnBackUrl));
                        base.Response.End();
                    }
                }
                else if (this.ispc.Equals("1"))
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    this.Hy_DeleteCreditLock();
                    base.Response.Write(base.ShowDialogBox("(⑥)充值失敗!", "", 400));
                    base.Response.End();
                }
                else
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    this.Hy_DeleteCreditLock();
                    base.Response.Write(string.Format("<script>alert('{0}');</script>", "(⑥)充值失敗!"));
                    base.Response.End();
                }
            }
        }