Class FormHelper
產生表單內容輔助器
Inheritance
System.Object
FormHelper
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Ede.Uofx.PubApi.Sdk.NetStd.Helpers
Assembly: Ede.Uofx.PubApi.Sdk.NetStd.dll
Syntax
public class FormHelper
Constructors
View SourceFormHelper(String)
建立起單輔助物件
Declaration
public FormHelper(string formCode)
Parameters
Type | Name | Description |
---|---|---|
System.String | formCode | 表單代號 |
Methods
View SourceApplyAccount(String, String, String)
申請人資訊
Declaration
public void ApplyAccount(string account, string deptCode, string corpCode = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | account | 帳號 |
System.String | deptCode | 部門代碼 |
System.String | corpCode | 申請者原公司代碼(如為其他公司兼職才需要填) |
AttachFiles(List<FileModel>)
夾帶附件
Declaration
public void AttachFiles(List<FileModel> values)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<FileModel> | values | 附件檔案 |
Callback(String, String)
Callback 設定
Declaration
public void Callback(string callBackUrl, string customData)
Parameters
Type | Name | Description |
---|---|---|
System.String | callBackUrl | 起單完成要回覆的 api url |
System.String | customData | 使用者自訂資料,會在 CallBack 時回傳 |
Complete()
完成,輸出表單物件
Declaration
public object Complete()
Returns
Type | Description |
---|---|
System.Object |
FieldAdd(String, Object)
新增表單欄位與值
Declaration
public void FieldAdd(string code, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | code | 欄位代碼 |
System.Object | value | 欄位資料,建議使用 FieldHelper 協助新增資料 |
GetFields()
取得表單已設定的所有欄位與值
Declaration
public Dictionary<string, object> GetFields()
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> |
Opinion(String)
備註說明
Declaration
public void Opinion(string opinion)
Parameters
Type | Name | Description |
---|---|---|
System.String | opinion |
TryGetField(String, out Object)
取得欄位值
Declaration
public bool TryGetField(string code, out object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | code | 欄位代碼 |
System.Object | value | 欄位資料 |
Returns
Type | Description |
---|---|
System.Boolean |
Urgent()
設定為急件
Declaration
public void Urgent()
ValidFields(out List<String>, out List<String>, out List<String>)
驗證表單欄位
Declaration
public void ValidFields(out List<string> unenteredFields, out List<string> unenteredAndRequiredFields, out List<string> notFoundFields)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.String> | unenteredFields | 非必填欄位未輸入 |
System.Collections.Generic.List<System.String> | unenteredAndRequiredFields | 必填欄位且沒有輸入 |
System.Collections.Generic.List<System.String> | notFoundFields | 不存在的欄位代碼 |