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