Ejemplo n.º 1
0
        /// <summary>
        /// Tests if a format exists
        /// </summary>
        /// <param name="format"></param>
        /// <returns></returns>
        internal bool Exists(Format_DTO_Read format)
        {
            var adoFormat = new Format_ADO();
            var result    = adoFormat.Read(ado, format ?? new Format_DTO_Read());

            return(result.hasData);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Execute
        /// </summary>
        /// <returns></returns>
        protected override bool Execute()
        {
            //Validation of parameters and user have been successful. We may now proceed to read from the database
            var adoFormat = new Format_ADO();

            ADO_readerOutput result = adoFormat.Read(Ado, DTO);

            if (!result.hasData)
            {
                return(false);
            }

            Response.data = result.data;
            return(true);
        }
Ejemplo n.º 3
0
        internal List <Format_DTO_Read> Read(Format_DTO_Read format = null)
        {
            var adoFormat = new Format_ADO();
            List <Format_DTO_Read> list = new List <Format_DTO_Read>();

            var result = adoFormat.Read(ado, format ?? new Format_DTO_Read());

            foreach (dynamic d in result.data)
            {
                list.Add(new Format_DTO_Read()
                {
                    FrmType = d.FrmType, FrmVersion = d.FrmVersion, FrmDirection = d.FrmDirection, FrmMimetype = GetMimetypeForFormat(new Format_DTO_Read()
                    {
                        FrmType = d.FrmType
                    })
                });
            }
            return(list);
        }