public ActionResult Detail(int staffId) { var response = iStaffBusiness.Read(staffId); if (response.Data == null || response.ResponseCode < 1) { return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); } return(View(response.Data)); }
public IActionResult Detail(int staffId) { var response = iStaffBusiness.Read(staffId); if (response.Data == null || response.ResponseCode < 1) { return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); } return(View(response.Data, JsonRequestBehavior.AllowGet)); }
public SimpleResponse <StaffDto> Read(int staffId) { var response = new SimpleResponse <StaffDto>(); try { var resp = iStaffBusiness.Read(staffId); var isNullOrDef = resp.Data == null || resp.Data == default(StaffViewModel); response.ResponseCode = isNullOrDef ? BusinessResponseValues.NullEntityValue : 1; response.RCode = resp.RCode; response.ResponseMessage = resp.ResponseMessage; if (!isNullOrDef) { response.Data = SimpleMapper.Map <StaffViewModel, StaffDto>(resp.Data); } } catch (Exception ex) { response.ResponseCode = BusinessResponseValues.InternalError; response.ResponseMessage = "Okuma iþleminde hata oluþtu."; SimpleFileLogger.Instance.Error(ex); } return(response); }
public IHttpActionResult Detail(int staffId) { var modelResult = iStaffBusiness.Read(staffId); return(Json(modelResult)); }
public SimpleResponse <StaffViewModel> Detail(int staffId) { var response = iStaffBusiness.Read(staffId); return(response); }