Пример #1
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            try
            {
                SetupProgressStyle();
                Task.Factory.StartNew(() => Thread.Sleep(100)).Wait();
                Convert();
                _presenter.CloseInfoPanel();

                var w = new BaseWizardForm();
                var t = new QuoteSlip();
                t.DocumentTitle = "Quote Slip";
                w.LogUsage(t, Enums.UsageTrackingType.ConvertDocument);


                ThisAddIn.IsWizzardRunning = false;
            }
            catch (Exception)
            {
                //todo: implement logger
            }
            finally
            {
                Close();
            }
        }
Пример #2
0
        private QuoteSlip GenerateTempalteObject()
        {
            //buid the marketing template
            var template = new QuoteSlip
            {
                DocumentTitle         = "Quotation Slip", //BaseWizardPresenter.ReadDocumentProperty("Title"), //Constants.TemplateNames.InsuranceRenewalReport,
                DocumentSubTitle      = string.Empty,
                ClientName            = txtClientName.Text,
                ClientCommonName      = txtClientCommonName.Text,
                PeriodOfInsuranceFrom = dtpPeriodOfInsuranceFrom.Text,
                PeriodOfInsuranceTo   = dtpPeriodOfInsuranceTo.Text,

                ExecutiveName       = txtExecutiveName.Text,
                ExecutiveEmail      = txtExecutiveEmail.Text,
                ExecutivePhone      = txtExecutivePhone.Text,
                ExecutiveTitle      = txtExecutiveTitle.Text,
                ExecutiveMobile     = txtExecutiveMobile.Text,
                ExecutiveDepartment = txtExecutiveDepartment.Text,
                OAMPSBranchPhone    = txtBranchPhone.Text,
                Fax = txtFax.Text,
                OAMPSPostalAddress      = txtPostal1.Text,
                OAMPSPostalAddressLine2 = txtPostal2.Text,

                AssistantExecutiveName  = txtAssistantExecutiveName.Text,
                AssistantExecutiveTitle = txtAssistantExecutiveTitle.Text,
                AssistantExecutivePhone = txtAssistantExecutivePhone.Text,
                AssistantExecutiveEmail = txtAssistantExecutiveEmail.Text,
                AssistantExecDepartment = txtAssitantExecDepartment.Text,

                OAMPSBranchAddress      = txtBranchAddress1.Text,
                OAMPSBranchAddressLine2 = txtBranchAddress2.Text,

                DatePrepared              = DateTime.Now.ToString(@"dd/MM/yyyy"),
                DateRequiredBy            = dtpDateRequired.Value.ToString(@"dd/MM/yyyy"),
                SelectedDocumentFragments = _selectedQuestionnaireFragments,
                PopulateApprovalForm      = _populateApprovalForm,
                PopulateClaimMadeWarning  = _populateClaimMadeWarning
            };


            var     baseTemplate = (BaseTemplate)template;
            TabPage logoTab      = tbcWizardScreens.TabPages[Constants.ControlNames.TabPageLogosName];

            PopulateLogosToTemplate(logoTab, ref baseTemplate);

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

            PopulateCoversToTemplate(covberTab, ref baseTemplate);

            return(template);
        }