Exemple #1
0
        public async Task <IEnumerable <EntryDataDetailsEx> > EntryDataDetailsEx(List <string> includesLst = null)
        {
            if (System.ComponentModel.LicenseManager.UsageMode == LicenseUsageMode.Designtime)
            {
                return(new List <EntryDataDetailsEx>().AsEnumerable());
            }
            try
            {
                using (var t = new EntryDataDetailsExClient())
                {
                    var res = await t.GetEntryDataDetailsEx(includesLst).ConfigureAwait(continueOnCapturedContext: false);

                    if (res != null)
                    {
                        return(res.Select(x => new EntryDataDetailsEx(x)).AsEnumerable());
                    }
                    else
                    {
                        return(null);
                    }
                }
            }
            catch (FaultException <ValidationFault> e)
            {
                throw new Exception(e.Detail.Message, e.InnerException);
            }
            catch (Exception)
            {
                Debugger.Break();
                throw;
            }
        }
Exemple #2
0
        public async Task <IEnumerable <EntryDataDetailsEx> > GetEntryDataDetailsExByExpressionNav(string exp, Dictionary <string, string> navExp, List <string> includesLst = null)
        {
            if (System.ComponentModel.LicenseManager.UsageMode == LicenseUsageMode.Designtime || exp == null || exp == "None")
            {
                return(new List <EntryDataDetailsEx>().AsEnumerable());
            }
            try
            {
                using (var t = new EntryDataDetailsExClient())
                {
                    IEnumerable <DTO.EntryDataDetailsEx> res = null;
                    if (exp == "All" && navExp.Count == 0)
                    {
                        res = await t.GetEntryDataDetailsEx(includesLst).ConfigureAwait(continueOnCapturedContext: false);
                    }
                    else
                    {
                        res = await t.GetEntryDataDetailsExByExpressionNav(exp, navExp, includesLst).ConfigureAwait(continueOnCapturedContext: false);
                    }

                    if (res != null)
                    {
                        return(res.Select(x => new EntryDataDetailsEx(x)).AsEnumerable());
                    }
                    else
                    {
                        return(null);
                    }
                }
            }
            catch (FaultException <ValidationFault> e)
            {
                throw new Exception(e.Detail.Message, e.InnerException);
            }
            catch (Exception)
            {
                Debugger.Break();
                throw;
            }
        }