public DataViewForm(ExtractedData extractedData) { InitializeComponent(); fullNameTextBox.Text = extractedData.FullName; addressTextBox.Text = extractedData.Address; bplTextBox.Text = extractedData.BirthPlace; dobTextBox.Text = extractedData.DateOfBirth; innTextBox.Text = extractedData.Inn; allDebtNumericUpDown.Value = Convert.ToDecimal(extractedData.AllDebt); debtStructureRichTextBox.Text = extractedData.DebtStructure; bankDetailsRichTextBox.Text = extractedData.BankDetails; stateDutyNumericUpDown.Value = extractedData.CalculateStateDuty(); }
/// <summary> /// Вставляет извлеченные данные в шаблон. /// </summary> /// <param name="rtf">Строка в формате RTF (richTextBox.Rtf).</param> /// <param name="extractedData">Объект с извлеченными из заявления данными.</param> /// <returns>Строка в формате RTF (richTextBox.Rtf).</returns> private string CreateCourtOrder(string rtf, ExtractedData extractedData) { rtf = rtf.Replace("#FULLNAME#", extractedData.FullName); rtf = rtf.Replace("#FULLNAMEGENITIVE#", extractedData.FullNameGenitive); rtf = rtf.Replace("#DATEOFBIRTH#", extractedData.DateOfBirth); rtf = rtf.Replace("#PLACEOFBIRTH#", extractedData.BirthPlace); rtf = rtf.Replace("#ADDRESS#", extractedData.Address); rtf = rtf.Replace("#INDIVIDUALTAXNUMBER#", extractedData.Inn); rtf = rtf.Replace("#DEBTSTRUCTURE#", extractedData.DebtStructure); rtf = rtf.Replace("#GOSPOSHLINA#", extractedData.CalculateStateDuty().ToString()); rtf = rtf.Replace("#BANKDETAILS#", extractedData.BankDetails); return(rtf); }