Exemplo n.º 1
0
        private CFADataSet.IncidentsRow GetNewIncidentsRow(CFADataSet.IncidentsDataTable incidents)
        {
            string guid = incidentRSSNode.SelectSingleNode("guid").InnerText;

            CFADataSet.IncidentsRow incidentRow = incidents.FindByGUID(guid);

            string description = incidentRSSNode.SelectSingleNode("description").InnerText;

            if (incidentRow == null)
            {
                incidentRow      = incidents.NewIncidentsRow();
                incidentRow.GUID = guid;

                UpdateFields(incidentRow, description);

                if (FilterRow(incidentRow)) // TODO: This is a view issue
                {
                    incidents.Rows.Add(incidentRow);
                }
            }
            else
            {
                UpdateFields(incidentRow, description);
            }

            return(incidentRow);
        }
Exemplo n.º 2
0
        void IRSSReaderListener.OnRefresh(XmlDocument document)
        {
            CFADataSet.IncidentsDataTable  incidentsTable = dataSet.Incidents;
            List <CFADataSet.IncidentsRow> incidentRows   = CopyIncidentRows(incidentsTable);

            RemoveUpdatedIncidents(document, incidentRows);
            RemoveIncidentsNotUpdated(incidentRows);

            foreach (IIncidentsRSSReaderListener listener in listeners)
            {
                listener.OnSuccessfullUpdate();
            }
        }
Exemplo n.º 3
0
 public CFADataSet.IncidentsRow Update(CFADataSet.IncidentsDataTable incidents)
 {
     return(GetNewIncidentsRow(incidents));
 }
Exemplo n.º 4
0
 public IncidentEditPanelController(IIncidentEditPanel panel, ICFADataSet dataSet)
 {
     this.panel = panel;
     incidents  = dataSet.Incidents;
 }