示例#1
0
 NhanVien GetNhanVienCauHinh()
 {
     return(_cacheManager.Get("SETTING_API_NHAN_VIEN_ID", () =>
     {
         return _nhanvienService.GetById(_settings.NhanVienId);
     }));
 }
示例#2
0
 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);
        }
示例#4
0
        public ActionResult Delete(int id)
        {
            var model = _nhanVienService.GetById(id);

            return(View(model));
        }
示例#5
0
 public ActionResult CapNhat(int id)
 {
     return(View(nhanVien.GetById(id)));
 }