public IHttpActionResult Put(int id, Dto.Developer developer) { try { if (developer == null) { return this.NotFound(); } bool existing = DeveloperService.PutDeveloper(id, developer.Name, developer.PhoneNumber, developer.Email); if (!existing) { return this.NotFound(); } else { return this.Ok(developer); } } catch (Exception e) { return this.InternalServerError(e); } }
public IHttpActionResult Post(Dto.WebLocation location) { try { if (location == null) { return this.NotFound(); } location = WebLocationService.PostWebLocation(location.Url, location.Website, location.Webpage); return this.Created(this.Request.RequestUri.AbsolutePath + "/" + location.Url, location); } catch (Exception e) { return this.InternalServerError(e); } }
public IHttpActionResult Post(Dto.Developer developer) { try { if (developer == null) { return this.NotFound(); } DeveloperService.PostDeveloper(developer.Name, developer.PhoneNumber, developer.Email); return this.Created(this.Request.RequestUri.AbsolutePath + "/" + developer.Name, developer); } catch (Exception e) { return this.InternalServerError(e); } }
public IHttpActionResult Put(int id, Dto.TicketInformation ticInfo) { try { if (ticInfo == null) { return this.NotFound(); } bool existing = TicketInformationService.PutTicketInformation(id, ticInfo.Priority, ticInfo.DevNotes); if (!existing) { return this.NotFound(); } else { return this.Ok(ticInfo); } } catch (Exception e) { return this.InternalServerError(e); } }
public IHttpActionResult Put(int id, Dto.WebLocation location) { try { if (location == null) { return this.NotFound(); } bool existing = WebLocationService.PutWebLocation(id, location.Url, location.Website, location.Webpage); if (!existing) { return this.NotFound(); } else { return this.Ok(location); } } catch (Exception e) { return this.InternalServerError(e); } }
public IHttpActionResult Put(int id, Dto.Customer customer) { try { if (customer == null) { return this.NotFound(); } bool existing = CustomerService.PutCustomer(id, customer.Name, customer.Email, customer.PhoneNumber, customer.Message, customer.TwitterHandle, customer.FacebookName, customer.ContactMethod); if (!existing) { return this.NotFound(); } else { return this.Ok(customer); } } catch (Exception e) { return this.InternalServerError(e); } }
public IHttpActionResult Post(Dto.TicketInformation ticInfo) { try { if (ticInfo == null) { return this.NotFound(); } TicketInformationService.PostTicketInformation(ticInfo.Priority, ticInfo.DevNotes); return this.Created(this.Request.RequestUri.AbsolutePath + "/" + ticInfo.Id, ticInfo); } catch (Exception e) { return this.InternalServerError(e); } }
public IHttpActionResult Put(int id, Dto.DeveloperTeam devTeam) { try { if (devTeam == null) { return this.NotFound(); } bool existing = DeveloperTeamService.PutDeveloperTeam(id, devTeam.TeamMembers, devTeam.TeamName); if (!existing) { return this.NotFound(); } else { return this.Ok(devTeam); } } catch (Exception e) { return this.InternalServerError(e); } }
public IHttpActionResult Post(Dto.Customer customer) { if (customer == null) { return this.NotFound(); } try { CustomerService.PostCustomer(customer.Name, customer.Email, customer.PhoneNumber, customer.Message, customer.TwitterHandle, customer.FacebookName, customer.ContactMethod); return this.Created(this.Request.RequestUri.AbsolutePath + "/" + customer.Name, customer); } catch (Exception e) { return this.InternalServerError(e); } }
public IHttpActionResult Post(Dto.DeveloperTeam devTeam) { try { if (devTeam == null) { return this.NotFound(); } DeveloperTeamService.PostDeveloperTeam(devTeam.TeamMembers, devTeam.TeamName); return this.Created(this.Request.RequestUri.AbsolutePath + "/" + devTeam.TeamName, devTeam); } catch (Exception e) { return this.InternalServerError(e); } }
public IHttpActionResult Put(int id, Dto.Ticket ticket) { try { if (ticket == null) { return this.NotFound(); } bool existing = TicketService.PutTicket( id, ticket.TicketInfo.Priority, ticket.TicketInfo.DevNotes, ticket.ContactInfo.Name, ticket.ContactInfo.Email, ticket.ContactInfo.PhoneNumber, ticket.ContactInfo.Message, ticket.ContactInfo.TwitterHandle, ticket.ContactInfo.FacebookName, ticket.ContactInfo.ContactMethod, ticket.FeatureToFix.Location.Url, ticket.FeatureToFix.Location.Website, ticket.FeatureToFix.Location.Webpage, ticket.FeatureToFix.Team.TeamMembers, ticket.FeatureToFix.Team.TeamName, ticket.FeatureToFix.Team.Id, ticket.FeatureToFix.IsBroken, ticket.FeatureToFix.Name); if (!existing) { return this.NotFound(); } else { return this.Ok(ticket); } } catch (Exception e) { return this.InternalServerError(e); } }
public IHttpActionResult Post(Dto.Ticket ticket) { try { if (ticket == null) { return this.NotFound(); } TicketService.PostTicket( ticket.TicketInfo.Priority, ticket.TicketInfo.DevNotes, ticket.ContactInfo.Name, ticket.ContactInfo.Email, ticket.ContactInfo.PhoneNumber, ticket.ContactInfo.Message, ticket.ContactInfo.TwitterHandle, ticket.ContactInfo.FacebookName, ticket.ContactInfo.ContactMethod, ticket.FeatureToFix.Location.Url, ticket.FeatureToFix.Location.Website, ticket.FeatureToFix.Location.Webpage, ticket.FeatureToFix.Team.TeamMembers, ticket.FeatureToFix.Team.TeamName, ticket.FeatureToFix.Team.Id, ticket.FeatureToFix.IsBroken, ticket.FeatureToFix.Name); return this.Created(this.Request.RequestUri.AbsolutePath + "/" + ticket.FeatureToFix.Name, ticket); } catch (Exception e) { return this.InternalServerError(e); } }
public IHttpActionResult Put(int id, Dto.Feature feature) { try { if (feature == null) { return this.NotFound(); } bool existing = FeatureService.PutFeature(id, feature.Location.Url, feature.Location.Website, feature.Location.Webpage, feature.Team.Id, feature.Team.TeamMembers, feature.Team.TeamName, feature.IsBroken, feature.Name); if (!existing) { return this.NotFound(); } else { return this.Ok(feature); } } catch (Exception e) { return this.InternalServerError(e); } }
public IHttpActionResult Post(Dto.Feature feature) { try { if (feature == null) { return this.NotFound(); } FeatureService.PostFeature(feature.Location.Url, feature.Location.Website, feature.Location.Webpage, feature.Team.Id, feature.Team.TeamMembers, feature.Team.TeamName, feature.IsBroken, feature.Name); return this.Created(this.Request.RequestUri.AbsolutePath + "/" + feature.Name, feature); } catch (Exception e) { return this.InternalServerError(e); } }