Пример #1
0
        public bool block([FromUri] Guid id, Guid customerId)
        {
            bool result = false;

            if (string.IsNullOrEmpty(id.ToString()))
            {
                tbl_Customer customer = customerAccountsManager.CustomerDetails(customerId);

                result = atmCardsManager.BlockAtmCard(id, customer);
            }

            return(result);
        }
Пример #2
0
        public HttpResponseMessage GetCustomerByNumber(String customerNo)
        {
            if (String.IsNullOrWhiteSpace(customerNo))
            {
                String    message = "Empty customer number";
                HttpError err     = new HttpError(message);
                return(Request.CreateResponse(HttpStatusCode.NotFound, err));
            }

            tbl_Customer customer = customerAccountsManager.CustomerDetails(customerNo);

            if (customer == null)
            {
                String    notFoundMessage = String.Format("Member number {0} not found", customerNo);
                HttpError err             = new HttpError(notFoundMessage);
                return(Request.CreateResponse(HttpStatusCode.NotFound, err));
            }

            return(Request.CreateResponse(HttpStatusCode.OK, customer));
        }