public PrFieldLabel(PrForm form, string fieldKey, string label, string defaultValue) : base(form, fieldKey) { Label = label; Hidden = false; DefaultValue = defaultValue; }
public PrFieldLabel(PrForm form, string fieldKey, string label) : base(form, fieldKey) { Label = new Escaper().EscapeJavaScript(label); Hidden = false; DefaultValue = string.Empty; MergeWithNext = false; }
public PrFieldUpload(PrForm form, string fieldKey, string label) : base(form, fieldKey) { Label = new Escaper().EscapeJavaScript(label); Required = false; Hidden = false; MergeWithNext = false; }
public PrFieldButton(PrForm form, string fieldKey, string buttonText) : base(form, fieldKey) { Label = " "; ButtonText = new Escaper().EscapeJavaScript(buttonText); Hidden = false; MergeWithNext = false; }
public override AJAXActions GetAJAXActions(string actionKey, Dictionary<string, List<string>> values) { string html = string.Empty; switch (actionKey) { case "Things": return new AJAXActions().AddUpdateItemsAction("SubThings", GetXSubThings(GetSelectedID(values))); case "Reception": html = new PrForm("Reception") .SetHeader("Recepção") .SetFooter(" ") .AddFieldGridView("GV", "GetActionLogs", this, true, "Action Logs").SetRequired().SetMultipleSelection() .AddFieldText("Text", "Text").SetRequired() .AddFieldRadios("Radios", "Radios", GetYesOrNo()) .AddConditionalVisibility(MyEnum.No, "X") .AddFieldLabel("X", "X", "X").SetHidden() .AddFieldComboBox("Things", "Things", Get10Things()).SetDefaultValue("5").AddGetAJAXActions("Things") .AddFieldMultiSelectBox("SubThings", "SubThings", GetXSubThings(10)).AddGetAJAXActions("Submit") .AddFieldButton("Submit", "Sub'mit") .AddGetAJAXActionsAll("Submit") .RenderForm(); return new AJAXActions().AddShowFormAction(html); case "CheckIn": html = new PrForm("CheckIn") .SetHeader("CheckIn") .SetFooter(" ") .AddFieldLabel("Label", "Label", GetSelectedValue(values)) .AddFieldButton("Cancel", "Cancel") .AddCancel() .RenderForm(); return new AJAXActions().AddShowFormAction(html, ShowFormAction.EPreviousFormActionType.MERGE); case "God": html = new PrForm("God") .SetModalDialog() .SetHeader("<b>Form Header</b>") .SetFooter("<b>Form Footer</b>") .AddFieldCheckBoxes("CheckBoxes", "CheckBoxes", GetXSubThings(3)) .AddFieldComboBox("ComboBox", "ComboBox", GetXSubThings(20)) .AddFieldDate("Date", "Date") .AddFieldFree("Free", "Free", "<i>Free</i>") .AddFieldLabel("Label", "Label", "Label") .AddFieldMultiSelectBox("MultiSelectBox", "MultiSelectBox", Get10Things()) .AddFieldRadios("Radios", "Radios", GetXSubThings(3)) .AddFieldText("Text", "Text") .AddFieldTextArea("TextArea", "TextArea") .AddFieldUpload("Upload", "Upload") .AddFieldButton("Button", "Button") .RenderForm(); return new AJAXActions().AddShowFormAction(html, ShowFormAction.EPreviousFormActionType.APPEND); case "Submit": return GetAJAXActions("God", null).AddShowMessageAction("Informação", "Operação concluída com sucesso."); //return new AJAXActions().AddShowMessageAction("Informação", "Operação concluída com sucesso."); default: throw new NotImplementedException(); } }
public PrFieldGridView(PrForm form, string fieldKey, DataTable dt, string tableLabel) : base(form, fieldKey) { ClientSide = true; Data = dt; MergeWithNext = false; FieldLabel = ""; TableLabel = new Escaper().EscapeJavaScript(tableLabel); MultipleSelection = false; Required = false; }
public PrFieldFree(PrForm form, string fieldKey, string label, Control source) : base(form, fieldKey) { Label = label; Required = false; Hidden = false; DefaultValue = string.Empty; MergeWithNext = false; GetValueFunction = "return [''];"; SetValueFunction = "return;"; Source = RenderControl(source); }
public PrFieldFree(PrForm form, string fieldKey, string label, string source) : base(form, fieldKey) { Label = new Escaper().EscapeJavaScript(label); Required = false; Hidden = false; DefaultValue = string.Empty; MergeWithNext = false; GetValueFunction = "return [''];"; SetValueFunction = "return;"; Source = source; }
public PrFieldRadios(PrForm form, string fieldKey, string label, List<KeyValue> data) : base(form, fieldKey) { Label = new Escaper().EscapeJavaScript(label); Data = data; if (Data == null) { Data = new List<KeyValue>(); } Required = false; Hidden = false; DefaultValue = string.Empty; MergeWithNext = false; }
public override AJAXActions GetAJAXActions(string actionKey, Dictionary<string, List<string>> values) { switch (actionKey) { case "Test": string form = new PrForm("Test") .SetHeader("Test") .SetFooter(" ") .AddFieldText("Test", "Test") .RenderForm(); return new AJAXActions().AddShowFormAction(form); default: throw new NotImplementedException(); } }
public PrFieldGridView(PrForm form, string fieldKey, string actionKey, FormService formService, bool clientSide, string tableLabel) : base(form, fieldKey) { ActionKey = actionKey; ClientSide = clientSide; if (ClientSide) { Data = formService.GetDataTableAll(actionKey, null); } else { Data = formService.GetDataTableZero(actionKey, null); } MergeWithNext = false; FieldLabel = ""; TableLabel = new Escaper().EscapeJavaScript(tableLabel); MultipleSelection = false; Required = false; }
public PrField(PrForm form, string fieldKey) { Form = form; FieldKey = fieldKey; Validations = new List<Validation>(); }