Пример #1
0
        private void ArchiveView_Load(object sender, EventArgs e)
        {
            BindingSource ciBindingSource     = new BindingSource();
            BindingSource ticketBindingSource = new BindingSource();

            Archive_Service archiveService = new Archive_Service();

            foreach (var ticket in archiveService.GetAllArchivedTickets())
            {
                ticketBindingSource.Add(ticket);
            }

            foreach (var configItem in archiveService.GetArchivedConfigItems())
            {
                ciBindingSource.Add(configItem);
            }

            dataGridViewCI.DataSource     = ciBindingSource;
            dataGridViewTicket.DataSource = ticketBindingSource;
        }
Пример #2
0
        private void Archive_View_Load(object sender, EventArgs e)
        {
            Archive_Service archiveService = new Archive_Service();

            BindingSource bindingSourceCI     = new BindingSource();
            BindingSource bindingSourceTicket = new BindingSource();


            bindingSourceCI.Clear();
            foreach (var configItem in archiveService.GetArchivedConfigItems())
            {
                bindingSourceCI.Add(configItem);
            }
            foreach (var ticket in archiveService.GetAllArchivedTickets())
            {
                bindingSourceTicket.Add(ticket);
            }

            dataGridViewCIArchive.DataSource     = bindingSourceCI;
            dataGridViewTicketArchive.DataSource = bindingSourceTicket;
        }