NhanVien GetNhanVienCauHinh() { return(_cacheManager.Get("SETTING_API_NHAN_VIEN_ID", () => { return _nhanvienService.GetById(_settings.NhanVienId); })); }
public async Task <BaseResponse <NhanVienDTO> > GetById(string MaNhanVien) { try { var result = _NhanVienService.GetById(MaNhanVien); if (result != null) { return(await Task.FromResult(new BaseResponse <NhanVienDTO>(result))); } return(await Task.FromResult(new BaseResponse <NhanVienDTO>(Message.GetDataNotSuccess))); } catch (Exception e) { return(await Task.FromResult(new BaseResponse <NhanVienDTO>(Message.GetDataNotSuccess))); } }
/// <summary> /// Deletes the specified value. /// </summary> /// <param name="value">The value.</param> public void Delete(int value) { NhanVien entity = currentService.GetById(value); currentService.Delete(entity); }
public ActionResult Delete(int id) { var model = _nhanVienService.GetById(id); return(View(model)); }
public ActionResult CapNhat(int id) { return(View(nhanVien.GetById(id))); }