public override void SetValue(object value) { FormBuilderData.Value = value.ToString(); var field = GetField(); var submissions = field.FrontEndSubmissions; if (submissions != null) { var dataTable = StringHelper.JsonToObject <DataTable>(submissions); if (dataTable != null && dataTable.Columns.Count > 0) { dataTable.DefaultView.Sort = "DateSubmitted DESC"; FormSubmissions.DataSource = dataTable; FormSubmissions.DataBind(); } } if (field.FieldSettings != null) { var formFieldSettings = StringHelper.JsonToObject <FormFieldSettings>(field.FieldSettings); if (formFieldSettings != null) { EmailAddress.Text = formFieldSettings.EmailAddress; EmailTemplateMediaID.Text = formFieldSettings.EmailTemplateMediaID; Subject.Text = formFieldSettings.Subject; } } }
protected void FormSubmissions_PageIndexChanging(object sender, GridViewPageEventArgs e) { FormSubmissions.PageIndex = e.NewPageIndex; var dataTable = (FormSubmissions.DataSource as DataTable); FormSubmissions.DataSource = dataTable; FormSubmissions.DataBind(); }
protected void ClearAllSubmissions_Click(object sender, EventArgs e) { var field = GetField(); field.FrontEndSubmissions = ""; var returnObj = FieldsMapper.Update(field); if (!returnObj.IsError) { FormSubmissions.DataSource = new DataTable(); FormSubmissions.DataBind(); } }