Esempio n. 1
0
        private bool UpdateCustomerPaymentProfile(TissueBankUpdate_DTO tissueBankUpdate_DTO)
        {
            CustomService.AllocatCustomServiceClient obj = new AllocatCustomServiceClient();
            CustomerPaymentProfile objCustomer           = new CustomerPaymentProfile();
            CreditCard             credit  = new CreditCard();
            AddressInfo            address = new AddressInfo();

            credit.CreditCardNumber = tissueBankUpdate_DTO.CreditCardNumber;
            credit.CreditCardType   = tissueBankUpdate_DTO.CreditCardType;
            credit.CardCode         = tissueBankUpdate_DTO.CardCode;
            credit.ExpiryDate       = tissueBankUpdate_DTO.ExpiryDate;
            objCustomer.CardInfo    = credit;
            objCustomer.CustomerPaymentProfileId = tissueBankUpdate_DTO.CustomerPaymentProfileIds;
            objCustomer.CustomerProfileId        = tissueBankUpdate_DTO.CustomerProfileId;
            objCustomer.isUpdateCreditCardInfo   = true;

            address.Address     = tissueBankUpdate_DTO.BillingAddress;
            address.City        = tissueBankUpdate_DTO.BillingCity;
            address.Company     = tissueBankUpdate_DTO.TissueBankName;
            address.Country     = "US";
            address.ZipCode     = tissueBankUpdate_DTO.BillingZipCode;
            address.Email       = tissueBankUpdate_DTO.BillingEmailId;
            address.FaxNumber   = tissueBankUpdate_DTO.BillingFaxNumber;
            address.FirstName   = tissueBankUpdate_DTO.ContactPersonFirstName;
            address.LastName    = tissueBankUpdate_DTO.ContactPersonLastName;
            address.PhoneNumber = tissueBankUpdate_DTO.BillingContactNumber;
            address.State       = tissueBankUpdate_DTO.BillingState;
            objCustomer.BillTo  = address;

            // calling service method
            bool response = obj.UpdateCustomerPaymentProfile(objCustomer);

            return(response);
        }
Esempio n. 2
0
        public virtual void CustomerPaymentProfile_RowUpdated(PXCache cache, PXRowUpdatedEventArgs e)
        {
            CustomerPaymentProfile row = e.Row as CustomerPaymentProfile;

            if (row?.Selected == true)
            {
                foreach (CCSynchronizeCard syncCard in GetRecordsWithSameCustomerCCPID(row.PCCustomerID))
                {
                    if (syncCard.RecordID == row.RecordID && !syncCard.BAccountID.HasValue)
                    {
                        syncCard.BAccountID = row.BAccountID;
                        CustomerCardPaymentData.Update(syncCard);
                        CustomerCardPaymentData.View.RequestRefresh();
                    }
                }
            }
        }
Esempio n. 3
0
            public static CustomerPaymentProfile CreateFromSyncCard(CCSynchronizeCard syncCard)
            {
                CustomerPaymentProfile ret = new CustomerPaymentProfile()
                {
                    RecordID                = syncCard.RecordID,
                    CustomerCCPID           = syncCard.CustomerCCPID,
                    PCCustomerDescription   = syncCard.PCCustomerDescription,
                    PCCustomerEmail         = syncCard.PCCustomerEmail,
                    PCCustomerID            = syncCard.PCCustomerID,
                    BAccountID              = syncCard.BAccountID,
                    PaymentProfileFirstName = syncCard.FirstName,
                    PaymentProfileLastName  = syncCard.LastName,
                    PaymentCCPID            = syncCard.PaymentCCPID
                };

                return(ret);
            }
Esempio n. 4
0
        private int PopulatePaymentProfileForDialog(string customerID, int?bAccountID)
        {
            int insertedRow = 0;

            customerID = DeleteCustomerPrefix(customerID);
            PXResultset <CCSynchronizeCard> results = CustomerCardPaymentData.Select();

            foreach (CCSynchronizeCard item in results)
            {
                string chkCustromerID = DeleteCustomerPrefix(item.PCCustomerID);
                if (!item.BAccountID.HasValue && chkCustromerID == customerID)
                {
                    CustomerPaymentProfile cpp = CustomerPaymentProfile.CreateFromSyncCard(item);
                    cpp.BAccountID = bAccountID;
                    CustPaymentProfileForDialog.Insert(cpp);
                    insertedRow++;
                }
            }

            return(insertedRow);
        }