private void BindCurrentCallToProspectCustomer() { if (ExistingCallId > 0 && ProspectCustomerId > 0) { var callWizardService = new CallCenterCallWizardService(); callWizardService.BindCurrentCallToProspectCustomer(ExistingCallId, ProspectCustomerId, IoC.Resolve <ISessionContext>().UserSession.UserId); } }
private void SaveProspectCustomer() { if (CurrentProspectCustomer != null && !string.IsNullOrEmpty(CurrentProspectCustomer.FirstName) && !string.IsNullOrEmpty(CurrentProspectCustomer.LastName) && CurrentProspectCustomer.CallBackPhoneNumber != null && !string.IsNullOrEmpty(CurrentProspectCustomer.CallBackPhoneNumber.ToString()) && CurrentProspectCustomer.CallBackPhoneNumber.ToString() != "(___)-___-____") { IUniqueItemRepository <ProspectCustomer> uniqueItemRepository = new ProspectCustomerRepository(); var prospectCustomer = uniqueItemRepository.Save(CurrentProspectCustomer); CurrentProspectCustomer = prospectCustomer; if (CallId != null && CallId > 0 && prospectCustomer.Id > 0) { var callWizardService = new CallCenterCallWizardService(); callWizardService.BindCurrentCallToProspectCustomer(CallId.Value, prospectCustomer.Id, IoC.Resolve <ISessionContext>().UserSession.UserId); } } }
private void SaveProspectCustomerNew(ProspectCustomer prospectCustomer) { if (prospectCustomer != null && !string.IsNullOrEmpty(prospectCustomer.FirstName) && !string.IsNullOrEmpty(prospectCustomer.LastName) && prospectCustomer.CallBackPhoneNumber != null && !string.IsNullOrWhiteSpace(prospectCustomer.CallBackPhoneNumber.ToString()) && prospectCustomer.CallBackPhoneNumber.ToString() != "(___)-___-____") { var isNewProspectCustomer = prospectCustomer.Id <= 0; IUniqueItemRepository <ProspectCustomer> uniqueItemRepository = new ProspectCustomerRepository(); prospectCustomer = uniqueItemRepository.Save(prospectCustomer); CurrentProspectCustomerId = prospectCustomer.Id; if (isNewProspectCustomer && ExistingCallId > 0 && CurrentProspectCustomerId > 0) { var callWizardService = new CallCenterCallWizardService(); callWizardService.BindCurrentCallToProspectCustomer(ExistingCallId, CurrentProspectCustomerId, IoC.Resolve <ISessionContext>().UserSession.UserId); } } }
protected void SelectPropsectCustomerLink_Click(object sender, EventArgs e) { long prospectCustomerId = Convert.ToInt64(((LinkButton)sender).CommandArgument); IProspectCustomerRepository prospectCustomerRepository = new ProspectCustomerRepository(); var prospectCustomer = prospectCustomerRepository.GetProspectCustomer(prospectCustomerId); CurrentProspectCustomer = prospectCustomer; if (CallId != null && CallId > 0) { var callWizardService = new CallCenterCallWizardService(); callWizardService.BindCurrentCallToProspectCustomer(CallId.Value, prospectCustomer.Id, IoC.Resolve <ISessionContext>().UserSession.UserId); } Response.RedirectUser("CustomerOptions.aspx?guid=" + GuId); }