Ejemplo n.º 1
0
        private void AddComputerTolist(object sender, EventArgs e)
        {
            Computer computer = newCompSubform.NewComputer;

            computer.HardDrives.ForEach(hd => CaseHardDrives.Add(hd));
            CaseComputers.Add(computer);
            EntitiesToListView.FillComputersListview(CaseComputers, listViewAssociatedComputerList);
            EntitiesToListView.FillHardDrivesListView(CaseHardDrives, listViewHardDrivesOnHardDrivePage);
        }
Ejemplo n.º 2
0
        private void PopulateFormwithCase(Case incomingCase)
        {
            ISessionFactory factory = SessionConfig.SessionFactory;

            using (ISession session = factory.OpenSession())
            {
                using (ITransaction transaction = session.BeginTransaction())
                {
                    incomingCase = session.CreateCriteria(typeof(Case))
                                   .Add(Restrictions.Eq("Id", incomingCase.Id))
                                   .UniqueResult <Case>();

                    matterTextBox.Text                      = incomingCase.Matter;
                    caseNumberTextBox.Text                  = Math.Truncate(incomingCase.CaseNumber).ToString();
                    itemNumberTextBox.Text                  = incomingCase.ItemNumber.ToString();
                    startDateDateTimePicker.Value           = incomingCase.StartDate;
                    barcodeTextBox.Text                     = incomingCase.Barcode;
                    barcodeDateVerifiedDateTimePicker.Value = incomingCase.BarcodeDateVerified;
                    firm_idComboBox.SelectedValue           = incomingCase.Firm.Id;
                    EntitiesToComboBox.FillFirmContactComboBoxByFirm(incomingCase.Firm.Id, requester_idComboBox);
                    requester_idComboBox.SelectedValue = incomingCase.Requester.Id;
                    examiner_idComboBox.SelectedValue  = incomingCase.Examiner.Id;
                    textBoxConclusion.Text             = incomingCase.NotesAndConclusion.Conclusion;
                    textBoxNACNotes.Text = incomingCase.NotesAndConclusion.Notes;

                    NewCase               = incomingCase;
                    CaseComputers         = incomingCase.Computers;
                    CaseHardDrives        = incomingCase.HardDrives;
                    CaseForensicProcesses = incomingCase.ForensicProcesses;
                    CaseActiveUserFiles   = incomingCase.ActiveUserFiles;

                    EntitiesToListView.FillActiveUserFilesListViewDetailView(CaseActiveUserFiles,
                                                                             listViewAUFActiveUserFiles);
                    EntitiesToListView.FillComputersListview(CaseComputers, listViewAssociatedComputerList);
                    EntitiesToListView.FillHardDrivesListView(CaseHardDrives, listViewHardDrivesOnHardDrivePage);
                    EntitiesToListView.FillForensicProcessListView(CaseForensicProcesses, listViewForensicProcesses);

                    transaction.Commit();
                }
            }
        }