public GetCustomerByPhoneNumberResponse GetCustomerByPhoneNumber(GetCustomerByPhoneNumberRequest customerRequest) { GetCustomerByPhoneNumberResponse customerResponse = new GetCustomerByPhoneNumberResponse(); List <Customer> customers = _customerRepo.GetCustomerByPhoneNumber(customerRequest.LocationCode, customerRequest.PhoneNumber, customerRequest.PhoneNumberExt); if (customers != null && customers.Count > 0) { customerResponse.Result = new Result(); customerResponse.Result.ResponseStatus = CustomMessage.SuccessMessage; customerResponse.Result.ResponseStatusCode = CustomMessage.SuccessCode; foreach (var customer in customers) { GetCustomerByPhoneNumberResult customerDetailModel = new GetCustomerByPhoneNumberResult(); customerDetailModel.Accept_Cash = customer.Accept_Cash; customerDetailModel.Accept_Charge_Account = customer.Accept_Charge_Account; customerDetailModel.Accept_Checks = customer.Accept_Checks; customerDetailModel.Accept_Credit_Cards = customer.Accept_Credit_Cards; customerDetailModel.Accept_Gift_Cards = customer.Accept_Gift_Cards; customerDetailModel.Added = customer.Added; customerDetailModel.Added_By = customer.Added_By; customerDetailModel.Address_Line_2 = customer.Address_Line_2; customerDetailModel.Address_Line_3 = customer.Address_Line_3; customerDetailModel.Address_Line_4 = customer.Address_Line_4; customerDetailModel.Address_Type = customer.Address_Type; customerDetailModel.anniversary_date = customer.anniversary_date; customerDetailModel.Customer_GSTIN = customer.Customer_GSTIN; customerDetailModel.Cart = customer.Cart; customerDetailModel.Company_Name = customer.Company_Name; //customerDetailModel.Credit_Limit = customer.Credit_Limit; //customerDetailModel.Cross_Street_Code = customer.Cross_Street_Code; customerDetailModel.Customer_Code = customer.Customer_Code; customerDetailModel.date_of_birth = customer.date_of_birth; customerDetailModel.Delivery_Point_Code = customer.Delivery_Point_Code; //customerDetailModel.Finance_Charge_Rate = customer.Finance_Charge_Rate; customerDetailModel.First_Order_Date = customer.First_Order_Date; customerDetailModel.Last_Order_Date = customer.Last_Order_Date; customerDetailModel.Location_Code = customer.Location_Code; customerDetailModel.Mailing_Address = customer.Mailing_Address; customerDetailModel.Name = customer.Name; //customerDetailModel.Payment_Terms = customer.Payment_Terms; customerDetailModel.Phone_Ext = customer.Phone_Ext; customerDetailModel.Phone_Number = customer.Phone_Number; customerDetailModel.Plus4 = customer.Plus4; customerDetailModel.Postal_Code = customer.Postal_Code; //customerDetailModel.Set_Discount = customer.Set_Discount; //customerDetailModel.Street_Code = customer.Street_Code; customerDetailModel.Phone_Ext = customer.Phone_Ext; customerDetailModel.Street_Number = customer.Street_Number; customerResponse.Result.CustomerDetail = new GetCustomerByPhoneNumberResult(); customerResponse.Result.CustomerDetail = customerDetailModel; } } return(customerResponse); }
public GetCustomerByPhoneNumberResponse GetCustomerByPhoneNumber(GetCustomerByPhoneNumberRequest requestModel) { return(_customerService.GetCustomerByPhoneNumber(requestModel)); }