Beispiel #1
0
        public Home()
        {
            GatewayClass gw = new GatewayClass();

            Get("/", (p) =>
            {
                gw.setpath("D:\\Apps\\Infusion\\--DEMO--");
                gw.login("Test Program");

                return(View["index.html"]);
            });

            Get("/customers", (p) =>
            {
                gw.setpath("D:\\Apps\\Infusion\\--DEMO--");
                gw.login("Test Program");

                gw.Open("Customer", "all_customers");
                gw.Select("all_customers");
                var count = gw.Reccount();

                return(Response.AsJson(new
                {
                    totalCount = count
                }));
            });
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            //get input
            var input = GetInput();

            string[] arrayOfRowsByNewlines = input.Split('\n');
            if (!isAlphaPresent(input.Replace("\r\n", "")))
            {
                var tableHolder = ConvertTheTriangleIntoTable(arrayOfRowsByNewlines);
                if (tableHolder.Length > 0)
                {
                    GatewayClass obj = new GatewayClass(new TMaxSummOddEven());//dependency injection
                    obj.ShowOutput(arrayOfRowsByNewlines.Length, tableHolder);
                }
                else
                {
                    Console.WriteLine("The Input is not valid triangle !!");
                    Console.ReadKey();
                }
            }
            else
            {
                Console.WriteLine("Alphabet is not allowed in triangle !!");
                Console.ReadKey();
            }
        }
        public GatewayClass CreateGateway()
        {
            GatewayClass gw = new GatewayClass();

            gw.setpath("D:\\Apps\\Infusion\\--DEMO--");

            return(gw);
        }