Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="myConfig"></param>
        /// <param name="WorkflowStateId"></param>
        /// <returns></returns>
        public static TicketFormConfigDTO GetTicketFormConfigDTO(ITicketFormConfig myConfig, long WorkflowStateId)
        {
            TicketFormConfigDTO result = new TicketFormConfigDTO();

            ToolBox.MapObject(myConfig, result, true);
            result.formGroups = new List <TicketFormGroupDTO>();
            foreach (ITicketFormGroup curGroup in myConfig.GetFormGroups().Where(g => g.Active).OrderBy(s => s.GroupOrder))
            {
                result.formGroups.Add(GetFormGroupDTO(curGroup, WorkflowStateId));
            }
            return(result);
        }
Ejemplo n.º 2
0
        public static List <TicketFormConfigDTO> GetTicketFormConfigListDTO(IEnumerable <ITicketFormConfig> listForm)
        {
            List <TicketFormConfigDTO> result = new List <TicketFormConfigDTO>();

            foreach (ITicketFormConfig formulaire in listForm)
            {
                TicketFormConfigDTO resultTemp = new TicketFormConfigDTO();

                ToolBox.MapObject(formulaire, resultTemp, true);
                resultTemp.formGroups = null;

                result.Add(resultTemp);
            }

            return(result);
        }