亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? default.aspx.cs

?? 企業內部信息交流系統
?? CS
字號:
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;
using infoWeb.WebModules.Accounts.Business;

namespace infoWeb.WebModules.Forums.Web
{
	/// <summary>
	/// Summary description for WebForm1.
	/// </summary>
	public class _Default : infoWeb.ThePhile.Web.PhilePage
	{
		protected System.Web.UI.WebControls.DataList CategoriesList;
		protected System.Web.UI.WebControls.TextBox ForumName;
		protected System.Web.UI.WebControls.TextBox ForumDescription;
		protected System.Web.UI.WebControls.TextBox ForumCategoryCurr;
		protected System.Web.UI.WebControls.TextBox ForumPosition;
		protected System.Web.UI.WebControls.TextBox CategoryName;
		protected System.Web.UI.WebControls.TextBox CategoryImageUrl;
		protected System.Web.UI.WebControls.TextBox CategoryPosition;
		protected System.Web.UI.WebControls.TextBox ForumIDCurr;
		protected System.Web.UI.WebControls.TextBox CategoryIDCurr;
		protected System.Web.UI.WebControls.Table ForumBox;
		protected System.Web.UI.WebControls.Table CategoryBox;
		protected System.Web.UI.WebControls.TableCell ForumBoxHeader;
		protected System.Web.UI.WebControls.TableCell CategoryBoxHeader;
		protected System.Web.UI.WebControls.TableRow ForumCategoryRow;
		protected System.Web.UI.WebControls.DropDownList ForumCategory;
		protected System.Web.UI.HtmlControls.HtmlInputHidden paramID;
		protected System.Web.UI.WebControls.LinkButton SubmitForum;
		protected System.Web.UI.WebControls.LinkButton CencelForum;
		protected System.Web.UI.WebControls.LinkButton DeleteCategory;
		protected System.Web.UI.WebControls.LinkButton DeleteForum;

		private bool canAdministerCategories;

		private void Page_Load(object sender, System.EventArgs e)
		{
			// do not allow to manage categories if the user is not authenticated or
			// does not have the proper permission
			canAdministerCategories = (Context.User.Identity.IsAuthenticated &&
				((SitePrincipal)Context.User).HasPermission((int)ForumsPermissions.AdministerCategories));
			
			if (!IsPostBack)
			{
				BindList();
			}
		}

		public bool CanAdministerCategories
		{
			get { return canAdministerCategories; }
		}

		private void BindList()
		{
			// bind a DataView with all the categories to the DataList
			CategoriesList.DataSource = Business.Category.GetCategories().Tables[0].DefaultView;
			CategoriesList.DataBind();
		}

		public DataView GetForumsSource(int categoryID)
		{
			// get the DataView with the forums for the specified category
			return new Business.Category(categoryID).GetForums().Tables[0].DefaultView;
		}

 		protected void ForumsGrid_Edit(object sender, DataGridCommandEventArgs e)
		{
			// if the user cannot administer categories/forums redirect to the login page
			if (!canAdministerCategories)
			{
				Response.Redirect("/ThePhile/Modules/Users/Login.aspx?ShowError=true", true);
			}

			// get a reference to the clicked forum's parent grid
			DataGrid forumsGrid = (DataGrid)e.Item.Parent.Parent;
			// get the ID of the clicked forum
			int forumID = (int)forumsGrid.DataKeys[e.Item.ItemIndex];
			// get the forum's details
			Business.Forum forum = new Business.Forum(forumID);

			// set the controls for editing the record
			ForumName.Text = forum.Name;
			ForumDescription.Text = forum.Description;
			ForumCategoryCurr.Text = forum.CategoryID.ToString();
			ForumPosition.Text = forum.Position.ToString();
			ForumIDCurr.Text = forum.ID.ToString();
			ForumBoxHeader.Text = "Edit forum";
			
			// hide the category box, if visible
			CategoryBox.Visible = false;

			// show the box, but hide the dropdownlist for the categories
			ForumCategoryRow.Visible = false;
			ForumBox.Visible = true;
		}

		// show the box for adding a forum
		protected void NewForum_Click(object sender, EventArgs e)
		{
			// if the user cannot administer categories/forums redirect to the login page
			if (!canAdministerCategories)
			{
				Response.Redirect("/ThePhile/Modules/Users/Login.aspx?ShowError=true", true);
			}

			// hide the category box, if visible
			CategoryBox.Visible = false;
			
			ForumCategory.DataSource  = Business.Category.GetCategories().Tables[0].DefaultView;
			ForumCategory.DataBind();
			
			// set the controls for the forum box
			ForumBoxHeader.Text = "Create forum";
			ForumPosition.Text = "";
			ForumName.Text = "";
			ForumDescription.Text = "";
			ForumCategoryCurr.Text = "";
			ForumIDCurr.Text = "";
			ForumCategoryRow.Visible = true;
			ForumBox.Visible = true;
		}

		// submit the box for adding/editing a forum
		protected void SubmitForum_Click(object sender, EventArgs e)
		{
			// if the user cannot administer categories/forums redirect to the login page
			if (!canAdministerCategories)
			{
				Response.Redirect("/ThePhile/Modules/Users/Login.aspx?ShowError=true", true);
			}

			int forumPos = (ForumPosition.Text.Length > 0 ? int.Parse(ForumPosition.Text) : 0);
			
			// if the hidden textbox is empty, it means that we're adding a forum
			if (ForumIDCurr.Text.Length == 0)
			{
				// add a new forum
				Business.Category category = new Business.Category(int.Parse(ForumCategory.SelectedItem.Value));
				category.AddForum(ForumName.Text, ForumDescription.Text, forumPos);
			}
			else
			{
				// edit a forum
				Business.Forum forum = new Business.Forum(int.Parse(ForumIDCurr.Text));
				forum.Name = ForumName.Text;
				forum.Description = ForumDescription.Text;
				forum.Position = forumPos;
				forum.Update();
			}
			
			// hide the forum box
			ForumBox.Visible = false;

			// refresh
			BindList();
		}

		// cancel the box for adding/editing a forum
		protected void CancelForum_Click(object sender, EventArgs e)
		{
			ForumBox.Visible = false;
		}

		protected void DeleteForum_Click(object sender, EventArgs e)
		{
			// if the user cannot administer categories/forums...
			if (!canAdministerCategories)
			{
				// redirect to the Login page
				// this is required because a hacker could manually call the DeleteForum javascript
				Response.Redirect("/ThePhile/Modules/Users/Login.aspx?ShowError=true", true);
			}

			// extract the ID of the forum to delete
			int forumID = int.Parse(paramID.Value.ToString());
			// delete the forum
			Business.Forum forum = new Business.Forum(forumID);
			forum.Delete();
			// re-bind the list to show the updated records
			BindList();
		}


		protected void CategoriesList_Edit(object sender, DataListCommandEventArgs e)
		{
			// if the user cannot administer categories/forums redirect to the login page
			if (!canAdministerCategories)
			{
				Response.Redirect("/ThePhile/Modules/Users/Login.aspx?ShowError=true", true);
			}

			// get the ID of the clicked category
			int categoryID = (int)CategoriesList.DataKeys[e.Item.ItemIndex];
			// get the category's details
			Business.Category category = new Business.Category(categoryID);

			// set the controls for editing the record
			CategoryName.Text = category.Name;
			CategoryImageUrl.Text = category.ImageUrl;
			CategoryPosition.Text = category.Position.ToString();
			CategoryIDCurr.Text = category.ID.ToString();
			CategoryBoxHeader.Text = "Edit category";
			
			// hide the forum box, if visible
			ForumBox.Visible = false;
			// show the category box
			CategoryBox.Visible = true;
		}

		// show the box for adding a category
		protected void NewCategory_Click(object sender, EventArgs e)
		{
			// if the user cannot administer categories/forums redirect to the login page
			if (!canAdministerCategories)
			{
				Response.Redirect("/ThePhile/Modules/Users/Login.aspx?ShowError=true", true);
			}

			// hide the forum box, if visible
			ForumBox.Visible = false;
			
			// set the controls for the category box		
			CategoryBoxHeader.Text = "Create category";
			CategoryName.Text = "";
			CategoryImageUrl.Text = "";
			CategoryPosition.Text = "";
			CategoryIDCurr.Text = "";
			CategoryBox.Visible = true;
		}

		// submit the box for adding/editing a category
		protected void SubmitCategory_Click(object sender, EventArgs e)
		{
			// if the user cannot administer categories/forums redirect to the login page
			if (!canAdministerCategories)
			{
				Response.Redirect("/ThePhile/Modules/Users/Login.aspx?ShowError=true", true);
			}

			int categoryPos = (CategoryPosition.Text.Length > 0 ? int.Parse(CategoryPosition.Text) : 0);
			
			// if the hidden textbox is empty, it means that we're adding a category
			if (CategoryIDCurr.Text.Length == 0)
			{
				// add a new category
				Business.Category category = new Business.Category();
				category.Create(CategoryName.Text, CategoryImageUrl.Text, categoryPos);
			}
			else
			{
				// edit a category
				Business.Category category = new Business.Category(int.Parse(CategoryIDCurr.Text));
				category.Name = CategoryName.Text;
				category.ImageUrl = CategoryImageUrl.Text;
				category.Position = categoryPos;
				category.Update();
			}
			
			// hide the category box
			CategoryBox.Visible = false;

			// refresh
			BindList();
		}

		// cancel the box for adding/editing a category
		protected void CancelCategory_Click(object sender, EventArgs e)
		{
			CategoryBox.Visible = false;
		}

		protected void DeleteCategory_Click(object sender, EventArgs e)
		{
			// if the user cannot administer categories/forums...
			if (!canAdministerCategories)
			{
				// redirect to the Login page
				// this is required because a hacker could manually call the DeleteCategory javascript
				Response.Redirect("/ThePhile/Modules/Users/Login.aspx?ShowError=true", true);
			}

			// extract the ID of the category to delete
			int categoryID = int.Parse(paramID.Value.ToString());
			// delete the category
			Business.Category category = new Business.Category(categoryID);
			category.Delete();
			// re-bind the list to show the updated records
			BindList();
		}


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

		}
		#endregion
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一三区三区四区免费在线看| 日本一区二区三区在线观看| 91女厕偷拍女厕偷拍高清| 欧美高清视频一二三区| 国产精品婷婷午夜在线观看| 欧美aaa在线| 欧美视频在线观看一区| 国产精品久久久久久久久久免费看 | 日韩一区二区三区四区五区六区 | 成人中文字幕电影| 9191成人精品久久| 亚洲综合丁香婷婷六月香| 国产91清纯白嫩初高中在线观看| 欧美一区三区二区| 亚洲国产精品一区二区久久 | 亚洲毛片av在线| 成人在线综合网| 亚洲国产精品ⅴa在线观看| 韩国女主播一区| 日韩精品一区二区三区老鸭窝| 亚洲一线二线三线久久久| 波多野洁衣一区| 国产欧美综合在线观看第十页| 捆绑调教美女网站视频一区| 欧美绝品在线观看成人午夜影视| 亚洲高清三级视频| 欧美日韩一区三区四区| 亚洲综合成人在线视频| 在线欧美日韩国产| 一区2区3区在线看| 欧美体内she精视频| 亚洲一区二区三区免费视频| 日本精品裸体写真集在线观看 | 久久久777精品电影网影网| 日本亚洲一区二区| 日韩欧美国产不卡| 久久电影网电视剧免费观看| 欧美一级二级三级乱码| 免费观看在线综合| 精品国精品自拍自在线| 久久99国产精品尤物| 精品对白一区国产伦| 国产精品一区二区在线观看网站| 久久精品一区二区三区不卡| 丁香一区二区三区| 亚洲视频小说图片| 欧美性大战久久久久久久| 天堂在线一区二区| 日韩一区二区三区观看| 激情六月婷婷综合| 国产精品久久久久久久久动漫| 成人av免费在线播放| 亚洲精品福利视频网站| 欧美日韩免费高清一区色橹橹| 奇米精品一区二区三区四区| 国产亚洲一区二区三区在线观看 | 国产精品不卡一区二区三区| 色综合天天综合在线视频| 亚洲精品日韩一| 欧美一区二区三区日韩| 国产精品91xxx| 亚洲精品综合在线| 日韩一级片网站| 成人精品免费视频| 日韩中文字幕1| 亚洲国产成人在线| 欧美日本韩国一区二区三区视频| 激情深爱一区二区| 夜夜爽夜夜爽精品视频| 久久综合网色—综合色88| 97久久超碰国产精品电影| 老司机一区二区| 一区二区视频在线看| 精品福利在线导航| 欧美色精品天天在线观看视频| 极品尤物av久久免费看| 亚洲嫩草精品久久| 国产午夜亚洲精品午夜鲁丝片| 色婷婷综合久久久中文字幕| 久久99精品国产.久久久久久| 又紧又大又爽精品一区二区| 久久久影视传媒| 3d动漫精品啪啪一区二区竹菊| 成人h版在线观看| 国产最新精品免费| 香蕉加勒比综合久久| 中文字幕日韩一区| 精品美女一区二区| 欧美精品九九99久久| 99精品国产一区二区三区不卡| 久久精品国产精品亚洲精品| 亚洲大型综合色站| 亚洲区小说区图片区qvod| 国产日韩欧美不卡| 日韩欧美国产成人一区二区| 欧美日本一道本在线视频| 91影视在线播放| 成人黄色a**站在线观看| 久久aⅴ国产欧美74aaa| 亚洲mv大片欧洲mv大片精品| 国产精品国产三级国产aⅴ原创| 久久夜色精品国产噜噜av| 欧美精选一区二区| 精品视频一区二区不卡| 91麻豆产精品久久久久久| 成人动漫在线一区| 丁香天五香天堂综合| 狠狠色综合日日| 另类小说图片综合网| 视频一区中文字幕国产| 亚洲国产成人精品视频| 一个色在线综合| 亚洲国产精品嫩草影院| 亚洲一区二区影院| 亚洲综合丁香婷婷六月香| 亚洲综合精品久久| 亚洲国产wwwccc36天堂| 亚洲一卡二卡三卡四卡无卡久久| 亚洲欧美视频在线观看视频| 亚洲欧美一区二区视频| 国产精品动漫网站| ...xxx性欧美| 亚洲综合久久久久| 日日夜夜精品视频免费| 日本色综合中文字幕| 日韩电影在线观看网站| 另类小说欧美激情| 国产一区二区在线看| 国产99精品在线观看| 99v久久综合狠狠综合久久| 91欧美一区二区| 5858s免费视频成人| 欧美大片一区二区三区| 精品国产乱码久久久久久免费| 2020国产精品自拍| 国产精品网站在线| 国产视频一区在线观看| 久草中文综合在线| 一区二区三区四区视频精品免费 | 成人做爰69片免费看网站| 免费成人av在线播放| 亚洲欧洲色图综合| 中文字幕在线视频一区| 五月婷婷综合网| 国产一区在线精品| 久久99精品视频| 国产专区综合网| 91亚洲国产成人精品一区二区三 | 中文字幕日韩欧美一区二区三区| 亚洲欧美偷拍卡通变态| 天天综合天天综合色| 国产乱对白刺激视频不卡| 99re成人在线| 日韩小视频在线观看专区| 欧美国产1区2区| 婷婷中文字幕一区三区| 国产另类ts人妖一区二区| 欧美亚洲一区三区| 久久综合九色综合欧美就去吻| 中文字幕 久热精品 视频在线| 亚洲乱码国产乱码精品精98午夜 | 91精品国产综合久久久蜜臀粉嫩 | 久久久久久亚洲综合| 亚洲影视在线播放| 国产精品538一区二区在线| 在线观看91精品国产入口| 久久综合资源网| 亚洲曰韩产成在线| 丁香一区二区三区| 精品国产一区二区三区久久久蜜月| 自拍偷拍欧美激情| 国产一区二区三区香蕉 | 日韩精品专区在线| 亚洲精品久久久蜜桃| 国产一区二区三区在线看麻豆| 欧美日韩国产一区二区三区地区| 欧美激情一二三区| 狠狠色狠狠色综合系列| 欧美色国产精品| 亚洲欧美另类图片小说| 国产一区二区三区在线观看精品 | 国内精品国产成人| 91精品中文字幕一区二区三区| 亚洲日本护士毛茸茸| 国产精品白丝av| 欧美大片一区二区| 久久av老司机精品网站导航| 欧美精品少妇一区二区三区| 一级日本不卡的影视| 成人av综合在线| 久久九九国产精品| 精品在线播放免费| 日韩欧美一区二区不卡| 日韩经典中文字幕一区| 欧美三级在线播放| 亚洲一区二区三区四区在线 | 99re视频精品| 日韩毛片一二三区| 91免费国产视频网站| 国产精品久久国产精麻豆99网站|