Example #1
0
        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;
                }
            }
        }
Example #2
0
        protected void FormSubmissions_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            FormSubmissions.PageIndex = e.NewPageIndex;

            var dataTable = (FormSubmissions.DataSource as DataTable);

            FormSubmissions.DataSource = dataTable;
            FormSubmissions.DataBind();
        }
Example #3
0
        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();
            }
        }