Пример #1
0
        public List <ModelIncidents> ListIncident(string serialNumber)
        {
            var lista       = new List <ModelIncidents>();
            var daoIncident = new DaoIncidents();

            foreach (DataRow row in daoIncident.List(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"]);
                incidents.TempoResolucao        = Convert.ToString(row["TempoResolucao"]);
                if (row["Tecnico"] != null)
                {
                    incidents.Tecnico = Convert.ToString(row["Tecnico"]);
                }
                else
                {
                    incidents.Tecnico = "";
                }


                lista.Add(incidents);
            }
            return(lista);
        }
Пример #2
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);
        }
Пример #3
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);
        }
Пример #4
0
 public void AlterIncidentByNumber(ModelIncidents incidents)
 {
     new DaoIncidents().AlterIncident(this);
 }