public Invoice() { InitializeComponent(); this.spreadsheetControl1.Options.Culture = DefaultCulture; generator = new InvoiceDocumentGenerator(spreadsheetControl1.Document); PrepareGoods(); gridGoods.DataContext = generator.InvoiceGoods; Process(); ribbonControl1.SelectedPage = pageHome; }
void TransferInvoiceParameters(InvoiceDocumentGenerator generator) { generator.ApplyParameter(InvoiceDocumentGenerator.FromAddressId, editFromCompanyStreet.Text); generator.ApplyParameter(InvoiceDocumentGenerator.FromCityId, editFromCompanyCity.Text); generator.ApplyParameter(InvoiceDocumentGenerator.FromCompanyId, editFromCompany.Text); generator.ApplyParameter(InvoiceDocumentGenerator.FromCompanySloganId, editFromCompanySlogan.Text); generator.ApplyParameter(InvoiceDocumentGenerator.FromContactNameId, editFromCompanyContactName.Text); generator.ApplyParameter(InvoiceDocumentGenerator.FromEMailId, editFromCompanyEmail.Text); generator.ApplyParameter(InvoiceDocumentGenerator.FromFaxId, editFromCompanyFax.Text); generator.ApplyParameter(InvoiceDocumentGenerator.FromPhoneId, editFromCompanyPhone.Text); generator.ApplyParameter(InvoiceDocumentGenerator.FromStateId, editFromCompanyState.Text); generator.ApplyParameter(InvoiceDocumentGenerator.FromZipId, editFromCompanyZip.Text); generator.ApplyParameter(InvoiceDocumentGenerator.ToCityId, editToCity.Text); generator.ApplyParameter(InvoiceDocumentGenerator.ToCompanyId, editToCompany.Text); generator.ApplyParameter(InvoiceDocumentGenerator.ToNameId, editToName.Text); generator.ApplyParameter(InvoiceDocumentGenerator.ToPhoneId, editToPhone.Text); generator.ApplyParameter(InvoiceDocumentGenerator.ToStateId, editToState.Text); generator.ApplyParameter(InvoiceDocumentGenerator.ToStreetId, editToStreet.Text); generator.ApplyParameter(InvoiceDocumentGenerator.ToZipId, editToZip.Text); }