Esempio n. 1
0
        public BindingList <QuoteLTA> GetLtaData(out string errorMessage)
        {
            errorMessage = "";
            try
            {
                if (_ltaContext != null)
                {
                    _ltaContext.Dispose();
                }

                _ltaContext = new QuoteLogContext();
                var bindingList = DbExtensions.ToBindingList <QuoteLTA>(new ObservableCollection <QuoteLTA>(_ltaContext.QuoteLTAs.Where(q => q.QuoteNumber == _quoteNumber)));

                return(bindingList);
            }
            catch (Exception ex)
            {
                errorMessage = "Failed to retrieve LTA grid data.";
            }
            return(null);
        }