Beispiel #1
0
        /// <summary>
        /// Actions
        /// </summary>
        /// <param name="HandleGUID"></param>
        /// <returns></returns>
        public static List<SmartFormViewActions> ArtefactActionss(String FormName, Guid EventGUID, Guid HandleGUID)
        {
            List<SmartFormViewActions> list = new List<SmartFormViewActions>();
            FormsManager frm = new FormsManager("dlx", 5555);

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            var ev = form.Events[EventGUID].Handlers[HandleGUID];
            SourceCode.Forms.Authoring.Eventing.Handler e = form.Events[EventGUID].Handlers[HandleGUID];

            foreach (SourceCode.Forms.Authoring.Eventing.Action action in e.Actions)
            {
                list.Add(new SmartFormViewActions
                {
                    GUID = action.Guid,
                  //  properties = action.Properties,
                 //   parameters = action.Parameters,
                 //   results = action.Results,
                 //   validation = action.Validation,
                    viewguid = action.ViewGuid,
                    method = action.Method,
                    formguid = action.FormGuid,
                    executiontype = action.ExecutionType.ToString(),
                    controlguid = action.ControlGuid,
                    actiontype = action.ActionType.ToString()
                });
            }
            return list;
        }
Beispiel #2
0
        /// <summary>
        /// Conditions
        /// </summary>
        /// <param name="FormName"></param>
        /// <param name="EventGUID"></param>
        /// <param name="HandleGUID"></param>
        /// <returns></returns>
        public static List<SmartFormViewConditions> ArtefactConditions(String FormName,Guid EventGUID,Guid HandleGUID)
        {
            List<SmartFormViewConditions> list = new List<SmartFormViewConditions>();
            FormsManager frm = new FormsManager("dlx", 5555);
             SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
             var ev = form.Events[EventGUID].Handlers[HandleGUID];
             SourceCode.Forms.Authoring.Eventing.Handler e = form.Events[EventGUID].Handlers[HandleGUID];

            foreach (SourceCode.Forms.Authoring.Eventing.Condition condition in e.Conditions)
            {

                list.Add(new SmartFormViewConditions
                {
                    GUID = condition.Guid,

                });

            }

            return list;
        }
Beispiel #3
0
        /// <summary>
        /// Form Controls
        /// </summary>
        /// <param name="FormName"></param>
        /// <returns></returns>
        public static List<SmartFormViewControls> FormControls(string FormName)
        {
            List<SmartFormViewControls> list = new List<SmartFormViewControls>();
            FormsManager frm = new FormsManager("dlx", 5555);
            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));

            foreach (SourceCode.Forms.Authoring.Control control in form.Controls)
            {
                list.Add(new SmartFormViewControls
                {
                    name = control.Name,
                    type = control.Type,
                guid = control.Guid
                });

            }
            return list;
        }
Beispiel #4
0
        /// <summary>
        /// Validation Messages
        /// </summary>
        /// <param name="FormName"></param>
        /// <param name="EventGUID"></param>
        /// <param name="HandleGUID"></param>
        /// <param name="ActionGUID"></param>
        /// <returns></returns>
        public static List<SmartFormViewActionValidationMessage> SmartFormViewActionValidation(String FormName, Guid EventGUID, Guid HandleGUID, Guid ActionGUID)
        {
            List<SmartFormViewActionValidationMessage> list = new List<SmartFormViewActionValidationMessage>();
            FormsManager frm = new FormsManager("dlx", 5555);

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            SourceCode.Forms.Authoring.Eventing.Action e = form.Events[EventGUID].Handlers[HandleGUID].Actions[ActionGUID];

            foreach (SourceCode.Forms.Authoring.ValidationMessage val in e.Validation.Messages)
            {

                list.Add(new SmartFormViewActionValidationMessage
                {
                    message = val.Message

                });
            }

            return list;
        }
Beispiel #5
0
        /// <summary>
        /// Actions Results
        /// </summary>
        /// <param name="FormName"></param>
        /// <param name="EventGUID"></param>
        /// <param name="HandleGUID"></param>
        /// <param name="ActionGUID"></param>
        /// <returns></returns>
        public static List<SmartFormViewActionParameters> SmartFormViewActionResults(String FormName, Guid EventGUID, Guid HandleGUID, Guid ActionGUID)
        {
            List<SmartFormViewActionParameters> list = new List<SmartFormViewActionParameters>();
            FormsManager frm = new FormsManager("dlx", 5555);

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            SourceCode.Forms.Authoring.Eventing.Action e = form.Events[EventGUID].Handlers[HandleGUID].Actions[ActionGUID];

            foreach (SourceCode.Forms.Authoring.Eventing.Mapping map in e.Results)
            {

                list.Add(new SmartFormViewActionParameters
                {

               //     validation = map.Validation,
                    targettype = map.TargetType.ToString(),
                    targetpath = map.TargetPath,
                    targetid = map.TargetID,
                    sourcevalue = map.SourceValue,
                    sourcetype = map.SourceType.ToString(),
                    sourcepath = map.SourcePath,
                    sourceid = map.SourceID

                });
            }

            return list;
        }
Beispiel #6
0
        /// <summary>
        /// Gets the details of the form
        /// </summary>
        /// <param name="FormName"></param>
        public static SmartFormView LoadForm(string formname)
        {
            FormsManager frm = new FormsManager("dlx", 5555);
            FormInfo forminfo = frm.GetForm(formname);

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetViewDefinition(formname));

            SmartFormView sf = new SmartFormView();
            sf.guid = form.Guid;
            sf.description = form.Description;

            sf.displayname = form.DisplayName;
            sf.name = form.Name;
            sf.guid = form.Guid;
            sf.theme = form.Theme;

            return sf;
        }
Beispiel #7
0
        /// <summary>
        /// List of form properties 
        /// </summary>
        /// <param name="FormName"></param>
        /// <returns></returns>
        public static List<SmartFormViewProperties> GetFormProperties(string  FormName)
        {
            List<SmartFormView> list = new List<SmartFormView>();
            FormsManager frm = new FormsManager("dlx", 5555);

                SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            Properties prop = new Properties();
            return  prop.ArtefactProperties( form.Properties);
        }
Beispiel #8
0
        public static List<SmartFormViewProperties> GetControlProperties(string FormName,Guid ControlGUID)
        {
            List<SmartFormView> list = new List<SmartFormView>();
            FormsManager frm = new FormsManager("dlx", 5555);

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));

            SourceCode.Forms.Authoring.Control control = form.Controls[ControlGUID];

            Properties prop = new Properties();
            return prop.ArtefactProperties(control.Properties);
        }
Beispiel #9
0
        /// <summary>
        /// Gets a list of the form parameters
        /// </summary>
        /// <param name="FormName"></param>
        /// <returns></returns>
        public static List<SmartFormViewParameters> FormParameters(string  FormName)
        {
            List<SmartFormViewParameters> list = new List<SmartFormViewParameters>();
               FormsManager frm = new FormsManager("dlx", 5555);
                SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));

            foreach (SourceCode.Forms.Authoring.FormParameter parameter in form.Parameters)
            {
                list.Add(new SmartFormViewParameters
                {
                    name = parameter.Name,
                    type = parameter.DataType.ToString(),
                    defaultvalue = parameter.DefaultValue
                });
            }

            return list;
        }
Beispiel #10
0
        /// <summary>
        /// Event Handlers
        /// </summary>
        /// <param name="EventGUID"></param>
        /// <returns></returns>
        public static List<SmartFromViewHandlers> FormHandlers(String FormName,Guid EventGUID)
        {
            List<SmartFromViewHandlers> list = new List<SmartFromViewHandlers>();
            FormsManager frm = new FormsManager("dlx", 5555);
            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            var ev = form.Events[EventGUID];

            SourceCode.Forms.Authoring.Eventing.Event e = form.Events[EventGUID];

                    foreach (SourceCode.Forms.Authoring.Eventing.Handler handle in e.Handlers)
                    {
                        list.Add(new SmartFromViewHandlers
                        {

                            Name = handle.HandlerType.ToString(),
                            GUID = handle.Guid
                        });

                    }

            return list;
        }
Beispiel #11
0
        /// <summary>
        /// Form Events
        /// </summary>
        /// <param name="FormName"></param>
        /// <returns></returns>
        public static List<SmartFormViewEvents> FormEventsEvents(string FormName)
        {
            List<SmartFormViewEvents> list = new List<SmartFormViewEvents>();
            FormsManager frm = new FormsManager("dlx", 5555);
            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));

            foreach (SourceCode.Forms.Authoring.Eventing.Event ev in form.Events)
            {

                    list.Add(new SmartFormViewEvents
                    {
                        name = ev.Name,

                        type = ev.EventType.ToString(),
                        GUID = ev.Guid

                    });

            }

            return list;
        }