Song.Site/Manage/Admin/StudentSort_Edit.aspx.cs

(开头部分) 2KB

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

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;



namespace Song.Site.Manage.Admin
{
    public partial class Sort_Edit : Extend.CustomPage
    {
        private int id = WeiSha.Common.Request.QueryString["id"].Decrypt().Int32 ?? 0;
        //员工上传资料的所有路径
        //private string _uppath = "Student";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                fill();
            }
            this.Form.DefaultButton = this.btnEnter.UniqueID;
        }
        private void fill()
        {
            Song.Entities.StudentSort th = id == 0 ? new Song.Entities.StudentSort() : Business.Do<IStudent>().SortSingle(id);
            if (th == null) return;
            if (id != 0) this.EntityBind(th);
        }
        protected void btnEnter_Click(object sender, EventArgs e)
        {
            Song.Entities.Organization org = Business.Do<IOrganization>().OrganCurrent();
            if (org == null) throw new WeiSha.Common.ExceptionForAlert("当前机构不存在");
            //
            Song.Entities.StudentSort th = id == 0 ? new Song.Entities.StudentSort() : Business.Do<IStudent>().SortSingle(id);
            th = this.EntityFill(th) as Song.Entities.StudentSort;
            th.Org_ID = org.Org_ID;
            th.Org_Name = org.Org_Name;
            //判断是否重名
            if (Business.Do<IStudent>().SortIsExist(th))
            {
                Master.Alert("当前学生分组已经存在!");
            }
            else
            {
                try
                {
                    if (id == 0)
                    {
                        Business.Do<IStudent>().SortAdd(th);
                    }
后面还有 15 行代码,解锁后查看完整代码

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

AI 解读

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

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