Exemple #1
0
 public JsonResult PheDuyetYeuCauPhongBan(int?id)
 {
     if (id.HasValue)
     {
         NhanVienService service = new NhanVienService();
         var             nv      = service.FindByKey(id.Value);
         if (nv != null)
         {
             nv.TrangThai = nv.TrangThai.HasValue ? !nv.TrangThai : true;
             service.Update(nv);
             return(Json(new { status = true }, JsonRequestBehavior.AllowGet));
         }
     }
     return(Json(new { status = false, message = "Không khả dụng" }));
 }