Exemplo n.º 1
0
        /// <summary>
        /// Get all the modelRequest.
        /// </summary>
        /// <param name="modelRequest">modelRequest Identifier</param>
        /// <returns></returns>
        public List <SOFTTEK.SCMS.Entity.FA.Request> SearchRequests(SOFTTEK.SCMS.Entity.FA.Request modelRequest)
        {
            List <SOFTTEK.SCMS.Entity.FA.Request> listRequests = new List <SOFTTEK.SCMS.Entity.FA.Request>();

            return(context.Execute(() =>
            {
                using (dataSource = new FAMDataContext(context.SecurityContext))
                {
                    dataSource.ConnectionString = "SRA";
                    dataSource.DefaultUser = System.Configuration.ConfigurationManager.AppSettings["S_APP_UID"];
                    dataSource.Initialize();

                    var results = dataSource.GetRequests(modelRequest);
                    listRequests = results;
                }

                return listRequests;
            }, "Retrieve the registered Requests in system."));
        }