问题是这样的.项目采用Nhibernate 返回的都是list 类型的实体类型.
我有一个UpFiles的实体类 和一个Client_Order实体类.他们的关系是多对一 一个客户订单可能会上传多个文件.
这是UpFiles的实体类的属性 property我就不贴了.
Code
private int _id;
private string _original_file_name;
private string _save_file_name;
private DateTime _updatetime;
protected Employee _Employee;
private int _file_state;
private string _file_url;
protected Client_Order _Client_Order;
这是Client_Order的实体类
Code
private IList _UpFiles;
private int _id;
private string _order_id;
private string _order_type;
private string _client_add_PCB_PCBA;
private string _client_PCB_Share;
private string _client_add_gauge;
private string _client_add_plane;
private string _client_add_stencil;
private string _client_add_dzzl;
private int _make_description;
private int _make_downup_request;
private string _make_downup_thickness;
private int _make_product_purpose;
private int _make_method;
private bool _make_rework;
private string _make_rework_id;
private int _uncork_CHIP_class;
private int _uncork_IC_radiator;
private int _uncork_testpoint;
private int _uncork_plugin;
private int _uncork_other;
private int _uncork_hpgbk;
private int _mark_request;
private int _mark_count;
private int _mark_jswdwk;
private int _frame_spec;
private int _frame_screw;
private int _frame_color;
private int _material_thickness;
private int _material_size;
private int _panel;
private int _panel_count;
private int _stick_method;
private string _stick_other;
private int _lettering_request;
private int _lettering_other;
private int _press_format;
private string _press_A;
private string _press_B;
private string _press_X;
private string _press_Y;
private string _press_unit;
private int _other_add_film;
private string _other_PN;
private string _other_content;
protected Client _Client;
我现在是返回了一个文件Ilist<UpFiles>的列表 里面通过nh的 映射子多获取到与文件对应的 客户订单实体类.
当我做ui的时候问题出现了.DataList中模板绑定字段的语句是<%# Eval("updatetime" )%>这样的.但是我现在 想拿到Client_Order这个对象 里的 order_name