예제 #1
0
        //moi tinh
        public SingleRsp DeleteLoaiTin(LoaiTinReq lt)
        {
            var     res     = new SingleRsp();
            LoaiTin loaitin = new LoaiTin();

            loaitin.Idloaitin = lt.Idloaitin;
            loaitin.TenLt     = lt.TenLt;
            loaitin.ThutuLt   = lt.ThutuLt;
            loaitin.AnhienLt  = lt.AnhienLt;
            loaitin.Idtheloai = lt.Idtheloai;
            res = _rep.DeleteLoaiTin(loaitin);
            return(res);
        }
예제 #2
0
        public SingleRsp UpdateLoaiTin(LoaiTinReq req)
        {
            var res = new SingleRsp();

            try
            {
                LoaiTin c = new LoaiTin();
                c.Idloaitin = req.Idloaitin;
                c.TenLt     = req.TenLt;
                c.ThutuLt   = req.ThutuLt;
                c.AnhienLt  = req.AnhienLt;
                c.Idtheloai = req.Idtheloai;
                //
                res      = base.Update(c);
                res.Data = c;
            }
            catch (Exception ex)
            {
                res.SetError(ex.StackTrace);
            }

            return(res);
        }
예제 #3
0
        public IActionResult UpdateLoaiTin(LoaiTinReq req)
        {
            var res = _svc.UpdateLoaiTin(req);

            return(Ok(res));
        }
        public IActionResult DeleteLoaiTin([FromBody] LoaiTinReq req)
        {
            var res = _svc.DeleteLoaiTin(req);

            return(Ok(res));
        }