派纳发送邮件功能
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

270 lines
6.1 KiB

5 months ago
  1. #region Using directives
  2. using System;
  3. using System.Collections;
  4. using System.Data;
  5. using UFSoft.UBF.UI.MD.Runtime;
  6. using UFSoft.UBF.UI.MD.Runtime.Implement;
  7. #endregion
  8. namespace CustPrintReferenceRef
  9. {
  10. [Serializable]
  11. public partial class CustPrintReferenceRefModel : UIModel
  12. {
  13. #region Constructor
  14. public CustPrintReferenceRefModel() : base("CustPrintReferenceRef")
  15. {
  16. InitClass();
  17. this.SetResourceInfo("1d17c30a-3581-49f1-b0c4-5428b2772690");
  18. try{
  19. AfterInitModel();
  20. }catch(Exception exception){
  21. IUIModel model = this;
  22. this.ErrorMessage.SetErrorMessage(ref model,exception);
  23. }
  24. }
  25. //just for Clone
  26. private CustPrintReferenceRefModel(bool isInit) : base("CustPrintReferenceRef")
  27. {}
  28. protected override IUIModel CreateCloneInstance()
  29. {
  30. return new CustPrintReferenceRefModel(false);
  31. }
  32. #endregion
  33. #region member
  34. #region views
  35. private cRefView viewcRef;
  36. #endregion
  37. #region links
  38. #endregion
  39. #region properties
  40. #endregion
  41. #endregion
  42. #region property
  43. public cRefView cRef
  44. {
  45. get { return (cRefView)this["cRef"]; }
  46. }
  47. #region RealViews
  48. #endregion
  49. #endregion
  50. #region function
  51. private void InitClass()
  52. {
  53. this.viewcRef = new cRefView(this);
  54. this.viewcRef.SetResourceInfo("7e500986-4c2b-4442-838c-52edfc75fa01");
  55. this.Views.Add(this.viewcRef);
  56. }
  57. public override string AssemblyName
  58. {
  59. get { return "UFIDA.U9.Cust.WC.CustPOSendMailUI"; }
  60. }
  61. #endregion
  62. private void OnValidate_DefualtImpl()
  63. {
  64. }
  65. }
  66. [Serializable]
  67. public partial class cRefView : UIView
  68. {
  69. #region Constructor
  70. public cRefView(IUIModel model) : base(model,"cRef","UFSoft.UBF.ExportService.PrintReferenceBE.PrintTemplate", true)
  71. {
  72. InitClass();
  73. }
  74. //构造空实例,不进行初始化.目前为Clone使用.
  75. private cRefView():base(null,"cRef","UFSoft.UBF.ExportService.PrintReferenceBE.PrintTemplate", true)
  76. {
  77. }
  78. protected override IUIView CreateCloneInstance()
  79. {
  80. return new cRefView();
  81. }
  82. #endregion
  83. #region fiels property filter
  84. public IUIField FieldID
  85. {
  86. get { return this.Fields["ID"]; }
  87. }
  88. public IUIField FieldTemplateName
  89. {
  90. get { return this.Fields["TemplateName"]; }
  91. }
  92. public IUIField FieldIsDefault
  93. {
  94. get { return this.Fields["IsDefault"]; }
  95. }
  96. public IUIField FieldTemplateID
  97. {
  98. get { return this.Fields["TemplateID"]; }
  99. }
  100. [Obsolete("请使用CurrentFilter属性,这个方法有可能会导致强弱类型转换出错")]
  101. public cRefDefaultFilterFilter DefaultFilter
  102. {
  103. get { return (cRefDefaultFilterFilter)this.CurrentFilter; }
  104. }
  105. #endregion
  106. #region Init
  107. private void InitClass()
  108. {
  109. UIModelRuntimeFactory.AddNewUIField(this,"ID", typeof(Int64), false,"","System.Int64", "ID", true,true, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","15f1ae4b-2181-484e-a167-ec8b636dfd7d");
  110. UIModelRuntimeFactory.AddNewUIField(this,"TemplateName", typeof(String), true,"","System.String", "TemplateName", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","07f616e9-79bd-4b28-878b-3fefe06d09fc");
  111. UIModelRuntimeFactory.AddNewUIField(this,"IsDefault", typeof(Boolean), false,"","System.Boolean", "IsDefault", true,true, false, "",false,(UIFieldType)1,"5efeea06-cae7-4cc0-82e9-20a789e4e582","6844fc13-b0cb-4160-a8a4-4d085db49205");
  112. UIModelRuntimeFactory.AddNewUIField(this,"TemplateID", typeof(String), false,"","System.String", "TemplateID", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","e1af8e4f-edc7-4bc7-a0ad-04ae4c598d83");
  113. this.CurrentFilter = new cRefDefaultFilterFilter(this);
  114. }
  115. #endregion
  116. #region override method
  117. protected override IUIRecord BuildNewRecord(IUIRecordBuilder builder)
  118. {
  119. return new cRefRecord(builder);
  120. }
  121. #endregion
  122. #region new method
  123. public new cRefRecord FocusedRecord
  124. {
  125. get { return (cRefRecord)base.FocusedRecord ; }
  126. set { base.FocusedRecord = value ; }
  127. }
  128. public new cRefRecord AddNewUIRecord()
  129. {
  130. return (cRefRecord)base.AddNewUIRecord();
  131. }
  132. public new cRefRecord NewUIRecord()
  133. {
  134. return (cRefRecord)base.NewUIRecord();
  135. }
  136. #endregion
  137. }
  138. [Serializable]
  139. public class cRefRecord : UIRecord
  140. {
  141. #region Constructor
  142. public cRefRecord(IUIRecordBuilder builder):base(builder)
  143. {
  144. }
  145. private cRefView uiviewcRef
  146. {
  147. get { return (cRefView)this.ContainerView; }
  148. }
  149. protected override IUIRecord CreateCloneInstance(IUIRecordBuilder builder)
  150. {
  151. return new cRefRecord(builder);
  152. }
  153. #endregion
  154. #region property
  155. public Int64 ID
  156. {
  157. get{
  158. //object value = this[this.uiviewcRef.FieldID] ;
  159. //return (Int64)value;
  160. return GetValue<Int64>(this.uiviewcRef.FieldID);
  161. }
  162. set{
  163. this[this.uiviewcRef.FieldID] = value;
  164. }
  165. }
  166. public String TemplateName
  167. {
  168. get{
  169. //object value = this[this.uiviewcRef.FieldTemplateName] ;
  170. //return (String)value;
  171. return GetValue<String>(this.uiviewcRef.FieldTemplateName);
  172. }
  173. set{
  174. this[this.uiviewcRef.FieldTemplateName] = value;
  175. }
  176. }
  177. public Boolean IsDefault
  178. {
  179. get{
  180. //object value = this[this.uiviewcRef.FieldIsDefault] ;
  181. //return (Boolean)value;
  182. return GetValue<Boolean>(this.uiviewcRef.FieldIsDefault);
  183. }
  184. set{
  185. this[this.uiviewcRef.FieldIsDefault] = value;
  186. }
  187. }
  188. public String TemplateID
  189. {
  190. get{
  191. //object value = this[this.uiviewcRef.FieldTemplateID] ;
  192. //return (String)value;
  193. return GetValue<String>(this.uiviewcRef.FieldTemplateID);
  194. }
  195. set{
  196. this[this.uiviewcRef.FieldTemplateID] = value;
  197. }
  198. }
  199. #endregion
  200. }
  201. [Serializable]
  202. public class cRefDefaultFilterFilter : UIFilter
  203. {
  204. #region Constructor
  205. public cRefDefaultFilterFilter(IUIView view)
  206. : base("DefaultFilter",view,@"",@"")
  207. {
  208. InitClass();
  209. }
  210. //for Clone Constructor
  211. private cRefDefaultFilterFilter()
  212. : base("DefaultFilter",null,"","")
  213. {}
  214. protected override IUIFilter CreateCloneInstance()
  215. {
  216. return new cRefDefaultFilterFilter();
  217. }
  218. #endregion
  219. #region property
  220. #endregion
  221. #region function
  222. private void InitClass()
  223. {
  224. }
  225. #endregion
  226. }
  227. }