Beispiel #1
0
        public ContactView()
        {
            this.Visible = false;
            InitializeComponent();
            repositoryItemComboBoxAuto = new RepositoryItemBVPopupContainerEdit();
            //repositoryItemComboBoxAuto.Validating += new CancelEventHandler(repositoryItemComboBoxAuto_Validating);
            this.Visible = true;
            //gvContact.FocusedRowHandle = 1;
            instance = this;

            m_EventBus.GetEvent<DialogEditorEvents.OnContactDropdownChange>().Subscribe(SelectedDialogContactSetFocused);
        }
Beispiel #2
0
        /// <summary>
        /// Save dialog answers
        /// </summary>
        private bool SaveDialogAnswers(ContactView.eDialogStatus status)
        {
            if (!ValidateDialog()) return false;

            WaitDialog wdiag = new WaitDialog();
            wdiag.CreateNonStaticWaitDialog("Saving dialog answers...");
            IQuestionnaire iQuestion = null;
            var objGroupItems = this.layoutControlGroupQuestionnaire.Items;
            foreach (BaseLayoutItem item in objGroupItems) {
                if (item.IsGroup) {
                    if (item.Tag != null) {
                        iQuestion = item.Tag as IQuestionnaire;
                        BusinessAnswer.SaveAnswer(iQuestion.Questionnaire);
                    }
                }
            }
            if (m_oContactView != null) {
                try {
                    m_oContactView.SaveSubCampaignContactAppointmentStatus(
                        status,
                        oAppointment.FinalListId,
                        oAppointment.AccountId,
                        oAppointment.SubCampaignId);
                } catch { }
                oMode = SaveMode.Unspecified;
                CloseDialogEditor(false);
            }
            wdiag.CloseNonStaticWaitDialog();
            return true;
        }
Beispiel #3
0
        /// <summary>
        /// Load the campaign booking data
        /// </summary>
        public void LoadCampaignBookingData()
        {
            this.InitializeFollowUpView();
            //this.InitEventAndFollowUpObjects();
            this.PopulateFollowUpAssignedToComboList();
            this.InitializeMySalesScriptView();
            this.InitializeContactInformationForm();
            this.InitializeCompanyInformationForm();
            this.InitializeStandardQuestionView();
            this.InitializeCompanyWebsiteView();
            this.InitializeGoogleSearchView();
            this.InitializeCollectedDataView();
            this.InitializeGeoMapContactView();

            this.PopulateAssignToComboList();
            this.PopulateEventFollowUpView();

            m_oContactView = null;
            m_oContactView = new ContactView(oAppointment);
            pnlContactView.Controls.Clear();
            pnlContactView.Controls.Add(m_oContactView);
            m_oContactView.Dock = DockStyle.Fill;
            m_oContactView.GridControlMouseDown += new MouseEventHandler(m_oContactView_GridControlMouseDown);
            m_oContactView.GridControlMouseUp += new MouseEventHandler(m_oContactView_GridControlMouseUp);
            BPContext = new BrightPlatformEntities(UserSession.EntityConnection);

            this.LoadCompanyRemark();
            lcgContactInformation.Selected = true;
        }
Beispiel #4
0
        public void InitializeCampaignBooking()
        {
            m_LoadingFromButtonPress = true;
            m_IsReleaseCancel = false;
            #region Original Code
            //public void LoadCampaignBookingData(bool InitializeOnly = false)
            //this.InitializeMySalesScriptView();
            //this.InitializeContactInformationForm();
            //this.InitializeCompanyInformationForm();
            //this.InitializeStandardQuestionView();
            //this.InitializeCompanyWebsiteView();
            //this.InitializeGoogleSearchView();
            //this.InitializeCollectedDataView();
            //this.InitializeGeoMapContactView();
            #endregion

            #region Contact View
            m_ContactViewOnInitialize = true;
            if (m_oContactView == null) {
                m_oContactView = new ContactView();
                m_oContactView.Dock = DockStyle.Fill;
                m_oContactView.OnContactSaved += new ContactView.ContactSavedEventHandler(m_oContactView_OnContactSaved);
                m_oContactView.GridControlMouseDown += new MouseEventHandler(m_oContactView_GridControlMouseDown);
                m_oContactView.GridControlMouseUp += new MouseEventHandler(m_oContactView_GridControlMouseUp);
                m_oContactView.GridControlKeyUp += new KeyEventHandler(m_oContactView_GridControlKeyUp);
                m_oContactView.GridControlKeyDown += new KeyEventHandler(m_oContactView_GridControlKeyDown);
                m_oContactView.ActiveChanged += new ContactView.ActiveChangedEventHander(m_oContactView_ActiveChanged);
                m_oContactView.PopulateContactView_Initiated += new ContactView.PopulateContactViewInitiatedEventHandler(m_oContactView_PopulateContactView_Initiated);
                pnlContactView.Controls.Clear();
                pnlContactView.Controls.Add(m_oContactView);
            }
            m_ContactViewOnInitialize = false;
            #endregion

            #region Dialog Editor
            if (m_oDialogEditor == null) {
                m_oDialogEditor = new DialogEditor() {
                    Dock = DockStyle.Fill
                };
                pnlDialogEditor.Controls.Clear();
                pnlDialogEditor.Controls.Add(m_oDialogEditor);
                m_oContactView.DialogEditorModule = m_oDialogEditor;
            }
            #endregion

            #region Event Followup Log
            if (m_oEventFollowupLog == null) {
                m_oEventFollowupLog = new EventFollowUpLog() {
                    AllowSaving = true,
                    Dock = DockStyle.Fill
                };
                pnlEventFollowUpLog.Controls.Clear();
                pnlEventFollowUpLog.Controls.Add(m_oEventFollowupLog);
            }
            #endregion

            #region Campaign Extra Detail
            if (m_CampaignExtraDetail == null) {
                m_CampaignExtraDetail = new CampaignExtraDetail() {
                    CallingEnvironment = SelectionProperty.CallingEnvironment.CampaignBooking
                };

                m_CampaignExtraDetail.Dock = DockStyle.Fill;
                pnlCampaignExtraDetail.Controls.Clear();
                pnlCampaignExtraDetail.Controls.Add(m_CampaignExtraDetail);
            }
            #endregion
        }
Beispiel #5
0
 private void m_oContactView_PopulateContactView_Initiated(object sender, ContactView.PopulateContactViewArgs e)
 {
     if (oContactView_PopulateContactView_Initiated != null)
         oContactView_PopulateContactView_Initiated(this, new ContactViewPopulateContactView() {
             ContactPersons = e.ContactPersons,
             SelectedContactPersonIndex = e.SelectedContactPersonIndex
         });
 }
Beispiel #6
0
        private void m_oContactView_OnContactSaved(object sender, ContactView.ContactEventArgs e)
        {
            m_CampaignExtraDetail.ReloadContacInformationtData = true;
            m_CampaignExtraDetail.LoadSelectedPage();
            m_oDialogEditor.SelectedContact = m_BrightSalesProperty.CommonProperty.ContactPerson;
            m_oDialogEditor.SubCampaignContactList = m_oContactView.ContactList;
            m_oDialogEditor.RefreshContactAttendies();
            //m_oDialogEditor.BindDialogManagerData();
            m_oDialogEditor.BindDialogManagerData(true); // marker...

            if (ContactView_OnContactSaved != null)
                ContactView_OnContactSaved(this, new ContactViewOnContactSavedArgs() {
                    ContactPerson = m_BrightSalesProperty.CommonProperty.ContactPerson
                });
        }