Example #1
0
    private void editValues(int recordId, int attrValId)
    {
        LblOk.Text = "";
        LblErr.Text = "";

        base.CurrentKey = attrValId.ToString();
        base.CurrentId = recordId;

        if (recordId > 0)
        {
            PigeonCms.Attribute obj = new PigeonCms.Attribute();
            obj = new PigeonCms.AttributesManager().GetByKey(base.CurrentId);
        }
        if (attrValId > 0)
        {
            PigeonCms.AttributeValue obj = new PigeonCms.AttributeValue();
            obj = new PigeonCms.AttributeValuesManager().GetByKey(attrValId);
            values2form(obj);
        }
        GridValues.DataBind();
    }
Example #2
0
    protected void GridValues_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            PigeonCms.AttributeValue item = new PigeonCms.AttributeValue();
            item = (PigeonCms.AttributeValue)e.Row.DataItem;

            LinkButton LnkTitle = (LinkButton)e.Row.FindControl("LnkTitle");
            LnkTitle.Text = "<i class='fa fa-pgn_edit fa-fw'></i>";
            LnkTitle.Text += Utility.Html.GetTextPreview(item.Value, 50, "");
            if (string.IsNullOrEmpty(LnkTitle.Text))
                LnkTitle.Text += Utility.GetLabel("NO_VALUE", "<no value>");

            if (Roles.IsUserInRole("debug") || Roles.IsUserInRole("admin"))
                LnkTitle.Text += " [" + item.Id.ToString() + "]";

        }
    }