Ejemplo n.º 1
0
        private void UpdateFormArc(int popositionInlistView, int SortColumnId)
        {
            try
            {
                CIncidents Incidents = new CIncidents();
                Incidents.GetListFromDir(new CConfig().ArchivesDirName);
                Incidents.SortIncidents(SortColumnId);
                var Re = Incidents.Incidents.Where(
                    p => DateTime.ParseExact(p.DateExec, "yyyyMMdd",
                                             System.Globalization.CultureInfo.GetCultureInfo("ru-RU")) >= DateTime.ParseExact(dateTimePickerBeginArc.Text, "yyyyMMdd",
                                                                                                                              System.Globalization.CultureInfo.GetCultureInfo("ru-RU"))).Where(
                    p => DateTime.ParseExact(p.DateExec, "yyyyMMdd",
                                             System.Globalization.CultureInfo.GetCultureInfo("ru-RU")) <= DateTime.ParseExact(dateTimePickerEndArc.Text, "yyyyMMdd",
                                                                                                                              System.Globalization.CultureInfo.GetCultureInfo("ru-RU")));

                CIncidents Inc2 = new CIncidents();


                foreach (CIncident R1 in Re)
                {
                    CIncident ii = new CIncident();
                    ii = R1;
                    Inc2.Incidents.Add(ii);
                }

                UdeteeveryForm(popositionInlistView, SortColumnId, listViewIncidentsArc, Inc2);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Ejemplo n.º 2
0
        private void UpdateForm(int popositionInlistView, int SortColumnId, ListView lVIncidents)
        {
            try
            {
                CIncidents Incidents = new CIncidents();
                Incidents.GetListFromDir(new CConfig().WorkDirName);
                Incidents.SortIncidents(SortColumnId);

                UdeteeveryForm(popositionInlistView, SortColumnId, lVIncidents, Incidents);
                SetInterfaceElements(lVIncidents, new CConfig().WorkDirName);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }