Beispiel #1
0
        public IHttpActionResult GetSpecializations(RequestCarrier requestCarrier)
        {
            ResponseCarrier response;

            if (requestCarrier != null && requestCarrier.TanentId != 0 && requestCarrier.From != string.Empty && requestCarrier.UserId.HasValue && requestCarrier.UserId.Value > 0)
            {
                IEnumerable <SpecializationModel> specializationModel = _staticDataServices.GetSpecializationModelCollection();
                var result = _doctorMapper.MapDoctorSpecialization(specializationModel);
                response = new ResponseCarrier()
                {
                    Status = true, PayLoad = result, ErrorMessage = string.Empty, TanentId = requestCarrier.TanentId
                };
            }
            else
            {
                response = new ResponseCarrier()
                {
                    Status = false, PayLoad = null, ErrorMessage = "Error in fetching Degree", TanentId = requestCarrier.TanentId
                };
            }
            return(Json(response));
        }