예제 #1
0
        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();
        }
예제 #2
0
        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);
        }