📄 myaccount.aspx.cs
字号:
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 BookManage.BLL;
using BookManage.Model;
public partial class MyAccount : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
BookBusiness business = new BookBusiness();
lentList.DataSource = business.GetBookLendListByUserName(User.Identity.Name);
lentList.DataBind();
}
}
protected void lentList_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
BookLentInfo lentInfo = (BookLentInfo)e.Row.DataItem;
if (lentInfo.EndTime <=DateTime.Today)
{
e.Row.Cells[3].Text = "<span class=\"red\">" + lentInfo.EndTime.ToString("yyyy-M-dd HH:mm:ss") + "</span>";
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -