public IActionResult Getcv(string id) { try { ChiTietToChuc model = _db.ChiTietToChuc.Find(id); return(Ok(model)); } catch (Exception) { return(BadRequest()); } }
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()); } }