protected void Page_Load(object sender, EventArgs e) { int PageNo = 1; int PageSize = 24; int Code = 0; string strCode = Request["Code"]; Int32.TryParse(strCode, out Code); if (Code == 0) { return; } BOLMultiMedias MultiMediasBOL = new BOLMultiMedias(); MultiMedias CurItem = MultiMediasBOL.GetDetails(Code); Page.Title = ltrTitle.Text = CurItem.Title; ltrDescription.Text = CurItem.Description; imgPic.ImageUrl = "~/" + CurItem.PicFile; BOLMultiMediaPictures MultiMediaPicturesBOL = new BOLMultiMediaPictures(1); rptPics.DataSource = MultiMediaPicturesBOL.GetPictures(Code); rptPics.DataBind(); }
protected void DoSave(object sender, ImageClickEventArgs e) { try { int ReturnCode = SaveControls("~/Main/Default.aspx?BaseID=" + BaseID); if (NewMode && ReturnCode != -1) { NewMode = false; Code = ReturnCode; ShowDetails(); } BOLMultiMedias MultiMediasBOL = new BOLMultiMedias(); MultiMedias CurMultiMedia = MultiMediasBOL.GetDetails((int)Code); if (uplLargePicFile.UploadedFiles.Count > 0 || string.IsNullOrEmpty(CurMultiMedia.PicFile)) { Guid newGd = Guid.NewGuid(); string RandSmallPic = newGd.ToString().Replace("-", "") + ".jpg"; DateTime thisTime = DateTime.Now; string UplPath = "~/Files/MultiMedias/"; SavePic(CurMultiMedia.LargePicFile, RandSmallPic, HttpContext.Current.Request.MapPath(UplPath), 220); MultiMediasBOL.ChangeSmallPic(ReturnCode, UplPath + "/" + RandSmallPic); } } catch { } }
protected void Page_Load(object sender, EventArgs e) { string strCode = Request["Code"]; int Code; Int32.TryParse(strCode, out Code); BOLMultiMedias MultiMediasBOL = new BOLMultiMedias(); if (Code != 0) { MultiMedias CurMedia = MultiMediasBOL.GetDetails(Code); if (CurMedia != null) { UCComments1.ItemCode = CurMedia.Code; lblTitle.Text = CurMedia.Title; //ltrDescription.Text = CurMedia.Description; } } }