Colleges/ViewPhoto.aspx.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
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 IndiaStudyChannel.Colleges
{
	/// <summary>
	/// Summary description for CollegeList.
	/// </summary>
	public partial class ViewPhoto : System.Web.UI.Page
	{
		protected string collegeName, previousLink, nextLink, title, photoPath = "";

		protected void Page_Load(object sender, System.EventArgs e)
		{
			int photoId = int.Parse(Request.QueryString["PhotoId"].ToString());

			lnkDeletePhoto.Visible = Utils.Utils.IsAdministrator();
			lnkEditPhoto.Visible = Utils.Utils.IsAdministrator();

			if ( Page.IsPostBack )
			{
				return;
			}

			LoadPhoto(photoId);
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    

		}
		#endregion

		private void LoadPhoto(int photoId)
		{
			// Get all photos of the same college so that we can display the previous/next links.
			string query = "select CollegePhotos.*, Colleges.CollegeName from CollegePhotos, Colleges where CollegeId = Colleges.Id AND CollegeId = (select CollegeId from CollegePhotos where Id = " + photoId + ") order by CollegePhotos.Id ASC";
后面还有 105 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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