Ejemplo n.º 1
0
        public PartialViewResult HieuChinh(int?id)
        {
            var chucvu = new ChucVu();

            if (id.HasValue && id.Value > 0)
            {
                var _chucvu = new ChucVuService();
                chucvu = _chucvu.FindByKey(id);
            }
            return(PartialView("_HieuChinh", chucvu));
        }
Ejemplo n.º 2
0
 public JsonResult ThayDoiTrangThai(int?id)
 {
     if (id.HasValue)
     {
         ChucVuService _chucvu = new ChucVuService();
         var           chucvu  = _chucvu.FindByKey(id.Value);
         if (chucvu != null)
         {
             chucvu.ConHoatDong = chucvu.ConHoatDong.HasValue ? !chucvu.ConHoatDong : true;
             _chucvu.Update(chucvu);
             return(Json(new { status = true }, JsonRequestBehavior.AllowGet));
         }
     }
     return(Json(new { status = false, message = "Chức vụ không khả dụng" }));
 }