protected void Delete_Click(object sender, RowEventArgs e) { RockContext rockContext = new RockContext(); JiraTopicService jiraTopicService = new JiraTopicService(rockContext); var topic = jiraTopicService.Get(e.RowKeyId); jiraTopicService.Delete(topic); rockContext.SaveChanges(); BindGrid(); }
private JiraTopic GetJiraTopic(JiraTopicService jiraTopicService) { var id = PageParameter(PageParameterKey.JiraTopicId).AsInteger(); var topic = jiraTopicService.Get(id); if (topic == null) { topic = new JiraTopic { Id = 0 }; } return(topic); }