private void DispositionEdit_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { LoadItemData(); gunBookCustomer = new CustomerVO(); gunBookCustomer.FirstName = dispositionCustFirstName; gunBookCustomer.LastName = dispositionCustLastName; gunBookCustomer.MiddleInitial = dispositionCustMiddleName; AddressVO addr1 = new AddressVO(); addr1.Address1 = dispositionCustomerAddress1; addr1.City = dispositionCustomerCity; addr1.State_Code = dispositionCustomerState; addr1.ZipCode = dispositionCustomerZipcode; addr1.ContactTypeCode = CustomerAddressTypes.HOME_ADDRESS; addr1.ContMethodTypeCode = "POSTALADDR"; gunBookCustomer.addAddress(addr1); gunBookCustomer.CustomerNumber = dispositionCustNumber; IdentificationVO id = new IdentificationVO(); id.IdType = dispositionCustIDType; id.IdValue = dispositionCustIDNumber; id.IdIssuerCode = dispositionCustIDAgency; id.IsLatest = true; gunBookCustomer.addIdentity(id); CashlinxDesktopSession.Instance.ActiveCustomer = gunBookCustomer; CashlinxDesktopSession.Instance.GunAcquireCustomer = false; CashlinxDesktopSession.Instance.CustomerEditType = CustomerType.DISPOSITION; NavControlBox.IsCustom = true; NavControlBox.CustomDetail = "EditCustomer"; NavControlBox.Action = NavBox.NavAction.BACKANDSUBMIT; }
private void addCustomerButton_Click(object sender, EventArgs e) { string trigger = GlobalDataAccessor.Instance.DesktopSession.HistorySession.Trigger; //CashlinxDesktopSession.Instance.FormState = CashlinxDesktopSession.CustomerFormStates.ADDCUSTOMER; //CustomerController.NavigateUser(ownerFrm); var newCustomer = new CustomerVO { NewCustomer = true }; //get the Search criteria entered by the user var searchCriteria = GlobalDataAccessor.Instance.DesktopSession.ActiveLookupCriteria; //Get store state from desktop session var strStoreState = string.Empty; strStoreState = GlobalDataAccessor.Instance.CurrentSiteId.State; var newAddr = new AddressVO { State_Code = strStoreState, ContactTypeCode = CustomerAddressTypes.HOME_ADDRESS, ContMethodTypeCode = "POSTALADDR" }; newCustomer.addAddress(newAddr); newCustomer.FirstName = searchCriteria.FirstName; newCustomer.LastName = searchCriteria.LastName; if (!string.IsNullOrEmpty(searchCriteria.DOB) && searchCriteria.DOB != "mm/dd/yyyy") { newCustomer.DateOfBirth = Utilities.GetDateTimeValue(searchCriteria.DOB); } if (!string.IsNullOrEmpty(searchCriteria.IDIssuer)) { var idData = new IdentificationVO { IdIssuer = searchCriteria.IDIssuer, IdValue = searchCriteria.IDNumber, IdIssuerCode = searchCriteria.IdIssuerCode, IdType = searchCriteria.IdTypeCode }; newCustomer.addIdentity(idData); if (!string.IsNullOrEmpty(searchCriteria.PhoneNumber)) { var phoneData = new ContactVO { ContactPhoneNumber = searchCriteria.PhoneNumber, ContactAreaCode = searchCriteria.PhoneAreaCode }; newCustomer.addContact(phoneData); } newCustomer.SocialSecurityNumber = searchCriteria.SSN; } GlobalDataAccessor.Instance.DesktopSession.ActiveCustomer = newCustomer; if (trigger.Equals("newpawnloan", StringComparison.OrdinalIgnoreCase)) { this.NavControlBox.IsCustom = true; this.NavControlBox.CustomDetail = "ManagePawnApplication"; this.NavControlBox.Action = NavBox.NavAction.BACKANDSUBMIT; } else { this.NavControlBox.IsCustom = true; this.NavControlBox.CustomDetail = "CreateCustomer"; this.NavControlBox.Action = NavBox.NavAction.BACKANDSUBMIT; } }