Example #1
0
        private void updCreateBtn_Click(object sender, EventArgs e)
        {
            CreateUpdateForm form = new CreateUpdateForm(db, new Update(incident));

            form.ShowDialog();
            LoadUpdates();
            LoadIncident();
        }
Example #2
0
        private void completeIncidentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (mainTabControl.SelectedTab == openIncidentsTab)
            {
                string incidentNumber = openIncidentsGrid.SelectedRows[0].Cells[0].Value.ToString();

                Incident inc    = db.GetIncidentDetails(incidentNumber);
                Update   update = new Update(inc);
                update.Status = "closed";
                update.Type   = "Work Ticket";

                CreateUpdateForm form = new CreateUpdateForm(db, update);
                form.ShowDialog();
                ReloadIncidents();
            }
        }
Example #3
0
        private void updEditBtn_Click(object sender, EventArgs e)
        {
            Update upd;

            if (updatesList.SelectedNode == null)
            {
                return;
            }
            else if (updatesList.SelectedNode.Parent == null)
            {
                upd = updates[updatesList.SelectedNode.Index];
            }
            else
            {
                upd = updates[updatesList.SelectedNode.Parent.Index];
            }

            CreateUpdateForm form = new CreateUpdateForm(db, upd);

            form.ShowDialog();
            LoadUpdates();
            LoadIncident();
        }