62fbf99073
continuous-integration/drone/push Build is passing
Two fixes needed together to make the new 3-page เอกสารแนบ ร.1 template
actually render:
1. rmutr_report keeps its own separate copy of the form_1_2 C# model
(Models/RoReport/form_1_2.cs), which never got the New2570-spec
fields (division_name, request_count, overall_reason, signer_*,
approver_*) or the form_1_2_positions child list that rmutr-api's
model already has. FastReport's RegisterData binds by reflecting
the actual runtime object, so any Dictionary column not present on
this local class silently fails to compile ("does not exist in
current context") for every field on it.
2. Nested BusinessObjectDataSource fields must be referenced by their
full dotted path from the report root ([form_1_2.form_1_2_positions.
field]), not the bare child name ([form_1_2_positions.field]) —
confirmed against another working report (academic_position.frx)
in this same codebase that uses the identical nesting pattern
correctly.
Verified locally: report now compiles and reaches PDF export (the
only remaining local failure is a NullReferenceException in libgdiplus
font handling specific to this macOS dev machine, unrelated to the
report itself — production runs Linux where this already works for
every other report using TH Sarabun New).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
127 lines
3.8 KiB
C#
127 lines
3.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace rmutr_report.Models.RoThree
|
|
{
|
|
public class form_1_2
|
|
{
|
|
[Key] public Guid? form_1_2_uid { get; set; }
|
|
public string no { get; set; }
|
|
|
|
public DateTime? date { get; set; }
|
|
public string dates { get; set; }
|
|
|
|
//
|
|
public string subject { get; set; }
|
|
//
|
|
|
|
public string dear { get; set; }
|
|
|
|
//
|
|
public string first_name_th { get; set; }
|
|
|
|
public string last_name_th { get; set; }
|
|
|
|
//
|
|
public string position_no { get; set; }
|
|
|
|
public string position { get; set; }
|
|
|
|
//
|
|
public string agency_name_th { get; set; }
|
|
|
|
public string agency_category_name { get; set; }
|
|
|
|
//
|
|
public DateTime? start_working { get; set; }
|
|
public string day_start_workings { get; set; }
|
|
public string month_start_workings { get; set; }
|
|
public string year_start_workings { get; set; }
|
|
public string year_working { get; set; }
|
|
|
|
public string year_month { get; set; }
|
|
|
|
//
|
|
public string wish { get; set; }
|
|
|
|
//
|
|
public string old_position { get; set; }
|
|
|
|
public string qualification { get; set; }
|
|
|
|
//
|
|
public decimal? salary { get; set; }
|
|
|
|
public string new_position { get; set; }
|
|
|
|
//
|
|
public Guid? budget_project_uid { get; set; }
|
|
public Guid? budget_plan_uid { get; set; }
|
|
public string new_qualification { get; set; }
|
|
public string new_salaray { get; set; }
|
|
public string budget_year_name_th { get; set; }
|
|
public List<t_form_1_2_images> form_1_2_images { get; set; }
|
|
public List<t_form_1_2_images_2> form_1_2_images_2 { get; set; }
|
|
|
|
// New2570 spec — header-level
|
|
public int? request_count { get; set; }
|
|
public string division_name { get; set; }
|
|
public string overall_reason { get; set; }
|
|
|
|
// New2570 spec — signer (ผู้ขอ)
|
|
public string signer_type { get; set; }
|
|
public string signer_name { get; set; }
|
|
public string signer_position { get; set; }
|
|
|
|
// New2570 spec — approver (หัวหน้าหน่วยงาน)
|
|
public string approver_decision { get; set; }
|
|
public string approver_reason { get; set; }
|
|
public string approver_name { get; set; }
|
|
public string approver_admin_position { get; set; }
|
|
|
|
public List<form_1_2_positions> form_1_2_positions { get; set; }
|
|
}
|
|
|
|
public class form_1_2_positions
|
|
{
|
|
[Key] public Guid? form_1_2_position_uid { get; set; }
|
|
public Guid? form_1_2_uid { get; set; }
|
|
public int? row { get; set; }
|
|
|
|
public string old_position_no { get; set; }
|
|
public string old_position_name { get; set; }
|
|
public string old_qualification { get; set; }
|
|
public string old_division_name { get; set; }
|
|
public string old_workload { get; set; }
|
|
|
|
public string new_position_no { get; set; }
|
|
public string new_position_name { get; set; }
|
|
public string new_qualification { get; set; }
|
|
public string new_division_name { get; set; }
|
|
public string new_workload { get; set; }
|
|
|
|
public string reason { get; set; }
|
|
}
|
|
|
|
public class t_form_1_2_images
|
|
{
|
|
[Key] public Guid? form_1_2_images_uid { get; set; }
|
|
public Guid? form_1_2_uid { get; set; }
|
|
public string url { get; set; }
|
|
public string file_name { get; set; }
|
|
|
|
|
|
public int? row { get; set; }
|
|
}
|
|
|
|
public class t_form_1_2_images_2
|
|
{
|
|
[Key] public Guid? form_1_2_images_2_uid { get; set; }
|
|
public Guid? form_1_2_uid { get; set; }
|
|
public string url { get; set; }
|
|
public string file_name { get; set; }
|
|
|
|
public int? row { get; set; }
|
|
}
|
|
} |