/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (VenueID != null) { hashCode = hashCode * 59 + VenueID.GetHashCode(); } if (VenueName != null) { hashCode = hashCode * 59 + VenueName.GetHashCode(); } if (Address != null) { hashCode = hashCode * 59 + Address.GetHashCode(); } if (City != null) { hashCode = hashCode * 59 + City.GetHashCode(); } if (Country != null) { hashCode = hashCode * 59 + Country.GetHashCode(); } return(hashCode); } }
public AddVenueCommand(string venueName, string address, string mapURN, string contact) : base(Guid.NewGuid()) { Address = Address.Parse(address); Contact = Contact.Parse(contact); VenueMap = new VenueMap(new Uri(mapURN ?? "http://maps.google.co.uk")); VenueName = new VenueName(venueName); Version = new Version(1); }
public UpdateVenueCommand(Guid id, string venueName, string address, string mapURN, string contact, int version) { Id = new Id(id); Address = Address.Parse(address); Contact = Contact.Parse(contact); VenueMap = new VenueMap(new Uri(mapURN != null ? mapURN : "http://maps.google.co.uk")); VenueName = new VenueName(venueName); Version = new Version(version); }
public VenueDocument(Id id, Version version, VenueName venueName, Address address, VenueMap venueMap, Contact contact) { Id = id; Version = version; VenueName = venueName; Address = address; VenueMap = venueMap; VenueContact = contact; }
public VenueDocument(Id id, Version version, VenueName venueName, Address address, VenueMap venueMap, VenueContact venueContact) { Id = (Guid)id; Version = (int) version; VenueName = (string) venueName; Address = (string) address; VenueMap = (string) venueMap; VenueContact = (string) venueContact; }
public string GetShowName() { var showBuilder = new StringBuilder(); //Always append the showdate because it always exists showBuilder.Append(ShowDate.Value.ToString("MM/dd/yyyy")); //If there is a venue then append it if (!VenueName.IsNullEmptyOrWhitespace()) { showBuilder.Append(SEPARATOR + VenueName); } //If there is a city if (!City.IsNullEmptyOrWhitespace()) { showBuilder.Append(SEPARATOR); //If there is a state then append both city and state if (!State.IsNullEmptyOrWhitespace()) { showBuilder.Append(City + ", " + State); } //Otherwise just append the city else { showBuilder.Append(City); } } //If there is NO city else { //If there is a state though it could be a country if (!State.IsNullEmptyOrWhitespace()) { showBuilder.Append(SEPARATOR + State); } } //If there is a country besides USA then show it if (!Country.IsNullEmptyOrWhitespace() && Country != "USA") { showBuilder.Append(SEPARATOR + Country); } return(showBuilder.ToString()); }
protected void Page_Load(object sender, EventArgs e) { ValidateSessions(); DataView dv = (DataView)VenueName.Select(DataSourceSelectArguments.Empty); DataView dv7 = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty); Label1.Text = (string)dv.Table.Rows[0][0]; Label12.Text = (string)dv7.Table.Rows[0][0]; Label3.Text = Session["EventName"].ToString(); Label4.Text = ConvertMode(Session["StartTime"].ToString()); Label5.Text = Session["NoofHours"].ToString() + "hrs"; Label6.Text = ConvertMode(Session["EndTime"].ToString()); compute(); MembershipUser ma = Membership.GetUser(); Session["uid"] = ma.ProviderUserKey.ToString(); DataView dv2 = (DataView)ClientId.Select(DataSourceSelectArguments.Empty); cid.Text = Convert.ToString((int)dv2.Table.Rows[0][0]); }
/// <summary> /// Returns true if Venue instances are equal /// </summary> /// <param name="other">Instance of Venue to be compared</param> /// <returns>Boolean</returns> public bool Equals(Venue other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( VenueID == other.VenueID || VenueID != null && VenueID.Equals(other.VenueID) ) && ( VenueName == other.VenueName || VenueName != null && VenueName.Equals(other.VenueName) ) && ( Address == other.Address || Address != null && Address.Equals(other.Address) ) && ( City == other.City || City != null && City.Equals(other.City) ) && ( Country == other.Country || Country != null && Country.Equals(other.Country) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (TicketEventDateID != null) { hashCode = hashCode * 59 + TicketEventDateID.GetHashCode(); } if (TicketEventID != null) { hashCode = hashCode * 59 + TicketEventID.GetHashCode(); } if (EventName != null) { hashCode = hashCode * 59 + EventName.GetHashCode(); } if (EventHtmlDescription != null) { hashCode = hashCode * 59 + EventHtmlDescription.GetHashCode(); } if (EventImagePath != null) { hashCode = hashCode * 59 + EventImagePath.GetHashCode(); } if (VenueID != null) { hashCode = hashCode * 59 + VenueID.GetHashCode(); } if (VenueName != null) { hashCode = hashCode * 59 + VenueName.GetHashCode(); } if (Address != null) { hashCode = hashCode * 59 + Address.GetHashCode(); } if (City != null) { hashCode = hashCode * 59 + City.GetHashCode(); } if (Country != null) { hashCode = hashCode * 59 + Country.GetHashCode(); } if (EventStartDateTime != null) { hashCode = hashCode * 59 + EventStartDateTime.GetHashCode(); } if (MaxTickets != null) { hashCode = hashCode * 59 + MaxTickets.GetHashCode(); } if (Price != null) { hashCode = hashCode * 59 + Price.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if EventDate instances are equal /// </summary> /// <param name="other">Instance of EventDate to be compared</param> /// <returns>Boolean</returns> public bool Equals(FullEventDate other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( TicketEventDateID == other.TicketEventDateID || TicketEventDateID != null && TicketEventDateID.Equals(other.TicketEventDateID) ) && ( TicketEventID == other.TicketEventID || TicketEventID != null && TicketEventID.Equals(other.TicketEventID) ) && ( EventName == other.EventName || EventName != null && EventName.Equals(other.EventName) ) && ( EventHtmlDescription == other.EventHtmlDescription || EventHtmlDescription != null && EventHtmlDescription.Equals(other.EventHtmlDescription) ) && ( EventImagePath == other.EventImagePath || EventImagePath != null && EventImagePath.Equals(other.EventImagePath) ) && ( VenueID == other.VenueID || VenueID != null && VenueID.Equals(other.VenueID) ) && ( VenueName == other.VenueName || VenueName != null && VenueName.Equals(other.VenueName) ) && ( Address == other.Address || Address != null && Address.Equals(other.Address) ) && ( City == other.City || City != null && City.Equals(other.City) ) && ( Country == other.Country || Country != null && Country.Equals(other.Country) ) && ( EventStartDateTime == other.EventStartDateTime || EventStartDateTime != null && EventStartDateTime.Equals(other.EventStartDateTime) ) && ( MaxTickets == other.MaxTickets || MaxTickets != null && MaxTickets.Equals(other.MaxTickets) ) && ( Price == other.Price || Price != null && Price.Equals(other.Price) )); }