protected override void InitializeSkin(System.Web.UI.Control Skin) { if (Context.Request["DeleteCommentId"] != null) { if (BWeblog_Comment.DeleteByID(Convert.ToInt32(Context.Request["DeleteCommentId"]))) { BWeblog_User.SetUserCommentCount(blogContext.BlogUserId); BWeblog_log.SetLogCountByUID(blogContext.BlogUserId); Context.Response.Write("<script>alert('删除成功!');window.location='/" + blogContext.Owner.User_DomainName + "/Manage/Comments-" + blogContext.LogId + ".aspx';</script>"); } else { Context.Response.Write("<script>alert('删除失败!');window.location='/" + blogContext.Owner.User_DomainName + "/Manage/Comments-" + blogContext.LogId + ".aspx';</script>"); } } repeater1 = (RepeaterPaged)Skin.FindControl("Repeater1"); if (Context.Request["logid"] != null) { DataBind(); } else { System.Web.HttpContext.Current.Response.Redirect("/" + blogContext.Owner.User_DomainName + "/Manage/logs.aspx"); } //else //{ // Context.Response.Write("<script>alert('你没有权限!');</script>"); // Context.Response.End(); //} }
protected override void InitializeSkin(System.Web.UI.Control Skin) { RepeaterPaged1 = (RepeaterPaged)Skin.FindControl("RepeaterPaged1"); MoveCategory = (Button)Skin.FindControl("MoveCategory"); DropDownList1 = (DropDownList)Skin.FindControl("DropDownList1"); DropDownList2 = (DropDownList)Skin.FindControl("DropDownList2"); if (!IsDraft) { DropDownList1.SelectedIndexChanged += new EventHandler(DropDownList1_SelectedIndexChanged); DropDownList1.AutoPostBack = true; DropDownList1.DataBound += new EventHandler(DropDownList1_DataBound); DropDownList2.DataBound += new EventHandler(DropDownList2_DataBound); MoveCategory.Click += new EventHandler(MoveCategory_Click); } else { MoveCategory.Enabled = false; } if (Context.Request["DeleteLogId"]!=null) { if (BWeblog_log.DeleteByID(Convert.ToInt32(Context.Request["DeleteLogId"]))) { BWeblog_User.SetUserCommentCount(blogContext.BlogUserId); BWeblog_log.SetLogCountByUID(blogContext.BlogUserId); Context.Response.Write("<script>alert('删除成功!');window.location='/" + blogContext.Owner.User_DomainName + "/Manage/logs.aspx';</script>"); Context.Response.End(); } else { Context.Response.Write("<script>alert('删除失败!');window.location='/" + blogContext.Owner.User_DomainName + "/Manage/logs.aspx';</script>"); Context.Response.End(); } } ListDataBind(); }
//private Int32 PageIndex=1; protected override void InitializeSkin(System.Web.UI.Control Skin) { RP = (RepeaterPaged)Skin.FindControl("RepeaterPaged1"); Theme = (Literal)Skin.FindControl("Literal1"); //if (Context.Request.QueryString["pageindex"] != "") //{ // PageIndex = Context.Request.QueryString["pageindex"]; //} RP.Length = 7; RP.Count = BWeblog_RecommendTheme.GetAllThemeId().Count() * 7; RP.UrlFormat = "default.aspx?"; int[] array= BWeblog_RecommendTheme.GetAllThemeId(); RP.DataSource = BView_WeblogUserRecommend.GetByPageIndex(array[blogContext.PageIndex-1],7); RP.DataBind(); Weblog_RecommendTheme WRT = BWeblog_RecommendTheme.GetByPageIndex(array[blogContext.PageIndex - 1]); Theme.Text = WRT.Reco_Title+WRT.Reco_Content; }
protected override void InitializeSkin(System.Web.UI.Control Skin) { SearchByXH = (TextBox)Skin.FindControl("XH"); SearchByNickName = (TextBox)Skin.FindControl("NickName"); SearchByName = (TextBox)Skin.FindControl("Name"); SearchByQQ = (TextBox)Skin.FindControl("QQ"); DropXY = (DropDownList)Skin.FindControl("DropDownList1"); DropZY = (DropDownList)Skin.FindControl("DropDownList2"); RadioList = (RadioButtonList)Skin.FindControl("RadioButtonList1"); Source1 = (SqlDataSource)Skin.FindControl("SqlDataSource3"); SearchButton1 = (Button)Skin.FindControl("Search1"); DropXY.DataBound += new EventHandler(DropXY_DataBound); DropZY.DataBound += new EventHandler(DropZY_DataBound); SearchButton1.Click += new EventHandler(SearchButton1_Click); RepeaterPaged1 = (RepeaterPaged)Skin.FindControl("RepeaterPaged1"); DataBind(); }