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["EmoticonId"] != null)
			{
				int emoticonId = Int32.Parse(Request.QueryString["EmoticonId"]);
				if (emoticonId > 0)
				{
					this._shopemoticon = this._module.GetEmoticonById(emoticonId);
					if (! this.IsPostBack)
					{
						BindEmoticon();
					}
					this.btnDelete.Visible = true;
					this.btnDelete.Attributes.Add("onClick", "return confirm('Are you sure?');");
				}
			}
		}
        public void DeleteEmoticon(ShopEmoticon emoticon)
		{
            ISession session = this._sessionManager.OpenSession();
            NHibernate.ITransaction tx = session.BeginTransaction();
            try
            {
                session.Delete(emoticon);
                tx.Commit();
                session.Close();
			}
			catch (Exception ex)
			{
                tx.Rollback();
                throw new Exception("Unable to delete Emoticon" + "<br>" + ex.Message + "<br>" + ex.InnerException, ex);
			}
		}
		private void btnSave_Click(object sender, System.EventArgs e)
		{
			if (this.IsValid)
			{
				if (this._shopemoticon == null)
				{
					this._shopemoticon = new ShopEmoticon();
				}
				this.SaveEmoticon();
			}
		}