Beispiel #1
0
        private void cmdCreateReturn_Click(object sender, EventArgs e)
        {
            ItemService            itemService            = new ItemService(_context);
            HistoryService         historyService         = new HistoryService(_context);
            ReturnedHistoryService returnedHistoryService = new ReturnedHistoryService(_context);
            DRService drService = new DRService(_context);

            InOutService inOutService = new InOutService(itemService, historyService,
                                                         drService, returnedHistoryService);

            ReturnedItemForm f = new ReturnedItemForm(null, returnedHistoryService
                                                      , inOutService, drService, _name);

            f.ShowDialog();
        }
Beispiel #2
0
        private void cmdEditReturn_Click(object sender, EventArgs e)
        {
            if (listViewReturn.SelectedItems.Count == 0)
            {
                MessageBox.Show("Please select History from the list", "",
                                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            long                   returnId               = Convert.ToInt64(listViewReturn.SelectedItems[0].SubItems[0].Text);
            ItemService            itemService            = new ItemService(_context);
            HistoryService         historyService         = new HistoryService(_context);
            ReturnedHistoryService returnedHistoryService = new ReturnedHistoryService(_context);
            DRService              drService              = new DRService(_context);

            InOutService inOutService = new InOutService(itemService, historyService,
                                                         drService, returnedHistoryService);

            ReturnedHistory  h = returnedHistoryService.GetHistory(returnId);
            ReturnedItemForm f = new ReturnedItemForm(h, returnedHistoryService,
                                                      inOutService, drService, _name);

            f.ShowDialog();
        }