public void CreateNewTicket()
 {
     Mode   = FormMode.CreateNew;
     Ticket = new Ticket();
     InitializeControls();
     MdiParent = AllForms.GetForm <ParentForm>();
     Show();
 }
 public void UpdateTicket(Ticket ticket)
 {
     Mode   = FormMode.Update;
     Ticket = ticket;
     InitializeControls();
     ShowTicketInControls();
     MdiParent = AllForms.GetForm <ParentForm>();
     Show();
 }
        private void BtnSave_Click(object sender, EventArgs e)
        {
            try
            {
                GrabUserInput();
                var manager = new TicketManager();
                if (Mode == FormMode.CreateNew)
                {
                    manager.Create(Ticket);
                }
                else
                {
                    manager.Update(Ticket);
                }

                AllForms.GetForm <ListOfTicketForm>().LoadData();
                Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 4
0
 private void ListOfTicketFormorm_Load(object sender, EventArgs e)
 {
     MdiParent = AllForms.GetForm <MainParentForm>();
     LoadData();
 }
 private void SprintList_Load(object sender, EventArgs e)
 {
     MdiParent = AllForms.GetForm <MainParentForm>();
     LoadData();
 }
 private void EditTicketForm_Load(object sender, EventArgs e)
 {
     MdiParent = AllForms.GetForm <ParentForm>();
 }
 private void ListAllSprintsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     AllForms.GetForm <EditSprintForm>().Show();
 }