Esempio n. 1
0
        public List <ModelRequest> ListRequest(string serialNumber)
        {
            var lista      = new List <ModelRequest>();
            var daoRequest = new DaoRequests();

            foreach (DataRow row in daoRequest.List(serialNumber).Rows)
            {
                var request = new ModelRequest();
                request.NumberRequest    = Convert.ToString(row["NumberRequest"]);
                request.RequestFor       = Convert.ToString(row["RequestFor"]);
                request.Item             = Convert.ToString(row["Item"]);
                request.Status           = Convert.ToString(row["Status"]);
                request.WorkNotes        = Convert.ToString(row["WorkNotes"]);
                request.ShortDescription = Convert.ToString(row["ShortDescription"]);
                request.TempoResolucao   = Convert.ToString(row["TempoResolucao"]);
                if (row["Tecnico"] != null)
                {
                    request.Tecnico = Convert.ToString(row["Tecnico"]);
                }
                else
                {
                    request.Tecnico = "";
                }
                lista.Add(request);
            }
            return(lista);
        }
Esempio n. 2
0
        public List <ModelRequest> SearchRequest(string numberRequest)
        {
            var lista      = new List <ModelRequest>();
            var daoRequest = new DaoRequests();

            foreach (DataRow row in daoRequest.SearchByNumberRequest(numberRequest).Rows)
            {
                var request = new ModelRequest();
                request.NumberRequest    = Convert.ToString(row["NumberRequest"]);
                request.RequestFor       = Convert.ToString(row["RequestFor"]);
                request.Item             = Convert.ToString(row["Item"]);
                request.Status           = Convert.ToString(row["Status"]);
                request.WorkNotes        = Convert.ToString(row["WorkNotes"]);
                request.ShortDescription = Convert.ToString(row["ShortDescription"]);

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