示例#1
0
 private void buttonClear_Click(object sender, EventArgs e)
 {
     {
         CIncident newIcincident = new CIncident(new CConfig().WorkDirName, DateTime.Now.ToString("yyyyMMdd"),
                                                 GetUserName(), "", "");
         newIcincident.Executor = GetUserName();
         newIcincident.newIncident();
         UpdateForm(listViewIncidents.Items.Count, SortInlistViewIncidents, listViewIncidents);
     }
 }
示例#2
0
        private void buttonNewIncident_Click(object sender, EventArgs e)
        {
            CIncident incident = new CIncident();

            incident = GetIncFromListView(listViewIncidents, new CConfig().WorkDirName);
            if (incident.Initiator != textBoxInitiator.Text ||
                incident.Problem != textBoxProblem.Text ||
                incident.Solution != textBoxSolution.Text ||
                incident.ExtraSolution != textBoxExtraSolution.Text)
            {
                CIncident newIcincident = new CIncident(new CConfig().WorkDirName, DateTime.Now.ToString("yyyyMMdd"),
                                                        textBoxInitiator.Text, textBoxProblem.Text, textBoxSolution.Text);
                newIcincident.ExtraSolution = textBoxExtraSolution.Text;
                newIcincident.Executor      = GetUserName();
                newIcincident.newIncident();


                UpdateForm(listViewIncidents.SelectedItems[0].Index, SortInlistViewIncidents, listViewIncidents);
            }
            else
            {
                MessageBox.Show("you have not made any changes");
            }
        }