public ActionResult <ItemResponse <EventV2> > Details(int id) { int code = 200; BaseResponse response = null; try { int userId = _authService.GetCurrentUserId(); EventV2 anEvent = _service.Details(id, userId); if (anEvent == null) { code = 404; response = new ErrorResponse("Event not found"); } else { response = new ItemResponse <EventV2> { Item = anEvent }; } } catch (Exception ex) { code = 500; response = new ErrorResponse($"Generic Error: {ex.Message}"); base.Logger.LogError(ex.ToString()); } return(StatusCode(code, response)); }
//---------------------------------------------------------------- void Start() { me = GameObject.Find("Tunel Of Death(Clone)"); player = GameObject.Find("Player"); eventV2 = GameObject.Find("Event").GetComponent <EventV2>(); move_tunel = new Vector3(player.transform.position.x, 0, 0); move_position = 0; move_start = 0; move_eventStart = player.GetComponent <Map_generatorV2>().z_pos; RandomSwipe(); }
public EventV2 Details(int id, int userId) { string procName = "[dbo].[Events_SelectDetails_ById_V3]"; EventV2 valoreevent = null; _data.ExecuteCmd(procName, delegate(SqlParameterCollection parameterCollection) { parameterCollection.AddWithValue("@Id", id); parameterCollection.AddWithValue("@UserId", userId); }, delegate(IDataReader reader, short set) { valoreevent = new EventV2(); int startingIndex; eventV2Mapper(reader, out valoreevent, out startingIndex); }); return(valoreevent); }
private static EventV2 eventV2Mapper(IDataReader reader, out EventV2 valoreevent, out int startingIndex) { valoreevent = new EventV2(); startingIndex = 0; valoreevent.Id = reader.GetSafeInt32(startingIndex++); valoreevent.Name = reader.GetSafeString(startingIndex++); valoreevent.Summary = reader.GetSafeString(startingIndex++); valoreevent.ShortDescription = reader.GetSafeString(startingIndex++); valoreevent.ImageUrl = reader.GetSafeString(startingIndex++); valoreevent.ExternalSiteUrl = reader.GetSafeString(startingIndex++); valoreevent.IsFree = reader.GetSafeBool(startingIndex++); valoreevent.DateCreated = reader.GetSafeDateTime(startingIndex++); valoreevent.DateModified = reader.GetSafeDateTime(startingIndex++); valoreevent.DateStart = reader.GetSafeDateTime(startingIndex++); valoreevent.DateEnd = reader.GetSafeDateTime(startingIndex++); valoreevent.Capacity = reader.GetSafeInt32Nullable(startingIndex++); valoreevent.Price = reader.GetSafeInt64(startingIndex++); valoreevent.StripeProductId = reader.GetSafeString(startingIndex++); valoreevent.StripePriceId = reader.GetSafeString(startingIndex++); valoreevent.ParticipantUserId = reader.GetSafeInt32Nullable(startingIndex++); valoreevent.EventType = new EventType(); valoreevent.EventType.Id = reader.GetSafeInt32(startingIndex++); valoreevent.EventType.Name = reader.GetSafeString(startingIndex++); valoreevent.VenueV2 = new VenuesV2(); valoreevent.VenueV2.Id = reader.GetSafeInt32(startingIndex++); valoreevent.VenueV2.Name = reader.GetSafeString(startingIndex++); valoreevent.VenueV2.Description = reader.GetSafeString(startingIndex++); valoreevent.VenueV2.Url = reader.GetSafeString(startingIndex++); valoreevent.VenueV2.Location = new Location(); valoreevent.VenueV2.Location.Id = reader.GetSafeInt32(startingIndex++); valoreevent.VenueV2.Location.LineOne = reader.GetSafeString(startingIndex++); valoreevent.VenueV2.Location.LineTwo = reader.GetSafeString(startingIndex++); valoreevent.VenueV2.Location.City = reader.GetSafeString(startingIndex++); valoreevent.VenueV2.Location.Zip = reader.GetSafeString(startingIndex++); valoreevent.VenueV2.Location.State = new TwoColumn(); valoreevent.VenueV2.Location.State.Id = reader.GetSafeInt32(startingIndex++); valoreevent.VenueV2.Location.State.Name = reader.GetSafeString(startingIndex++); valoreevent.VenueV2.Location.Latitude = reader.GetSafeDouble(startingIndex++); valoreevent.VenueV2.Location.Longitude = reader.GetSafeDouble(startingIndex++); valoreevent.VenueV2.Location.LocationType = new TwoColumn(); valoreevent.VenueV2.Location.LocationType.Id = reader.GetSafeInt32(startingIndex++); return(valoreevent); }