Exemple #1
0
        private void ShowStoryDetails(object sender, EventArgs e)
        {
            Panel panel    = sender as Panel;
            int   story_id = 0;

            foreach (Control c in panel.Controls)
            {
                if (c.Name.Length > 13 && c.Name.Substring(0, 13) == "lbl_story_id_")
                {
                    story_id = Convert.ToInt32(c.Text);
                }
            }
            StoryForm storyform = new StoryForm();

            foreach (Story st in sprintBoard.Stories)
            {
                if (st.StoryID == story_id)
                {
                    storyform.story = st;
                }
            }
            storyform.ShowDialog();
            if (storyform.story != null)
            {
                dbsql.UpdateStory(storyform.story);
                RefreshBoard();
            }
        }
Exemple #2
0
        private void btnAddNewStory_Click(object sender, EventArgs e)
        {
            StoryForm storyform = new StoryForm();

            storyform.ShowDialog();
            if (storyform.story != null)
            {
                dbsql.InsertNewStory(storyform.story);
                MessageBox.Show("Story saved !");
                RefreshBoard();
            }
        }