private static string GetControlType(FieldControlType controlType, bool createValue) { if (controlType == FieldControlType.EFDataUnitLabel) return string.Format("FiMailFramework.BackBoneLabel"); if (controlType == FieldControlType.EFDataUnitLink) return string.Format("FiMailFramework.BackBoneLink"); if (createValue) return string.Format("FiMailFramework.{0}", controlType); return string.Format("FiMailFramework.{0}", controlType.ToString().Replace("EFDataUnit", "BackBone")); }
protected void HandleFieldUpdateButtonClicked(object sender, EventArgs e) { int fieldid = (int)this.Session["FORMDESIGNER:FIELDID"]; DesignableField field = this.controller.DesignableForm.GetFieldByID(fieldid); /// Update the name string newFieldName = this.FieldNameTextbox.Text; if (!string.IsNullOrEmpty(newFieldName)) { field.Name = newFieldName; } /// Update the control type FieldControlType controlType = (FieldControlType)Enum.Parse(typeof(FieldControlType), this.FieldControlTypeList.SelectedValue, true); field.Metadata.ControlType = controlType; if (field.IsKeyField() == false && this.FieldIsKeyFieldCheckbox.Checked) { field.SetAsKeyField(); } /// Store field.Store(); this.BindFieldList(); this.FieldUpdateStatusLabel.Text = "Field Updated"; this.FieldUpdateStatusLabel.Visible = true; }