예제 #1
0
        protected void rGrid_Delete(object sender, RowEventArgs e)
        {
            Rock.Core.Attribute attribute = _attributeService.Get(( int )rGrid.DataKeys[e.RowIndex]["id"]);
            if (attribute != null)
            {
                Rock.Web.Cache.Attribute.Flush(attribute.Id);

                _attributeService.Delete(attribute, CurrentPersonId);
                _attributeService.Save(attribute, CurrentPersonId);
            }

            BindGrid();
        }
예제 #2
0
        protected void rGridAttribute_Delete(object sender, RowEventArgs e)
        {
            Rock.Core.Attribute attribute = attributeService.Get((int)rGridAttribute.DataKeys[e.RowIndex]["id"]);
            if (attribute != null)
            {
                Rock.Web.Cache.Attribute.Flush(attribute.Id);

                attributeService.Delete(attribute, CurrentPersonId);
                attributeService.Save(attribute, CurrentPersonId);
            }

            rGridAttribute_Bind(hfTypeId.Value);
        }