コード例 #1
0
        private void bindFields(int formID)
        {
            int clientID = SessionHelper.getClientId();
            List<FormFieldView> formFields = null;

            if (formID > 0) {
                using (DataFormManager repository = new DataFormManager()) {
                    formFields = repository.GetFormFields(formID, clientID);

                    if (formFields == null || formFields.Count == 0) {
                        // client has not define a field template. Show all fields
                        formFields = repository.GetFormFields(formID);
                    }
                }
            }

            gvFields.DataSource = formFields;
            gvFields.DataBind();
        }
コード例 #2
0
        public void showFormFields()
        {
            List<FormFieldView> formFields = null;
            clientID = SessionHelper.getClientId();
            string strFieldID = null;

            using (DataFormManager repository = new DataFormManager()) {
                formFields = repository.GetFormFields(1, clientID);
            }

            foreach (FormFieldView field in formFields) {
                strFieldID = "f_" + field.FieldID.ToString();
                //HtmlTableRow tr = (HtmlTableRow)tabPanelClaim.FindControl(strFieldID) as HtmlTableRow;
                Control c = (Control)tabPanelClaim.FindControl(strFieldID) as Control;
                if (c != null)
                    c.Visible = field.IsVisible;
            }
        }