Example #1
0
        public static List <FundDTO> GetList()
        {
            DB             db   = new DB();
            List <FundDTO> list = new List <FundDTO>();

            foreach (Fund fund in db.Funds)
            {
                list.Add(FundConvert.DALtoDTO(fund));
            }
            return(list);
        }
Example #2
0
        public static FundDTO GetById(string id)
        {
            FundDTO Fund = new FundDTO();
            DB      db   = new DB();

            foreach (Fund fund in db.Funds)
            {
                if (fund.FundId == id)
                {
                    Fund = FundConvert.DALtoDTO(fund);
                    Fund.Futurbalance = GetFutureBalance(id, DateTime.Now.AddMonths(1));
                    return(Fund);
                }
            }
            return(null);
        }