private void getDrawBack(ref string strResult) { base.checkLoginByHandler(0); 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")) { base.Response.End(); } if (!base.IsOpenBigLottery(1)) { base.Response.End(); } base.Permission_Aspx_ZJ(this.userModel, "po_2_3"); if ((this.userModel.get_users_child_session() != null) && (this.userModel.get_users_child_session().get_permissions_name().IndexOf("po_2_3") < 0)) { base.Response.End(); } this.userid = LSRequest.qq("uid"); this.newAdd = LSRequest.qq("isadd"); string str2 = LSRequest.qq("submitType"); if ((str2 != "view") && (str2 != "edit")) { base.Response.End(); } this.newAdd = "0"; this.cz_saleset_six_model = CallBLL.cz_saleset_six_bll.GetModel(this.userid); ReturnResult result = new ReturnResult(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); if (this.cz_saleset_six_model == null) { base.Response.End(); } 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)) { this.tabState_six = "on"; } else { base.Response.Redirect("/Quit.aspx"); } if (this.cz_saleset_six_model.get_six_kind().ToLower() != "0") { if (this.cz_saleset_six_model.get_six_kind().ToLower() != "a") { this.pk_six_a = "display:none;"; } if (this.cz_saleset_six_model.get_six_kind().ToLower() != "b") { this.pk_six_b = "display:none;"; } if (this.cz_saleset_six_model.get_six_kind().ToLower() != "c") { this.pk_six_c = "display:none;"; } } else { this.pk_six_a = "display:;"; this.pk_six_b = "display:;"; this.pk_six_c = "display:;"; } this.InitData(); this.InitShortCut_SIX(this.cz_saleset_six_model.get_six_kind(), this.cz_saleset_six_model); switch (str2) { case "view": { string str3 = "1"; Dictionary <string, object> dictionary2 = new Dictionary <string, object>(); dictionary2.Add("disabled", str3); dictionary2.Add("userKind", this.cz_saleset_six_model.get_six_kind()); dictionary2.Add("A", this.six_tm_pk_a); dictionary2.Add("B", this.six_tm_pk_b); dictionary2.Add("C", this.six_tm_pk_c); dictionary2.Add("dzMaxAmount", this.six_tm_max_amount); dictionary2.Add("dqMaxAmount", this.six_tm_phase_amount); dictionary2.Add("dzMinAmount", this.six_tm_single_min_amount); dictionary.Add("SixTM", dictionary2); Dictionary <string, object> dictionary3 = new Dictionary <string, object>(); dictionary3.Add("disabled", str3); dictionary3.Add("userKind", this.cz_saleset_six_model.get_six_kind()); dictionary3.Add("A", this.six_lmp_pk_a); dictionary3.Add("B", this.six_lmp_pk_b); dictionary3.Add("C", this.six_lmp_pk_c); dictionary3.Add("dzMaxAmount", this.six_lmp_max_amount); dictionary3.Add("dqMaxAmount", this.six_lmp_phase_amount); dictionary3.Add("dzMinAmount", this.six_lmp_single_min_amount); dictionary.Add("SixLMP", dictionary3); Dictionary <string, object> dictionary4 = new Dictionary <string, object>(); dictionary4.Add("disabled", str3); dictionary4.Add("userKind", this.cz_saleset_six_model.get_six_kind()); dictionary4.Add("A", this.six_lm_pk_a); dictionary4.Add("B", this.six_lm_pk_b); dictionary4.Add("C", this.six_lm_pk_c); dictionary4.Add("dzMaxAmount", this.six_lm_max_amount); dictionary4.Add("dqMaxAmount", this.six_lm_phase_amount); dictionary4.Add("dzMinAmount", this.six_lm_single_min_amount); dictionary.Add("SixLM", dictionary4); result.set_success(200); dictionary.Add("name", this.cz_saleset_six_model.get_u_name()); result.set_data(dictionary); strResult = base.ObjectToJson(result); return; } case "edit": { base.En_User_Lock(this.cz_saleset_six_model.get_u_name()); this.PreDoParam(ref this.namestr); this.GetModifyPlays(this.namestr); string mess = ""; if ((this.table_six != null) && !string.IsNullOrEmpty(this.six_modify_playid)) { this.ValidSix(); this.UpdateSix(ref mess); if (!this.newAdd.Equals("1")) { FileCacheHelper.UpdateDrawbackFile(100); } } base.Un_User_Lock(this.cz_saleset_six_model.get_u_name()); if (!string.IsNullOrEmpty(mess)) { base.successOptMsg(mess); return; } base.successOptMsg("無數據修改!"); break; } } }
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"); LSRequest.qq("userAllowSaleSix"); string str7 = LSRequest.qq("userKindSix"); string str8 = "0"; string str9 = "0"; string str10 = LSRequest.qq("userCreditKc"); if (this.d_kc_iscash.Equals("1")) { str10 = this.d_kc_credit; } string str11 = LSRequest.qq("userRateKc"); LSRequest.qq("userAllowSaleKc"); string str12 = LSRequest.qq("userKindKc"); string str13 = "0"; string str14 = "0"; string message = ""; if (!base.ValidParamByUserEditPhone("hy", ref message, null, this.lottrty_six, this.lottrty_kc)) { base.DeleteCreditLock(this.d_u_name); base.noRightOptMsg(message); } if (!string.IsNullOrEmpty(str2.Trim()) && !Regexlib.IsValidPassword(str2.Trim(), base.get_GetPasswordLU())) { if (base.get_GetPasswordLU().Equals("1")) { base.DeleteCreditLock(this.d_u_name); base.noRightOptMsg("密碼要8-20位,且必需包含大寫字母、小寫字母和数字!"); } else { base.DeleteCreditLock(this.d_u_name); base.noRightOptMsg("密碼要8-20位,且必需包含字母、和数字!"); } } if ((!str.Equals("0") && !str.Equals("1")) && !str.Equals("2")) { base.DeleteCreditLock(this.d_u_name); base.Response.End(); } if ((!string.IsNullOrEmpty(this.lottrty_six) && !str7.ToUpper().Equals("A")) && (!str7.ToUpper().Equals("B") && !str7.ToUpper().Equals("C"))) { base.DeleteCreditLock(this.d_u_name); base.Response.End(); } if ((!string.IsNullOrEmpty(this.lottrty_kc) && !str12.ToUpper().Equals("A")) && (!str12.ToUpper().Equals("B") && !str12.ToUpper().Equals("C"))) { base.DeleteCreditLock(this.d_u_name); 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.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.noRightOptMsg("⑥合彩: 設定增加‘信用額度’超過上级可以用餘額!"); } if (double.Parse(str6) > this.d_maxRate_six) { base.DeleteCreditLock(this.d_u_name); 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.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.noRightOptMsg("⑥合彩: 設定減少‘信用額度’超過可‘回收’餘額!"); } if (str8.Equals("1")) { if (string.IsNullOrEmpty(str9)) { base.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.noRightOptMsg("⑥合彩:‘占成上限’不可為空,請修改!"); } try { if (Convert.ToInt32(str9) > 100) { base.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.noRightOptMsg("⑥合彩: ‘占成上限’不可高於 100%,請重新設定!"); } else if (Convert.ToInt32(str9) <= 0) { base.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.noRightOptMsg("⑥合彩: ‘占成上限’不可低於等於 0%,請重新設定!"); } } catch { base.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.noRightOptMsg("⑥合彩: ‘占成上限’只能為數字,請重新設定!"); } } } double num2 = 0.0; if (!string.IsNullOrEmpty(this.lottrty_kc)) { if ((double.Parse(str10) - double.Parse(this.d_kc_credit)) > double.Parse(this.d_up_kc_usable_credit)) { base.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.noRightOptMsg("快彩: 設定增加‘信用額度’超過上级可以用餘額!"); } if (double.Parse(str11) > this.d_maxRate_kc) { base.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.noRightOptMsg("快彩: 分公司占成 數不正确,请核实后重新输入!"); } num2 = double.Parse(str10) - double.Parse(this.d_kc_credit); if (double.Parse(str10) < (double.Parse(this.d_kc_credit) - Convert.ToDouble(this.d_kc_usable_credit))) { base.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.noRightOptMsg("快彩: 設定減少‘信用額度’超過可‘回收’餘額!"); } if (str13.Equals("1")) { if (string.IsNullOrEmpty(str14)) { base.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.noRightOptMsg("快彩:‘占成上限’不可為空,請修改!"); } try { if (Convert.ToInt32(str14) > 100) { base.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.noRightOptMsg("快彩: ‘占成上限’不可高於 100%,請重新設定!"); } else if (Convert.ToInt32(str14) <= 0) { base.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.noRightOptMsg("快彩: ‘占成上限’不可低於等於 0%,請重新設定!"); } } catch { base.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.noRightOptMsg("快彩: ‘占成上限’只能為數字,請重新設定!"); } } } 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(str11); 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)); if (str8.Equals("1")) { _users.set_six_allow_maxrate(1); _users.set_six_low_maxrate(new int?(Convert.ToInt32(str9))); } else { _users.set_six_allow_maxrate(0); _users.set_six_low_maxrate(0); } _users.set_six_kind(str7.ToUpper()); if (!this.d_up_six_kind.Equals("0")) { _users.set_six_kind(this.d_up_six_kind.ToUpper()); } if (string.IsNullOrEmpty(this.lottrty_six)) { _users.set_six_kind(this.d_six_kind.ToUpper()); } _users.set_kc_rate(new int?(num6)); _users.set_kc_credit(new decimal?(num7)); _users.set_kc_usable_credit(new decimal?(num8)); if (str13.Equals("1")) { _users.set_kc_allow_maxrate(1); _users.set_kc_low_maxrate(new int?(Convert.ToInt32(str14))); } else { _users.set_kc_allow_maxrate(0); _users.set_kc_low_maxrate(0); } _users.set_kc_kind(str12.ToUpper()); if (!this.d_up_kc_kind.Equals("0")) { _users.set_kc_kind(this.d_up_kc_kind.ToUpper()); } if (string.IsNullOrEmpty(this.lottrty_kc)) { _users.set_kc_kind(this.d_kc_kind.ToUpper()); } bool flag2 = true; bool flag3 = true; if (this.d_six_ExistsBet && this.d_six_OpenPhase) { flag2 = false; _users.set_six_kind(this.d_six_kind.ToUpper()); } if (this.d_kc_ExistsBet && this.d_kc_OpenPhase) { flag3 = false; _users.set_kc_kind(this.d_kc_kind.ToUpper()); } DataTable userInfoTableByUID = CallBLL.cz_users_bll.GetUserInfoTableByUID(this.r_u_id); if (CallBLL.cz_users_bll.UpdateUserInfoHY(_users, flag2, flag3, this.d_up_u_type, this.d_up_u_name)) { base.user_edit_hy_log(userInfoTableByUID, CallBLL.cz_users_bll.GetUserInfoTableByUID(this.r_u_id), _users.get_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(); } if (!this.d_six_kind.ToUpper().Equals(_users.get_six_kind().ToUpper())) { FileCacheHelper.UpdateDrawbackFile(1, ""); } if (!this.d_kc_kind.ToUpper().Equals(_users.get_kc_kind().ToUpper())) { FileCacheHelper.UpdateDrawbackFile(2, ""); } FileCacheHelper.UpdateUserTxt(); base.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.successOptMsg("修改會員成功!"); } else { base.DeleteCreditLock(this.d_u_name); base.Un_User_Lock(rateKCByUserName.get_fgs_name()); base.noRightOptMsg("修改會員失敗!"); } }