Song.Site/Manage/Teacher/Info.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 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;
namespace Song.Site.Manage.Teacher
{
public partial class Info : Extend.CustomPage
{
private int id = WeiSha.Common.Request.QueryString["id"].Int32 ?? 0;
private string _uppath = "Teacher";
protected void Page_Load(object sender, EventArgs e)
{
this.Form.DefaultButton = this.btnEnter.UniqueID;
if (!IsPostBack)
{
fill();
}
}
private void fill()
{
Song.Entities.Teacher th = id == 0 ? Extend.LoginState.Teacher.CurrentUser : Business.Do<ITeacher>().TeacherSingle(id);
if (th == null) return;
this.EntityBind(th);
//出生年月
Th_Birthday.Text = th.Th_Birthday < DateTime.Now.AddYears(-100) ? "" : th.Th_Birthday.ToString("yyyy-MM-dd");
//个人照片
if (!string.IsNullOrEmpty(th.Th_Photo) && th.Th_Photo.Trim() != "")
{
this.imgShow.Src = Upload.Get[_uppath].Virtual + th.Th_Photo;
}
}
protected void btnEnter_Click(object sender, EventArgs e)
{
Song.Entities.Teacher th = Extend.LoginState.Teacher.CurrentUser;
th = this.EntityFill(th) as Song.Entities.Teacher;
if (th.Th_Birthday > DateTime.Now.AddYears(-100))
{
th.Th_Age = Convert.ToInt32((DateTime.Now - th.Th_Birthday).TotalDays / 365);
//th.Th_Age = DateTime.Now.Year - th.Th_Birthday.Year;
}
//图片
if (fuLoad.PostedFile.FileName != "")
{
fuLoad.UpPath = _uppath;
fuLoad.IsMakeSmall = false;
fuLoad.IsConvertJpg = true;
fuLoad.SaveAndDeleteOld(th.Th_Photo);
fuLoad.File.Server.ChangeSize(150, 200, false);
th.Th_Photo = fuLoad.File.Server.FileName;
//
imgShow.Src = fuLoad.File.Server.VirtualPath;
}
try
{
后面还有 11 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
