Ejemplo n.º 1
0
        private void SummaryOfDiscussionWizard_Load(object sender, EventArgs e)
        {
            //pbOampsLogoFull.Left = (ClientSize.Width - pbOampsLogoFull.Width) / 2;
            txtClientName.Focus();
            txtClientName.Select();

            var uiScheduler = TaskScheduler.FromCurrentSynchronizationContext();

            base.LoadGenericImageTabs(uiScheduler, tbcWizardScreens, lblCoverPageTitle.Text, lblLogoTitle.Text);

            if (Reload) // this happens if they click the button on the ribbon.
            {
                var template = new SummaryOfDiscussions();
                var values   = _presenter.LoadData(template);
                var v        = ((ISummaryOfDiscussions)values);
                ReloadFields(v);
            }
        }
Ejemplo n.º 2
0
        private void PopulateDocument()
        {
            //buid the marketing template
            var template = new SummaryOfDiscussions
            {
                DocumentTitle    = BasePresenter.ReadDocumentProperty("Title"), //Constants.TemplateNames.FileNote,
                DocumentSubTitle = string.Empty,

                ClientName        = txtClientName.Text,
                ClientCode        = txtClientCode.Text,
                ClientContactName = txtClientContactName.Text,

                DateDiscussion = dateDiscussion.Text,
                TimeDiscussion = timeDiscussion.Text,

                ExecutiveEmail  = txtExecutiveEmail.Text,
                ExecutiveMobile = txtExecutiveMobile.Text,
                ExecutiveName   = txtExecutiveName.Text,
                ExecutivePhone  = txtExecutivePhone.Text,


                ExecutiveDepartment = txtExecutiveDepartment.Text,

                IsDiscussedByPhone  = rdoPhone.Checked.ToString(),
                IsDiscussedInPerson = rdoPerson.Checked.ToString(),
                IsOther             = rdoOther.Checked.ToString(),

                IsDiscussedWithCaller      = rdoCaller.Checked.ToString(),
                IsDiscussedWithCustomer    = rdoCustomer.Checked.ToString(),
                IsDiscussedWithUnderWriter = rdoUnderWriter.Checked.ToString()
            };

            var baseTemplate = (BaseTemplate)template;

            var logoTab = tbcWizardScreens.TabPages[Constants.ControlNames.TabPageLogosName];

            PopulateLogosToTemplate(logoTab, ref baseTemplate);

            //foreach (Control c in logoTab.Controls)
            //{
            //    if (c.GetType() == typeof(ValueRadioButton))
            //    {
            //        var v = ((ValueRadioButton)c);
            //        if (v.Checked)
            //        {
            //            template.LogoImageUrl = v.GetValue(Constants.RadioButtonValues.ImageUrl);
            //        }
            //    }
            //}

            var covberTab = tbcWizardScreens.TabPages[Constants.ControlNames.TabPageCoverPagesName];

            //foreach (Control c in covberTab.Controls)
            //{
            //    if (c.GetType() == typeof(ValueRadioButton))
            //    {
            //        var v = ((ValueRadioButton)c);
            //        if (v.Checked)
            //        {
            //            template.CoverPageImageUrl = v.GetValue(Constants.RadioButtonValues.ImageUrl);
            //        }
            //    }
            //}
            PopulateCoversToTemplate(covberTab, ref baseTemplate);

            //populate the content controls
            _presenter.PopulateData(template);
            _presenter.CreatePropertiesForRadioButtons(rdoCustomer.Checked, rdoCaller.Checked, rdoUnderWriter.Checked, rdoPhone.Checked, rdoPerson.Checked, rdoOther.Checked);

            //change the graphics selected
            //if (Streams == null) return;
            _presenter.PopulateGraphics(template, String.Empty, string.Empty);
        }