ZhiYeJianKang_PeiXun/Song.Site/Manage/Sys/Agreement.aspx.cs
2025-02-20 15:41:53 +08:00

60 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WeiSha.Common;
using Song.ServiceInterfaces;
using Song.Entities;
using WeiSha.WebControl;
namespace Song.Site.Manage.Sys
{
/// <summary>
/// 注册协议
/// </summary>
public partial class Agreement : Extend.CustomPage
{
//状态,用于标明是学员注册,还是教师注册
private string state = WeiSha.Common.Request.QueryString["state"].String;
protected void Page_Load(object sender, EventArgs e)
{
//默认是学员注册协议教师是teacher
if (string.IsNullOrWhiteSpace(state)) state = "accounts";
if (!this.IsPostBack)
{
fill();
}
}
/// <summary>
/// 设置初始界面
/// </summary>
private void fill()
{
//注册协议
tbAgreement.Text = Business.Do<ISystemPara>().GetValue("Agreement_" + state);
}
protected void btnEnter_Click(object sender, EventArgs e)
{
try
{
Business.Do<ISystemPara>().Save("Agreement_" + state, tbAgreement.Text);
this.Alert("操作成功!");
}
catch (Exception ex)
{
Message.Alert(ex.Message);
}
}
}
}