protected void Page_Load(object sender, EventArgs e) { string str = this.Session["user_name"].ToString(); this.uModel = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; if (!this.uModel.get_u_type().Equals("fgs")) { base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0"); base.Response.End(); } if (this.uModel.get_u_type().Equals("fgs") && (this.uModel.get_six_op_odds().Equals(1) || this.uModel.get_kc_op_odds().Equals(1))) { base.Permission_Aspx_DL(this.uModel, "po_5_3"); } else { base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0"); base.Response.End(); } this.lid = LSRequest.qq("lid"); this.lotteryDT = base.GetLotteryList(); base.IsLotteryExist(this.lid, "u100032", "1", ""); if (!this.uModel.get_six_op_odds().Equals(1)) { int num2 = 100; if (this.lid.Equals(num2.ToString())) { this.lid = this.lotteryDT.Select(string.Format(" id<>{0} ", 100))[0]["id"].ToString(); } } if (!this.uModel.get_kc_op_odds().Equals(1)) { int num3 = 100; if (!this.lid.Equals(num3.ToString())) { this.lid = 100.ToString(); } } this.InitSelect(this.lid); this.InitDataTable(); if (!LSRequest.qq("submitHdn").Equals("submit")) { return; } int num = 0; if (this.uModel.get_six_op_odds().Equals(1)) { int num5 = 100; if (this.lid.Equals(num5.ToString())) { num = CallBLL.cz_odds_wt_six_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(100); } } if (this.uModel.get_kc_op_odds().Equals(1)) { int num6 = 100; if (!this.lid.Equals(num6.ToString()) && (this.lotteryDT.Select(string.Format(" id={0} ", this.lid)).Length > 0)) { switch (int.Parse(this.lid)) { case 0: num = CallBLL.cz_odds_wt_kl10_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(0); goto Label_0645; case 1: num = CallBLL.cz_odds_wt_cqsc_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(1); goto Label_0645; case 2: num = CallBLL.cz_odds_wt_pk10_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(2); goto Label_0645; case 3: num = CallBLL.cz_odds_wt_xync_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(3); goto Label_0645; case 4: num = CallBLL.cz_odds_wt_jsk3_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(4); goto Label_0645; case 5: num = CallBLL.cz_odds_wt_kl8_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(5); goto Label_0645; case 6: num = CallBLL.cz_odds_wt_k8sc_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(6); goto Label_0645; case 7: num = CallBLL.cz_odds_wt_pcdd_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(7); goto Label_0645; case 8: num = CallBLL.cz_odds_wt_pkbjl_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(8); goto Label_0645; case 9: num = CallBLL.cz_odds_wt_xyft5_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(9); goto Label_0645; case 10: num = CallBLL.cz_odds_wt_jscar_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(10); goto Label_0645; case 11: num = CallBLL.cz_odds_wt_speed5_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(11); goto Label_0645; case 12: num = CallBLL.cz_odds_wt_jspk10_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(12); goto Label_0645; case 13: num = CallBLL.cz_odds_wt_jscqsc_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(13); goto Label_0645; case 14: num = CallBLL.cz_odds_wt_jssfc_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(14); goto Label_0645; case 15: num = CallBLL.cz_odds_wt_jsft2_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(15); goto Label_0645; case 0x10: num = CallBLL.cz_odds_wt_car168_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(0x10); goto Label_0645; case 0x11: num = CallBLL.cz_odds_wt_ssc168_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(0x11); goto Label_0645; case 0x12: num = CallBLL.cz_odds_wt_vrcar_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(0x12); goto Label_0645; case 0x13: num = CallBLL.cz_odds_wt_vrssc_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(0x13); goto Label_0645; case 20: num = CallBLL.cz_odds_wt_xyftoa_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(20); goto Label_0645; case 0x15: num = CallBLL.cz_odds_wt_xyftsg_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(0x15); goto Label_0645; case 0x16: num = CallBLL.cz_odds_wt_happycar_bll.RestOddsWT(this.uModel.get_u_name()); FileCacheHelper.UpdateFGSWTFile(0x16); goto Label_0645; } base.Response.End(); } } Label_0645: if (num <= 0) { string url = "/OddsSet/OddsWT.aspx?lid=" + this.lid; base.Response.Write(base.ShowDialogBox(string.Format(PageBase.GetMessageByCache("u100073", "MessageHint"), base.GetGameNameByID(this.lid)), url, 0)); base.Response.End(); } else { switch (int.Parse(this.lid)) { case 0: base.fgs_reset_zero_wt_log(0); break; case 1: base.fgs_reset_zero_wt_log(1); break; case 2: base.fgs_reset_zero_wt_log(2); break; case 3: base.fgs_reset_zero_wt_log(3); break; case 4: base.fgs_reset_zero_wt_log(4); break; case 5: base.fgs_reset_zero_wt_log(5); break; case 6: base.fgs_reset_zero_wt_log(6); break; case 7: base.fgs_reset_zero_wt_log(7); break; case 8: base.fgs_reset_zero_wt_log(8); break; case 9: base.fgs_reset_zero_wt_log(9); break; case 10: base.fgs_reset_zero_wt_log(10); break; case 11: base.fgs_reset_zero_wt_log(11); break; case 12: base.fgs_reset_zero_wt_log(12); break; case 13: base.fgs_reset_zero_wt_log(13); break; case 14: base.fgs_reset_zero_wt_log(14); break; case 15: base.fgs_reset_zero_wt_log(15); break; case 0x10: base.fgs_reset_zero_wt_log(0x10); break; case 0x11: base.fgs_reset_zero_wt_log(0x11); break; case 0x12: base.fgs_reset_zero_wt_log(0x12); break; case 0x13: base.fgs_reset_zero_wt_log(0x13); break; case 20: base.fgs_reset_zero_wt_log(20); break; case 0x15: base.fgs_reset_zero_wt_log(0x15); break; case 0x16: base.fgs_reset_zero_wt_log(0x16); break; case 100: base.fgs_reset_zero_wt_log(100); break; default: base.Response.End(); break; } string str3 = string.Format("/OddsSet/OddsWT.aspx?lid={0}&rest=1", this.lid); base.Response.Write(base.ShowDialogBox(string.Format(PageBase.GetMessageByCache("u100072", "MessageHint"), base.GetGameNameByID(this.lid)), str3, 0)); base.Response.End(); } }
private void AddUser() { string str = LSRequest.qq("userState"); string str2 = LSRequest.qq("password"); string str3 = LSRequest.qq("nicker"); string str4 = LSRequest.qq("userReport"); string str5 = LSRequest.qq("isLocked"); string s = LSRequest.qq("userCreditSix"); if (this.d_six_iscash.Equals("1")) { s = this.d_six_credit; } string str7 = LSRequest.qq("userRateSix"); string str8 = LSRequest.qq("userAllowSaleSix"); string str9 = LSRequest.qq("userRateOwnerSix"); string str10 = LSRequest.qq("userKindSix"); string str11 = LSRequest.qq("opSix"); string str12 = "0"; string str13 = LSRequest.qq("userCreditKc"); if (this.d_kc_iscash.Equals("1")) { str13 = this.d_kc_credit; } string str14 = LSRequest.qq("userRateKc"); string str15 = LSRequest.qq("userAllowSaleKc"); string str16 = LSRequest.qq("userRateOwnerKc"); string str17 = LSRequest.qq("userKindKc"); string str18 = LSRequest.qq("opKc"); string str19 = "0"; string message = ""; if (!base.ValidParamByUserEditPhone("fgs", 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 (!str4.ToUpper().Equals("0") && !str4.ToUpper().Equals("1")) { base.Response.End(); } if (!str11.ToUpper().Equals("0") && !str11.ToUpper().Equals("1")) { base.Response.End(); } if (!str18.ToUpper().Equals("0") && !str18.ToUpper().Equals("1")) { base.Response.End(); } if (!str19.Equals("0") && !str19.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 ((!str17.ToUpper().Equals("A") && !str17.ToUpper().Equals("B")) && (!str17.ToUpper().Equals("C") && !str17.ToUpper().Equals("0"))) { base.Response.End(); } if (!str15.ToUpper().Equals("0") && !str15.ToUpper().Equals("1")) { base.Response.End(); } if (!str16.ToUpper().Equals("0") && !str16.ToUpper().Equals("1")) { base.Response.End(); } } base.En_User_Lock(this.d_u_name); double num = 0.0; if (!string.IsNullOrEmpty(this.lottrty_six)) { if (!string.IsNullOrEmpty(this.lottrty_six) && (double.Parse(str7) < double.Parse(base.get_ZJMinRate_SIX()))) { base.Un_User_Lock(this.d_u_name); base.noRightOptMsg("⑥合彩:總監占成不可低於 " + base.get_ZJMinRate_SIX() + "% ,請重新設定!"); } if (double.Parse(str7) > this.d_maxRate_six) { base.Un_User_Lock(this.d_u_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(this.d_u_name); base.noRightOptMsg("⑥合彩: 設定減少‘信用額度’超過可‘回收’餘額!!"); } } double num2 = 0.0; if (!string.IsNullOrEmpty(this.lottrty_kc)) { if (!string.IsNullOrEmpty(this.lottrty_kc) && (double.Parse(str14) < double.Parse(base.get_ZJMinRate_KC()))) { base.Un_User_Lock(this.d_u_name); base.noRightOptMsg("快彩:總監占成不可低於 " + base.get_ZJMinRate_KC() + "% ,請重新設定!"); } if (double.Parse(str14) > this.d_maxRate_kc) { base.Un_User_Lock(this.d_u_name); base.noRightOptMsg("快彩:總監占成 數不正确,请核实后重新输入!"); } num2 = double.Parse(str13) - double.Parse(this.d_kc_credit); if (double.Parse(str13) < (double.Parse(this.d_kc_credit) - Convert.ToDouble(this.d_kc_usable_credit))) { base.Un_User_Lock(this.d_u_name); base.noRightOptMsg("快彩: 設定減少‘信用額度’超過可‘回收’餘額!!"); } } int num3 = 0; decimal num4 = 0M; decimal num5 = 0M; if (!string.IsNullOrEmpty(this.lottrty_six)) { num3 = Convert.ToInt32(str7); 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(str14); 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(str5) && (str5 == "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_allow_view_report(new int?(Convert.ToInt32(str4))); _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(str8))); _users.set_six_rate_owner(new int?(Convert.ToInt32(str9))); _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(str15))); _users.set_kc_rate_owner(new int?(Convert.ToInt32(str16))); _users.set_six_op_odds(new int?(Convert.ToInt32(str11))); _users.set_kc_op_odds(new int?(Convert.ToInt32(str18))); if (base.get_GetIsShowFgsWT().Equals("0")) { _users.set_six_op_odds(0); _users.set_kc_op_odds(0); } _users.set_kc_isauto_back(new int?(Convert.ToInt32(str19))); _users.set_six_isauto_back(new int?(Convert.ToInt32(str12))); bool flag2 = true; bool flag3 = true; bool flag4 = false; bool flag5 = false; if (str8.Equals("0") && this.d_six_allow_sale.Equals("1")) { flag4 = true; } if (str15.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.UpdateUserInfoFGS(_users, flag2, flag3, flag4, flag5)) { if (!_users.get_six_op_odds().Equals(1)) { base.RestOddsWT(100, 1, _users.get_u_name()); } if (!_users.get_kc_op_odds().Equals(1)) { base.RestOddsWT(null, 2, _users.get_u_name()); } if (!_users.get_six_op_odds().Equals(int.Parse(this.d_six_op_odds)) || !_users.get_kc_op_odds().Equals(int.Parse(this.d_kc_op_odds))) { if (FileCacheHelper.get_RedisStatOnline().Equals(1)) { base.UpdateIsOutOpts(_users.get_u_name()); } else if (FileCacheHelper.get_RedisStatOnline().Equals(2)) { base.UpdateIsOutOptsStack(_users.get_u_name()); } else { CallBLL.cz_stat_online_bll.UpdateIsOutByFgsName(_users.get_u_name()); } FileCacheHelper.UpdateUserOutFile(); if (!_users.get_six_op_odds().Equals(int.Parse(this.d_six_op_odds))) { FileCacheHelper.UpdateFGSWTFile(1, ""); } if (!_users.get_kc_op_odds().Equals(int.Parse(this.d_kc_op_odds))) { FileCacheHelper.UpdateFGSWTFile(2, ""); } } 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_fgs_log(userInfoTableByUID, CallBLL.cz_users_bll.GetUserInfoTableByUID(this.r_u_id), _users.get_u_name()); base.Un_User_Lock(this.d_u_name); base.successOptMsg("已經成功修改分公司!"); } else { base.Un_User_Lock(this.d_u_name); base.noRightOptMsg("修改分公司失敗!"); } }