Exemple #1
0
        public HttpResponseMessage Add([FromBody] SoTietKiem stk)
        {
            var stkBus = new BankMgmt.MW.BusinessLayer.SoTietKiemBUS();

            stkBus.AddSoTietKiem(stk);
            return(Request.CreateResponse(HttpStatusCode.Created, stk));
        }
Exemple #2
0
        public HttpResponseMessage RemoveSoTietKiem(int stkId)
        {
            var        stkBus = new BankMgmt.MW.BusinessLayer.SoTietKiemBUS();
            SoTietKiem stk    = stkBus.GetSoTietKiem(stkId);

            stk.TinhTrang = 0;
            stkBus.UpdateSoTietKiem(stk);
            return(Request.CreateResponse(HttpStatusCode.Created, stkId));
        }
Exemple #3
0
        public IHttpActionResult GetAll()
        {
            var stkBus = new BankMgmt.MW.BusinessLayer.SoTietKiemBUS();

            var listSTK = stkBus.GetAllSoTietKiem().Select(item => new
            {
                item.MaSoTietKiem,
                item.SoTienGui,
                item.NgayGui,
                item.NgayDaoHan,
                item.KyHan,
                item.LaiSuat,
                item.KhachHang.HoTen
            }).ToList();

            return(Ok(listSTK));
        }
Exemple #4
0
        public IHttpActionResult GetSoTietKiem(int stkId)
        {
            var stkBus = new BankMgmt.MW.BusinessLayer.SoTietKiemBUS();

            return(Ok(stkBus.GetSoTietKiem(stkId)));
        }