protected void AddCommunityBtn_OnClick(object sender, EventArgs e) { try { CommunityControl.Show(); } catch (Exception exc) { this.StandardErrorScript(); } }
protected void CommunitiesGrid_OnCommand(object sender, CommandEventArgs e) { Community community; int nodeId = e.CommandArgument.ToInt32(); switch (e.CommandName) { #region get case "get": try { CommunityControl.Show(nodeId); } catch (Exception exc) { this.StandardErrorScript(); } break; #endregion #region delete-item case "delete-item": try { community = Community.Get(nodeId); community.Delete(); FillGrid(); } catch (Exception exc) { this.StandardErrorScript(); } break; #endregion } }