Beispiel #1
0
        // GET api/<controller>/5
        public IHttpActionResult Get(string enumType)
        {
            IRequestContext rc = new RequestContext("gdeleon", "!password!", 92749, "solismammotest", null, "", "");

            GlobalContext.Add(rc);

            IAccountService accSer = ServiceFactory <IAccountService> .CreateNew();

            var hcpcsEnums = accSer.GetAccountEnumsByType(enumType);

            return(Ok(hcpcsEnums));
        }
Beispiel #2
0
        // POST api/<controller>
        public void Post([FromBody] AccountEnumDto accountEnumDto)
        {
            IRequestContext rc = new RequestContext("gdeleon", "!password!", 92749, "solismammotest", null, "", "");

            GlobalContext.Add(rc);

            IAccountService accSer = ServiceFactory <IAccountService> .CreateNew();

            AccountEnumsDto accEnums = new AccountEnumsDto()
            {
                AccountEnums = new List <AccountEnumDto>()
            };

            accEnums.AccountEnums.Add(accountEnumDto);
            accSer.InsertUpdateAccountEnum(accEnums);
        }
Beispiel #3
0
        public void Configuration(IAppBuilder app)
        {
            String cs = @"Server=172.31.25.70;uid=sa;pwd=stagingsa;Trusted_Connection=False;Application Name=MachinesLocalDebuggingApplication;";
            //Set initial configuration for application.

            //Set all the application settings here.
            IApplicationSetting appSet = new ApplicationSetting(100, 4, cs, cs);

            GlobalContext.Add(appSet);


            var httpConfiguration = new HttpConfiguration();

            // Configure Web API Routes:
            // - Enable Attribute Mapping
            // - Enable Default routes at /api.
            httpConfiguration.MapHttpAttributeRoutes();
            httpConfiguration.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
                );

//#if DEBUG
            //Allow cros just for debug mode.
            app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
//#endif

            app.UseWebApi(httpConfiguration);

            //app.

            // Make ./public the default root of the static files in our Web Application.
            app.UseFileServer(new FileServerOptions
            {
                RequestPath             = new PathString(string.Empty),
                FileSystem              = new PhysicalFileSystem("./public"),
                EnableDirectoryBrowsing = true,
            });

            app.UseStageMarker(PipelineStage.MapHandler);
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            IRequestContext     rc     = new RequestContext("gdeleon", "!password!", 92749, "solismammotest", null, "", "");
            IApplicationSetting appSet = new ApplicationSetting(100, 4, cs);

            GlobalContext.Add(rc);
            GlobalContext.Add(appSet);

            IAccountService accSer = ServiceFactory <IAccountService> .CreateNew();

            var hcpcsEnums = accSer.GetAccountEnumsByType("HCPCS");

            //ITransactionFactory tFactory = new TransactionFactory(cs);

            ////Need to have request context to call this method
            //using (ITransactionManager manager = tFactory.CreateManager())
            //{
            //    var res = manager.ExecuteReadOnlyCommand<IAccountRepository>(Handler);
            //    //var accounts = res.FindAllAccounts();
            //}
        }