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

(开头部分) 3KB

这里只显示每个文件的开头 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.Student
{
    public partial class List_Edit : Extend.CustomPage
    {
        private int id = WeiSha.Common.Request.QueryString["id"].Int32 ?? 0;
        //员工上传资料的所有路径
        private string _uppath = "Student";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                init();
                fill();
            }
            this.Form.DefaultButton = this.btnEnter.UniqueID;
        }
        private void init()
        {
            Song.Entities.Organization org = Business.Do<IOrganization>().OrganCurrent();
            Song.Entities.StudentSort[] sort = Business.Do<IStudent>().SortAll(org.Org_ID, true);
            Sts_ID.DataSource = sort;
            Sts_ID.DataBind();
            foreach (Song.Entities.StudentSort ts in sort)
            {
                if (ts.Sts_IsDefault)
                {
                    ListItem li = Sts_ID.Items.FindByValue(ts.Sts_ID.ToString());
                    if (li != null) li.Selected = true;
                }
            }
        }
        private void fill()
        {
            Song.Entities.Student th = id == 0 ? new Song.Entities.Student() : Business.Do<IStudent>().StudentSingle(id);
            if (th == null) return;
            this.EntityBind(th);
            //出生年月
            St_Birthday.Text = th.St_Birthday < DateTime.Now.AddYears(-100) ? "" : th.St_Birthday.ToString("yyyy-MM-dd");
            //个人照片
            if (!string.IsNullOrEmpty(th.St_Photo) && th.St_Photo.Trim() != "")
            {
                this.imgShow.Src = Upload.Get[_uppath].Virtual + th.St_Photo;
            }
后面还有 53 行代码,解锁后查看完整代码

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

AI 解读

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

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