Ejemplo n.º 1
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();
            }
        }