Example #1
0
        public ModelIncidents SearchIncidentByNumber(string numberIncident)
        {
            var incidents   = new ModelIncidents();
            var daoIncident = new DaoIncidents();

            foreach (DataRow row in daoIncident.SearchByNumberIncident(numberIncident).Rows)
            {
                incidents.NumberIncident        = Convert.ToString(row["NumberIncident"]);
                incidents.Caller                = Convert.ToString(row["Caller"]);
                incidents.Status                = Convert.ToString(row["Status"]);
                incidents.WorkNotes             = Convert.ToString(row["WorkNotes"]);
                incidents.ResolutionInformation = Convert.ToString(row["ResolutionInformation"]);
                incidents.Description           = Convert.ToString(row["Description"]);
                incidents.TempoResolucao        = Convert.ToString(row["TempoResolucao"]);
                if (row["Tecnico"] != null)
                {
                    incidents.Tecnico = Convert.ToString(row["Tecnico"]);
                }
                else
                {
                    incidents.Tecnico = "";
                }
            }
            return(incidents);
        }
Example #2
0
        public List <ModelIncidents> SearchIncident(string incident, string serialNumber)
        {
            var lista       = new List <ModelIncidents>();
            var daoIncident = new DaoIncidents();

            foreach (DataRow row in daoIncident.SearchByNumberIncident(incident, serialNumber).Rows)
            {
                var incidents = new ModelIncidents();
                incidents.NumberIncident        = Convert.ToString(row["NumberIncident"]);
                incidents.Caller                = Convert.ToString(row["Caller"]);
                incidents.Status                = Convert.ToString(row["Status"]);
                incidents.WorkNotes             = Convert.ToString(row["WorkNotes"]);
                incidents.ResolutionInformation = Convert.ToString(row["ResolutionInformation"]);
                incidents.Description           = Convert.ToString(row["Description"]);

                lista.Add(incidents);
            }
            return(lista);
        }