コード例 #1
0
 public void CreateNewTicket()
 {
     Mode      = FormMode.Create;
     Ticket    = new Ticket();
     MdiParent = MyForms.GetForm <ParentForm>();
     Show();
 }
コード例 #2
0
        // Event handler for add button
        private void btnAdd_Click(object sender, EventArgs e)
        {
            // try / catch for showing error messages in case of error occurs
            try
            {
                // Grabbing user input
                GrabUserInput();
                // Assigning instance of SprintManager class to the manager variable
                var manager = new SprintManager();
                // Inserting data to the database
                manager.Create(Sprint);
                // Clearing the form and then showing data on the form
                MyForms.GetForm <SprintListForm>().LoadData();
                // Getting the last sprint
                Sprint s = manager.GetAll().Last();
                // Getting all the backlog tickets by given number of developers and assigning to source List
                List <Ticket> source = new TicketList().GetSortedBacklogTickets((int)nudDevelopers.Value);
                // Iterating over the source List with foreach
                foreach (var ticket in source)
                {
                    // Creating new instance of TicketManager and calling SetTicketStatusAndSprint for updating tickets status and sprint ID
                    new TicketManager().SetTicketStatusAndSprint(ticket, s.Id);
                }

                MyForms.GetForm <TicketListForm>().LoadData();
                // Refreshing the TicketListForm
                Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #3
0
 public void UpdateTicket(Ticket ticket)
 {
     Mode   = FormMode.Update;
     Ticket = ticket;
     ShowTicketInControls();
     MdiParent = MyForms.GetForm <ParentForm>();
     Show();
 }
コード例 #4
0
ファイル: SprintListForm.cs プロジェクト: Khotam/Jyro-ready
        // Event handler for complete button
        private void btnComplete_Click(object sender, EventArgs e)
        {
            // Getting the data from selected row
            var s = (Sprint)dgvSprint.SelectedRows[0].DataBoundItem;

            // Changing the status of Sprints to 'Complete' and all linked Tickets statuses to 'Done'
            new TicketManager().AlterTicketStatuses(s.Id);
            new SprintManager().AlterSprintStatuses(s.Id);
            LoadData();
            // Refreshing the form
            MyForms.GetForm <TicketListForm>().LoadData();
        }
コード例 #5
0
        // Event handler for Save button
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                GrabUserInput();
                var manager = new TicketManager();
                if (Mode == FormMode.Create)
                {
                    manager.Create(Ticket);
                }
                else
                {
                    manager.Update(Ticket);
                }

                MyForms.GetForm <TicketListForm>().LoadData();
                Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #6
0
 // Method for creating a new sprint
 public void CreateNewSprint()
 {
     Sprint    = new Sprint();
     MdiParent = MyForms.GetForm <ParentForm>();
     Show();
 }
コード例 #7
0
ファイル: ParentForm.cs プロジェクト: Khotam/Jyro-ready
 // Event handler for showing All sprints form
 private void allSprintsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     MyForms.GetForm <SprintListForm>().Show();
 }
コード例 #8
0
 // Event handler for Form Load
 private void TicketListForm_Load(object sender, EventArgs e)
 {
     MdiParent = MyForms.GetForm <ParentForm>();
     LoadData();
 }
コード例 #9
0
ファイル: SprintListForm.cs プロジェクト: Khotam/Jyro-ready
 // Event handler for form load
 private void SprintListForm_Load_1(object sender, EventArgs e)
 {
     // Setting MdiParent
     MdiParent = MyForms.GetForm <ParentForm>();
     LoadData();
 }