コード例 #1
0
        public async Task <IActionResult> UpdatePhoneNumberNoRegister(CustomerWithoutBind request)
        {
            if (request.isConsent != true)
            {
                dc = new Dictionary <string, string>();
                dc.Add("refCode", "");
                dc.Add("result", "กรุณายืนยันความถูกต้องของข้อมูล");
                return(BadRequest(dc));
            }
            string msg = "";

            result = new ResultUpdate();
            acc.REST_KeepLogRequest("request", func.JsonSerialize(request));
            if (string.IsNullOrEmpty(request.PhoneNumber) || string.IsNullOrEmpty(request.BirthDay) || string.IsNullOrEmpty(request.IDCard))
            {
                result.phoneNumber = "";
                result.result      = "Data is Empty";
                acc.REST_KeepLogRequest("Data is Empty", func.JsonSerialize(request));
                return(NotFound(result));
            }
            // msg = management.REST_UpdateMobileNotRegister(request.IDCard, request.BirthDay, request.PhoneNumber, request.TicketID, request.ApproveBy, request.isConsent);
            msg = management.REST_UpdateMobileNotRegister(request.IDCard, request.BirthDay, request.PhoneNumber, request.isConsent);
            result.phoneNumber = request.PhoneNumber;
            result.result      = msg;
            return(Ok(result));
        }