Song.Site/Manage/Student/MoneyRecharge.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WeiSha.Common;
using Song.ServiceInterfaces;
using Song.Extend;
namespace Song.Site.Manage.Student
{
    public partial class MoneyRecharge : Extend.CustomPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Song.Entities.Student st = this.Master.Student;
            //this.Form.Attributes.Add("target", "_blank");
            if (st == null) return;
            if (!IsPostBack)
            {
                //当前学员的钱数
                ltMoney.Text = Extend.LoginState.Student.CurrentUser.St_Money.ToString();
                //在线充值接口
                Song.Entities.Organization org = Business.Do<IOrganization>().OrganCurrent();
                Song.Entities.PayInterface[] pis = Business.Do<IPayInterface>().PayAll(org.Org_ID, "web", true);
                rptPi.DataSource = pis;
                rptPi.DataBind();
                onlinePay.Visible = pis.Length > 0;
            }
        }
        /// <summary>
        /// 充值码充值
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnCode_Click(object sender, EventArgs e)
        {
            string moneyCode = tbCode.Text.Trim();
            //没有传入充值码
            if (string.IsNullOrWhiteSpace(moneyCode)) return;
            try
            {
                Song.Entities.RechargeCode code = Business.Do<IMoney>().MoneyCheckCode(moneyCode);
                if (code != null)
                {
                    Song.Entities.Student st = Extend.LoginState.Student.CurrentUser;
                    code.St_ID = st.St_ID;
                    code.St_AccName = st.St_AccName;
                    Business.Do<IMoney>().MoneyUseCode(code);
                    //当前学员的钱数
                    ltMoney.Text = Extend.LoginState.Student.CurrentUser.St_Money.ToString();
                    this.Alert("充值成功!成功充值" + code.Rc_Price + "元。");
                }
            }
            catch (Exception ex)
            {
                this.cv3.ErrorMessage = ex.Message;
                this.cv3.IsValid = false;
            }
        }
后面还有 27 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。