예제 #1
0
        public static DepositDetails GetById(int id)
        {
            DepositDetails depositDetails = new DepositDetails();

            try
            {
                DB      db      = new SuperGmachEntities();
                Deposit deposit = db.Deposits.FirstOrDefault(d => d.DepositId == id);
                depositDetails = DepositConvert.DALtoDepositDetails(deposit);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(depositDetails);
        }
예제 #2
0
        public static List <DepositDetails> GetList()
        {
            List <DepositDetails> deposits = new List <DepositDetails>();

            try
            {
                DB db = new SuperGmachEntities();
                foreach (var deposit in db.Deposits)
                {
                    deposits.Add(DepositConvert.DALtoDepositDetails(deposit));
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            return(deposits);
        }
예제 #3
0
        public static List <DepositDetails> GetByFundId(string FundId)
        {
            List <DepositDetails> deposits = new List <DepositDetails>();

            try
            {
                DB             db           = new SuperGmachEntities();
                List <Deposit> deposits_DAL = db.Deposits.Where(d => d.FundId == FundId).ToList();
                foreach (var deposit in deposits_DAL)
                {
                    deposits.Add(DepositConvert.DALtoDepositDetails(deposit));
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            return(deposits);
        }