Esempio n. 1
0
 private void BindCurrentCallToProspectCustomer()
 {
     if (ExistingCallId > 0 && ProspectCustomerId > 0)
     {
         var callWizardService = new CallCenterCallWizardService();
         callWizardService.BindCurrentCallToProspectCustomer(ExistingCallId, ProspectCustomerId, IoC.Resolve <ISessionContext>().UserSession.UserId);
     }
 }
Esempio n. 2
0
    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);
            }
        }
    }
Esempio n. 3
0
        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);
                }
            }
        }
Esempio n. 4
0
    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);
    }