Beispiel #1
0
        /// <summary>
        /// Read an analysis by Date
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        internal ADO_readerOutput ReadTimeline(Analytic_DTO_Read dto)
        {
            List <ADO_inputParams> inputParamList = new List <ADO_inputParams>()
            {
                new ADO_inputParams()
                {
                    name = "@DateFrom", value = dto.DateFrom
                },
                new ADO_inputParams()
                {
                    name = "@DateTo", value = dto.DateTo
                }
            };

            if (dto.NltInternalNetworkMask != null)
            {
                if (dto.NltInternalNetworkMask.Length > 0)
                {
                    inputParamList.Add(new ADO_inputParams()
                    {
                        name = "@NltInternalNetworkMask", value = dto.NltInternalNetworkMask
                    });
                }
            }

            if (dto.MtrCode != null)
            {
                inputParamList.Add(new ADO_inputParams()
                {
                    name = "@MtrCode", value = dto.MtrCode
                });
            }

            if (dto.LngIsoCode != null)
            {
                inputParamList.Add(new ADO_inputParams()
                {
                    name = "@LngIsoCode", value = dto.LngIsoCode
                });
            }

            if (dto.SbjCode != default(int))
            {
                inputParamList.Add(new ADO_inputParams()
                {
                    name = "@SbjCode", value = dto.SbjCode
                });
            }

            if (dto.PrcCode != null)
            {
                inputParamList.Add(new ADO_inputParams()
                {
                    name = "@PrcCode", value = dto.PrcCode
                });
            }

            //Call the stored procedure
            return(Ado.ExecuteReaderProcedure("Security_Analytic_ReadTimeline", inputParamList));
        }
Beispiel #2
0
        /// <summary>
        /// Read an analysis by Browser
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        internal ADO_readerOutput ReadBrowser(Analytic_DTO_Read dto, string ccnUsername)
        {
            List <ADO_inputParams> inputParamList = new List <ADO_inputParams>()
            {
                new ADO_inputParams()
                {
                    name = "@DateFrom", value = dto.DateFrom
                },
                new ADO_inputParams()
                {
                    name = "@DateTo", value = dto.DateTo
                },
                new ADO_inputParams()
                {
                    name = "@CcnUsername", value = ccnUsername
                }
            };

            if (dto.NltInternalNetworkMask != null)
            {
                if (dto.NltInternalNetworkMask.Length > 0)
                {
                    inputParamList.Add(new ADO_inputParams()
                    {
                        name = "@NltInternalNetworkMask", value = dto.NltInternalNetworkMask
                    });
                }
            }

            if (dto.PrcCode != null)
            {
                inputParamList.Add(new ADO_inputParams()
                {
                    name = "@PrcCode", value = dto.PrcCode
                });
            }

            if (dto.SbjCode > 0)
            {
                inputParamList.Add(new ADO_inputParams()
                {
                    name = "@SbjCode", value = dto.SbjCode
                });
            }

            if (dto.MtrCode != null)
            {
                inputParamList.Add(new ADO_inputParams()
                {
                    name = "@MtrCode", value = dto.MtrCode
                });
            }


            //Call the stored procedure
            return(Ado.ExecuteReaderProcedure("Security_Analytic_ReadBrowser", inputParamList));
        }