public async Task <ActionResult <DeleteChannelForm> > DeleteChannel([FromBody] DeleteChannelForm channel) { DeleteChannelForm c = this.Manager.DeleteChannel(channel, this.Identity); await this.HubContext.Clients.AllExcept(new string[] { Identity.ID }).SendAsync("onDeleteChannel", c); return(this.Ok(c)); }
public DeleteChannelForm DeleteChannel(DeleteChannelForm channel, UserIdentity identity) { bool result = this.Manager.RemoveChannelForum(channel.idForum, channel.idChannel, identity); if (result) { return(channel); } else { return(new DeleteChannelForm()); } }
private void DeleteChannelMenuItem_Click(object sender, EventArgs e) { DeleteChannelForm newDeleteChannelForm = new DeleteChannelForm(); newDeleteChannelForm.Show(); }