private void Page_Load(object sender, System.EventArgs e)
		{
			this._module = base.Module as ShopModule;
			this.btnCancel.Attributes.Add("onClick", String.Format("document.location.href='AdminShop.aspx{0}'", base.GetBaseQueryString()));
			if (! this.IsPostBack)
			{
			}

			if (Request.QueryString["CategoryId"] != null)
			{
				int categoryId = Int32.Parse(Request.QueryString["CategoryId"]);
				if (categoryId > 0)
				{
					this._shopcategory = this._module.GetShopCategoryById(categoryId);
					if (! this.IsPostBack)
					{
						BindCategory();
					}
					this.btnDelete.Visible = true;
					this.btnDelete.Attributes.Add("onClick", "return confirm('Are you sure?');");
				}
			}
		}
        public virtual void DeleteShopCategory(ShopCategory shopcategory)
		{
            ISession session = this._sessionManager.OpenSession();
            try
            {
                session.Delete(shopcategory);
			}
			catch (Exception ex)
			{
                throw new Exception("Unable to delete Shop category" + "<br>" + ex.Message + "<br>" + ex.InnerException, ex);
			}
		}
		private void btnSave_Click(object sender, System.EventArgs e)
		{
			if (this.IsValid)
			{
				if (this._shopcategory == null)
				{
					this._shopcategory = new ShopCategory();
				}
				this._shopcategory.Name = this.txtName.Text;
				this.SaveCategory();
			}
		}
		private void ShopBreadCrumb()
		{
			if(this._module.CurrentShopId != 0)
			{
				this._shopShop	= this._module.GetShopById(this._module.CurrentShopId);
				this._shopCategory	= this._module.GetShopCategoryById(this._shopShop.CategoryId);

				this.hplShopLink.NavigateUrl	= String.Format("{0}/ShopView/{1}",UrlHelper.GetUrlFromSection(this._module.Section), this._module.CurrentShopId);
				this.hplShopLink.Text			= this._shopShop.Name;
				this.hplShopLink.Visible		= true;
				this.hplShopLink.CssClass		= "shop";

				this.lblForward_1.Visible = true;
				this.lblForward_2.Visible = true;

				this.hplCategoryLink.NavigateUrl	= String.Format("{0}/ShopCategoryList/{1}",UrlHelper.GetUrlFromSection(this._module.Section), this._module.CurrentShopCategoryId);
				this.hplCategoryLink.Text			= this._shopCategory.Name;
				this.hplCategoryLink.Visible		= true;
				this.hplCategoryLink.CssClass		= "shop";
			}

			if(this._module.CurrentShopProductId != 0)
			{
				this.hplProductlink.NavigateUrl	= String.Format("{0}/ShopViewProduct/{1}/post/{2}",UrlHelper.GetUrlFromSection(this._module.Section), this._module.CurrentShopId,this._module.CurrentShopProductId);
				this.hplProductlink.Visible		= true;
				this.hplProductlink.Text			= this._module.GetShopProductById(this._module.CurrentShopProductId).Title;
				this.hplProductlink.CssClass		= "shop";
				this.lblForward_3.Visible		= true;
			}

			HyperLink hplBreadCrumb	= (HyperLink)this.FindControl("hplShopBreadCrumb");
			if(hplBreadCrumb != null)
			{
				hplBreadCrumb.Text			= base.GetText("FORUMHOME");
				hplBreadCrumb.NavigateUrl	= UrlHelper.GetUrlFromSection(this._module.Section);
                hplBreadCrumb.ToolTip = base.GetText("FORUMHOME");
				hplBreadCrumb.CssClass		= "shop";
			}
		}