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(); } } }
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(); }