コード例 #1
0
 public IActionResult Getcv(string id)
 {
     try
     {
         ChiTietToChuc model = _db.ChiTietToChuc.Find(id);
         return(Ok(model));
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }
コード例 #2
0
 public IActionResult Post([FromBody] ChiTietToChuc ql)
 {
     try
     {
         ql.TrangThai = true;
         ChiTietToChuc ctql = new ChiTietToChuc()
         {
             MaCongViec    = ql.MaCongViec,
             MaDonVi       = ql.MaDonVi,
             DiaDiemToChuc = ql.DiaDiemToChuc,
             TrangThai     = ql.TrangThai
         };
         _db.ChiTietToChuc.Add(ctql);
         _db.SaveChanges();
         return(Ok("Them thanh cong"));
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }