コード例 #1
0
ファイル: add.aspx.cs プロジェクト: daniela12/gooptic
    /// <summary>
    /// Bind Edit data
    /// </summary>
    protected void Bind()
    {
        HighlightAdmin AdminAccess = new HighlightAdmin();
        Highlight entity = AdminAccess.GetByHighlightID(ItemID);

        if (entity != null)
        {
            lblHeading.Text += " - " + entity.Name;

            if (entity.ImageFile != null && entity.ImageFile != "")
            {
                HighlightImage.ImageUrl = ZNode.Libraries.Framework.Business.ZNodeConfigManager.EnvironmentConfig.MediumImagePath + entity.ImageFile;
            }
            else
            {
                RadioHighlightNoImage.Checked = true;
                RadioHighlightCurrentImage.Visible = false;
            }
            chkEnableHyperlink.Checked = entity.DisplayPopup;
            HighlightName.Text = entity.Name;
            Description.Html = entity.Description;
            Hyperlink.Text = entity.Hyperlink;
            HighlightType.SelectedValue = entity.HighlightTypeID.ToString();

            DisplayOrder.Text = Convert.ToString(entity.DisplayOrder);
            chkHyperlinkExternal.Checked = Convert.ToBoolean(entity.HyperlinkNewWinInd);
            VisibleInd.Checked = Convert.ToBoolean(entity.ActiveInd);
            txtImageAltTag.Text = entity.ImageAltTag;
        }
        else
        {
        }
    }
コード例 #2
0
ファイル: delete.aspx.cs プロジェクト: daniela12/gooptic
    /// <summary>
    /// Page Load Event
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        // Get ItemId from querystring
        if (Request.Params["Itemid"] != null)
        {
            ItemID = int.Parse(Request.Params["Itemid"].ToString());
        }
        else
        {
            ItemID = 0;
        }

        if (!Page.IsPostBack)
        {
            if (ItemID > 0)
            {
                HighlightAdmin AdminAccess = new HighlightAdmin();
                Highlight entity = AdminAccess.GetByHighlightID(ItemID);

                HighlightName = entity.Name;
            }
        }
    }