void bwLookupPawnTicket_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { _procMsg.Update(); _procMsg.Close(); _procMsg.Dispose(); if (!_retValue) { MessageBox.Show(Commons.GetMessageString("InvalidTicketMessage"), "Prompt", MessageBoxButtons.OK); errorLabel.Text = Commons.GetMessageString("LookupTicketInvalidMessage"); errorLabel.Visible = true; return; } if (_pawnApplication == null) { errorLabel.Text = Commons.GetMessageString("LookupTicketInvalidMessage"); errorLabel.Visible = true; return; } if (_pawnApplication == null || _pawnLoan == null) { MessageBox.Show(Commons.GetMessageString("InvalidTicketMessage"), "Prompt", MessageBoxButtons.OK); errorLabel.Text = Commons.GetMessageString("LookupTicketInvalidMessage"); errorLabel.Visible = true; return; } if (string.IsNullOrEmpty(_custObject.PartyId)) { DialogResult dgr = MessageBox.Show(Commons.GetMessageString("LookupTicketNoCustomerMessage"), "Warning", MessageBoxButtons.RetryCancel); if (dgr != DialogResult.Retry) { NavControlBox.Action = NavBox.NavAction.CANCEL; } return; } GlobalDataAccessor.Instance.DesktopSession.ClearPawnLoan(); GlobalDataAccessor.Instance.DesktopSession.TicketLookedUp = _ticketNumber; GlobalDataAccessor.Instance.DesktopSession.TicketTypeLookedUp = ProductType.PAWN; GlobalDataAccessor.Instance.DesktopSession.PH_TicketLookedUp = _ticketNumber; GlobalDataAccessor.Instance.DesktopSession.PH_TicketTypeLookedUp = ProductType.PAWN; GlobalDataAccessor.Instance.DesktopSession.PH_TicketLookedUpActive = _pawnLoan.LoanStatus == ProductStatus.IP; GlobalDataAccessor.Instance.DesktopSession.PawnApplications.Add(_pawnApplication); GlobalDataAccessor.Instance.DesktopSession.ActiveCustomer = _custObject; GlobalDataAccessor.Instance.DesktopSession.CurPawnAppId = _pawnApplication.PawnAppID.ToString(); GlobalDataAccessor.Instance.DesktopSession.PawnLoans.Add(_pawnLoan); this.NavControlBox.Action = NavBox.NavAction.HIDEANDSHOW; }
void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { procMsg.Update(); procMsg.Close(); procMsg.Dispose(); SetButtonState(true); }
void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { _procMsg.Update(); _procMsg.Close(); _procMsg.Dispose(); SetButtonState(true); if (_updatePhoneData) { MessageBox.Show(Commons.GetMessageString("CustContactInfoUpdateSuccess")); //Update the customer object with the updated information CustomerVO updatedCustomer = new CustomerVO { NoCallFlag = _noCalls, NoEmailFlag = _noEmails, NoFaxFlag = _noFaxes, NoMailFlag = _noMail, OptOutFlag = _optOut, ReminderContact = _remindPmtDue, PreferredContactMethod = _preferContact, PreferredCallTime = _preferCallTime, HearAboutUs = _howDidYouHear, ReceivePromotionOffers = _receiveOffers }; //set the phone data for the customer if (_custPhone != null) { foreach (DataRow contact in _custPhone.Rows) { ContactVO custcontact = new ContactVO { TelecomNumType = Utilities.GetStringValue( contact.ItemArray[ (int)customerphonerecord.TELECOMNUMTYPECODE], ""), ContactAreaCode = Utilities.GetStringValue( contact.ItemArray[(int)customerphonerecord.AREADIALNUMCODE], ""), ContactPhoneNumber = Utilities.GetStringValue( contact.ItemArray[(int)customerphonerecord.TELECOMNUMBER], ""), ContactExtension = Utilities.GetStringValue( contact.ItemArray[(int)customerphonerecord.EXTENSIONNUMBER], ""), ContactType = Utilities.GetStringValue( contact.ItemArray[(int)customerphonerecord.CONTACTTYPECODE], ""), TeleusrDefText = Utilities.GetStringValue( contact.ItemArray[(int)customerphonerecord.TELEUSRDEFTEXT], ""), CountryDialNumCode = Utilities.GetStringValue( contact.ItemArray[ (int)customerphonerecord.COUNTRYDIALNUMCODE], "") }; updatedCustomer.addContact(custcontact); } } //Set the Email data for the customer if (_custEmail != null) { foreach (DataRow email in _custEmail.Rows) { string emailAddr = Utilities.GetStringValue(email.ItemArray[(int)customeremailrecord.EMAILADDRESS], ""); string emailAddrType = Utilities.GetStringValue(email.ItemArray[(int)customeremailrecord.EMAILADDRESSTYPECODE], ""); string contactinfoid = Utilities.GetStringValue(email.ItemArray[(int)customeremailrecord.CONTACTINFOID], ""); CustomerEmailVO custemail = new CustomerEmailVO(emailAddr, emailAddrType, contactinfoid); updatedCustomer.addEmail(custemail); } } Form ownerForm = this.Owner; if (ownerForm.GetType() == typeof(ViewCustomerInformation)) { ((ViewCustomerInformation)ownerForm).UpdatedCustomerToView = updatedCustomer; ((ViewCustomerInformation)ownerForm).ShowUpdates = true; } } }
void bwLookupLayawayTicket_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { _procMsg.Update(); _procMsg.Close(); _procMsg.Dispose(); SetButtonState(true); if (!_retValue) { ShowInvalidTicketMessage(); return; } //TODO: Make this a rule!!! Also subtract from ShopDateTime.Instance.ShopDate, not datetime.now TimeSpan spanYears = new TimeSpan(); spanYears = DateTime.Now.Subtract(_layaway.DateMade); if (spanYears.Days > 730) { ShowInvalidTicketMessage(); return; } if (_layaway.LoanStatus != ProductStatus.ACT) { string msg = "This ticket number is inactive. Do you want to view the details for the ticket?"; if (MessageBox.Show(msg, "Warning", MessageBoxButtons.YesNo) == DialogResult.No) { return; } } if (_custObject.PartyId == string.Empty || _layaway == null) { DialogResult dgr = MessageBox.Show(Commons.GetMessageString("LookupTicketNoCustomerMessage"), "Warning", MessageBoxButtons.RetryCancel); if (dgr != DialogResult.Retry) { NavControlBox.Action = NavBox.NavAction.CANCEL; } return; } GlobalDataAccessor.Instance.DesktopSession.ClearPawnLoan(); GlobalDataAccessor.Instance.DesktopSession.TicketLookedUp = _ticketNumber; GlobalDataAccessor.Instance.DesktopSession.TicketTypeLookedUp = ProductType.LAYAWAY; GlobalDataAccessor.Instance.DesktopSession.PH_TicketLookedUp = _ticketNumber; GlobalDataAccessor.Instance.DesktopSession.PH_TicketTypeLookedUp = ProductType.LAYAWAY; GlobalDataAccessor.Instance.DesktopSession.PH_TicketLookedUpActive = _layaway.LoanStatus == ProductStatus.ACT; GlobalDataAccessor.Instance.DesktopSession.ActiveCustomer = _custObject; GlobalDataAccessor.Instance.DesktopSession.Layaways.Add(_layaway); //BZ # 490 //this.NavControlBox.Action = NavBox.NavAction.HIDEANDSHOW; GlobalDataAccessor.Instance.DesktopSession.CustomerNotPledgor = false; GlobalDataAccessor.Instance.DesktopSession.PawnLoans = new List<PawnLoan>(); NavControlBox.IsCustom = true; NavControlBox.CustomDetail = GlobalDataAccessor.Instance.DesktopSession.PH_TicketLookedUpActive ? "ViewPawnCustomerProductDetails" : "ViewPawnCustomerProductHistory"; if (_layaway.LoanStatus != ProductStatus.ACT) NavControlBox.Action = NavBox.NavAction.BACKANDSUBMIT; else NavControlBox.Action = NavBox.NavAction.BACKANDSUBMIT; //BZ # 490 - end }