예제 #1
0
            private void DeconstructSymbol()
            {
                SymbolType = ExchangeSymbol.First() == 't' ? MarketType.Trade : MarketType.Founding;
                var lSymbolWithoutType = ExchangeSymbol.Remove(0, 1);

                BaseCurrency = ExchangeCurrencies.Where(lCurrency => lSymbolWithoutType.IndexOf(lCurrency.Name) == 0).FirstOrDefault();
                if (BaseCurrency != null)
                {
                    var lSymbolWithoutBase = lSymbolWithoutType.Replace(BaseCurrency.Name, string.Empty);
                    DestinationCurrency = ExchangeCurrencies.Where(lCurrency => lSymbolWithoutBase == lCurrency.Name).FirstOrDefault();
                }
            }
예제 #2
0
        public List <EXPBankVoucherDtl> GetVouchertemList(long BVID)
        {
            using (var context = new BLC_DEVEntities())
            {
                var Data = (from vd in context.EXP_BankVoucherDtl
                            where vd.BVID == BVID

                            join c in context.Sys_Currency on(vd.Currency == null ? null : vd.Currency) equals c.CurrencyID into Currencies
                            from c in Currencies.DefaultIfEmpty()

                            join ec in context.Sys_Currency on(vd.ExchangeCurrency == null ? null : vd.ExchangeCurrency) equals ec.CurrencyID into ExchangeCurrencies
                            from ec in ExchangeCurrencies.DefaultIfEmpty()

                            join th in context.Sys_TransHead on(vd.TransHead == null ? null : vd.TransHead) equals th.HeadID into TransHeads
                            from th in TransHeads.DefaultIfEmpty()

                            join ci in context.EXP_CI on(vd.CIID == null ? null : vd.CIID) equals ci.CIID into CIs
                            from ci in CIs.DefaultIfEmpty()


                            select new EXPBankVoucherDtl
                {
                    BVDTLID = vd.BVDTLID,
                    TransSL = vd.TransSL,
                    Narration = vd.Narration,
                    HeadID = vd.TransHead,
                    HeadName = (th == null ? null : th.HeadName),
                    BVDRAmt = vd.BVDRAmt,
                    BVCRAmt = vd.BVCRAmt,
                    CurrencyName = (c == null ? null : c.CurrencyName),
                    ExchangeCurrencyName = (ec == null ? null : ec.CurrencyName),
                    ExchangeRate = vd.ExchangeRate,
                    ExchangeAmount = vd.ExchangeAmount,
                    CIID = vd.CIID,
                    CIRefNo = ci == null ? "" : ci.CIRefNo
                }).ToList();

                return(Data);
            }
        }