2 using System
.Collections
.Generic
;
6 using System
.Web
.UI
.WebControls
;
7 using PumpkinHouseDatabase
;
8 using PumpkinHouseDatabase
.Contract
;
9 using PumpkinHouse
.Utils
;
11 namespace PumpkinHouse
13 public partial class Picture
: System
.Web
.UI
.Page
15 protected long CollectionId
;
16 protected CollectionToDisplay picture
;
17 protected DB_Album Album
;
18 protected string JsonPicture
;
19 protected string JsonUser
;
21 protected void Page_Load(object sender
, EventArgs e
)
23 bool success
= long.TryParse(Request
.Params
["pictureId"], out CollectionId
);
26 Response
.Redirect("~/404.aspx");
28 using (DataUtils utils
= new DataUtils(false))
30 picture
= Converter
.ConvertCollectionWithOriginal(utils
, utils
.FindViewCollectionWithOriginalById(CollectionId
), -1);
33 Response
.Redirect("~/404.aspx");
35 string desc
= picture
.Description
;
36 if (desc
!= null && desc
.Length
> 15)
38 desc
= desc
.Substring(0, 15) + "...";
40 Page
.Title
= desc
+ " À´×Ô" + picture
.NickName
+ "ÔÚľͷºÐ×ӵķÖÏí";
42 JsonPicture
= JsonHelper
<CollectionToDisplay
>.ConvertToJson(picture
);
44 var user
= Converter
.ConvertUser(utils
, utils
.FindUserByUsername(picture
.Username
), 0);
45 JsonUser
= JsonHelper
<UserToDisplay
>.ConvertToJson(user
);