public FormField(string clientid) { Attribute = new FormFieldAttribute(); this.FormFieldID = ""; this._formid = ""; ClientID = clientid; }
/// <summary> /// /// </summary> /// <param name="clientID"></param> /// <param name="formID"></param> public FormField(string clientID, string formID) { _formid = formID; ClientID = clientID; this.FormFieldID = ""; Attribute = new FormFieldAttribute(); Load(); }
private void Load() { Data.UIForm.UIFields uIFields = new Data.UIForm.UIFields(UIForms.Common.GetConnection(this.ClientID)); System.Data.DataTable dt = new System.Data.DataTable(); if (this.FormFieldID != "") { dt = uIFields.GetField(this.ClientID, this.FormID, this.FormFieldID); foreach (System.Data.DataRow row in dt.Rows) { this.FormFieldID = row["FieldID"] == null ? "" : (string)row["FieldID"]; this.FieldRenderType = row["FieldRenderType"] == null ? RenderType.TEXT : (RenderType)row["FieldRenderType"]; var fatt = row["FieldAttribute"] == null ? "" : (string)row["FieldAttribute"]; var ff = Newtonsoft.Json.JsonConvert.DeserializeObject <FormField>(fatt); this.Attribute = ff.Attribute; } } }