public ActionResult Edit(int id) { Group3ServiceReference.Service service = client.GetServiceById(id); List <Group3ServiceReference.ServiceStatusType> statuses = client.GetServiceStatusTypes().ToList(); List <Group3ServiceReference.SubCategory> subCategories = client.GetSubCategories().ToList(); List <Group3ServiceReference.ServiceType> serviceTypes = client.GetTypes().ToList(); List <Group3ServiceReference.Category> categories = client.GetCategories().ToList(); EditServiceObject editService = new EditServiceObject( service.Id, service.ServiceType.Id, service.ServiceStatus.Id, service.Picture, service.Title, service.Description, service.Price, service.StartDate, service.EndDate, service.TimeNeeded, service.SubCategory.Id, statuses, subCategories, categories, serviceTypes ); return(View(editService)); }
public ActionResult ShowReviewsByServiceId(int id) { List <ReviewServiceReference.ReviewData> reviewList = client.GetReviewsByServiceId(id).ToList(); Group3ServiceReference.Service obj = new Group3ServiceReference.Service(); obj = client3.GetServiceById(id); if (obj == null) { ViewBag.serviceid = id; } else { ViewBag.serviceid = obj.Title; } return(View(reviewList)); }