Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        public IHttpActionResult Detail(int staffId)
        {
            var modelResult = iStaffBusiness.Read(staffId);

            return(Json(modelResult));
        }
Esempio n. 5
0
        public SimpleResponse <StaffViewModel> Detail(int staffId)
        {
            var response = iStaffBusiness.Read(staffId);

            return(response);
        }