Example #1
0
        public AsglinquiryGLIFDetailBannerResponseAPI GLIFDetailBanner(Glifdetailbannercriteria glifdetailbannercriteria)
        {
            var result = new AsglinquiryGLIFDetailBannerResponseAPI();

            var pdsglifdetailbanner = new pdsglifdetailbannerDataSet();

            var pdsglif = new pdsglifDataSet();

            DataRow ttblglifdetailbannercriteriaCriteria = pdsglifdetailbanner.ttblglifdetailbannercriteria.NewttblglifdetailbannercriteriaRow();

            Glifdetailbannercriteria.UpdateRowFromGlifdetailbannercriteria(ref ttblglifdetailbannercriteriaCriteria, glifdetailbannercriteria);
            pdsglifdetailbanner.ttblglifdetailbannercriteria.AddttblglifdetailbannercriteriaRow((pdsglifdetailbannerDataSet.ttblglifdetailbannercriteriaRow)ttblglifdetailbannercriteriaCriteria);

            string cErrorMessage = string.Empty;


            NLogLoggerP.Trace("GLIFDetailBanner - Asglinquiry - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAsglinquiryproxy = this.proxyAppObject.CreatePO_asglinquiryproxy())
                {
                    this.SetRequiredContextParameters();
                    poAsglinquiryproxy.GLIFDetailBanner(ref pdsContext, ref pdsglifdetailbanner, out pdsglif, out cErrorMessage);
                }
            });
            NLogLoggerP.Info("GLIFDetailBanner - Asglinquiry - After Call");


            this.ReportErrors(cErrorMessage);
            this.ReportErrors(this.pdsContext);
            this.ReportErrors(pdsglifdetailbanner);

            if (pdsglif.ttblglif.Count > 0)
            {
                result.glif = Glif.BuildGlifFromRow(pdsglif.ttblglif[0]);
            }

            if (pdsglifdetailbanner.ttblglifdetailbannerresults.Count > 0)
            {
                result.glifdetailbannerresults = Glifdetailbannerresults.BuildGlifdetailbannerresultsFromRow(pdsglifdetailbanner.ttblglifdetailbannerresults[0]);
            }


            return(result);
        }
Example #2
0
        public GlifAdapter(IProgressConnection connection) : base(connection)
        {
            try
            {
                this.proxyAppObject = new GLProxyAppObject(connection.Connection);
                this.pdsContext     = new pdsContextDataSet();
                this.dataSet        = new pdsglifDataSet()
                {
                    DataSetName = DataSetName
                };
                this.glifTableControlKey = this.dataSet.ttblglif.GetTableControlParametersKey();

                if (!this.tempTableControlParameters.ContainsKey(this.glifTableControlKey))
                {
                    this.CreateTableControlParameters(this.glifTableControlKey);
                }
                this.OnCreated();
            }
            catch (Exception ex)
            {
                NLogLogger.ErrorException("Failed in adapter ", ex);
                ErrorReportingHelper.ReportProgramErrors($"Error in GlifAdapter constructor - {ex.Message}");
            }
        }