⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tanancymassage.aspx.cs

📁 自己写的一个网上图书馆 可实现图书上传借阅等功能
💻 CS
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace e_librarys
{
	/// <summary>
	/// TanancyMassage 的摘要说明。
	/// </summary>
	public partial class TanancyMassage : System.Web.UI.Page
	{
	
		protected void Page_Load(object sender, System.EventArgs e)
		{
			// 在此处放置用户代码以初始化页面
			SqlConnection Conn = new SqlConnection("server=(local);database=e_library;uid=sa;pwd=");
			Conn.Open();
			string StrSql="select * from User_Info ,Tenancy,Book_Info,Payment  where B_ID='"+Session["B_ID"]+"' and U_ID=T_U_ID and T_B_ID=B_ID and P_ID=B_PMT_ID";
			SqlCommand Comm = new SqlCommand(StrSql,Conn);
			SqlDataReader Dr=Comm.ExecuteReader();
			if(Dr.Read())
			{
                   Label1.Text=Dr["B_Name"].ToString();
				Label2.Text=Dr["U_Name"].ToString();
				Label3.Text=Dr["T_ReserveTime"].ToString();
                 Label4.Text=Dr["T_StartTime"].ToString();
				Label5.Text=Dr["T_EndTime"].ToString();
                Label7.Text = Dr["T_TimeOut"].ToString();

                


				if(Dr["T_TimeOut"].ToString()=="0")
				{Label6.Text="未超期";
                //租金
                int i = Convert.ToInt32(Dr["P_Price"]);
                int j = Convert.ToInt32(Dr["T_Lease"]);
                int k = i * j;
                Label8.Text = k.ToString();
                }
				else
				{Label6.Text="已超期";
                //租金
                int i = Convert.ToInt32(Dr["P_Price"]);
                int j = Convert.ToInt32(Dr["T_Lease"]);
                int m = Convert.ToInt32(Dr["T_TimeOut"]);
                int k = i*j*m;
                Label8.Text = k.ToString();


                }

                //租期
				Label12.Text=Dr["T_Lease"].ToString();

                

				Label9.Text=Dr["P_Deposit"].ToString();
				Label10.Text=Dr["P_Price"].ToString();
				Label11.Text=Dr["P_LateFee"].ToString();
				Label12.Text=Dr["T_Lease"].ToString();
				
			}
		}

		#region Web 窗体设计器生成的代码
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{    

		}
		#endregion
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -