Esempio n. 1
0
        public async Task <IHttpActionResult> GetCustomerInfo(GetCustomerInfo request)
        {
            var result = await Task.Run(() => {
                return(CustomerFacade.GetCustomer(request.Code, request.IncludeRemainingPoint));
            });

            return(this.Ok(result));
        }
Esempio n. 2
0
        public async Task <IHttpActionResult> GetCustomers(GetCustomerPagingInfo info)
        {
            var result = await Task.Run(() => {
                return(CustomerFacade.GetCustomers(info.PageNo, info.PageSize));
            });

            return(this.Ok(result));
        }
Esempio n. 3
0
        public async Task <IHttpActionResult> AddBuyAmount(RedeemRequest request)
        {
            var result = await Task.Run(() => {
                return(CustomerFacade.AddBuyAmount(request.Code, request.Amount));
            });

            return(this.Ok(result));
        }
Esempio n. 4
0
        public async Task <IHttpActionResult> AddNewCustomer(NewCustomerInfo newCustomer)
        {
            var result = await Task.Run(() => {
                return(CustomerFacade.NewCustomer(newCustomer.NickName,
                                                  newCustomer.FullName,
                                                  newCustomer.Facebook,
                                                  newCustomer.Phone,
                                                  newCustomer.BirthDate,
                                                  newCustomer.Address,
                                                  newCustomer.Amount));
            });

            return(this.Ok(result));
        }