예제 #1
0
        public async void Init()
        {
            var request = new SqlessSelectRequest()
            {
                AccessParams = new string[] { WpfGlobal.LoginUser.Uid, WpfGlobal.LoginUser.Password },
                Table        = Tables.Order
            };

            request.LoadFromType(typeof(Order));

            try {
                var orders = await SqlessClient.Select <Order>(request);

                foreach (var order in orders)
                {
                    Orders.Add(order);
                }
            } catch (SqlessRequestException ex) {
                MessageBox.Show(ex.Message);
            }
        }
예제 #2
0
        public async void Init()
        {
            var request = new SqlessSelectRequest()
            {
                AccessParams = new string[] { User.Uid, User.Password },
                Table        = Tables.Product
            };

            request.LoadFromType(typeof(Product));

            try
            {
                var products = await SqlessClient.Select <Product>(request);

                foreach (var product in products)
                {
                    Products.Add(product);
                }
            }
            catch (SqlessRequestException ex)
            {
                MessageBox.Show(ex.Message);
            }
        }