events refactoring
This commit is contained in:
parent
4475dca3fa
commit
d11fed8d32
13 changed files with 98 additions and 89 deletions
|
|
@ -18,29 +18,22 @@ namespace Yavsc.Models.Booking
|
|||
|
||||
[Display(Name="Event date")]
|
||||
public DateTime EventDate{
|
||||
get
|
||||
{ return ((RendezVous)Bill[0]).EventDate; }
|
||||
set { ((RendezVous)Bill[0]).EventDate = value; }
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Location Location {
|
||||
get
|
||||
{ return ((RendezVous)Bill[0]).Location; }
|
||||
set { ((RendezVous)Bill[0]).Location = value; }}
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public BookQuery()
|
||||
{
|
||||
this.Bill.Add(new RendezVous());
|
||||
}
|
||||
|
||||
public BookQuery(Location eventLocation, DateTime eventDate)
|
||||
{
|
||||
this.Bill.Add(new RendezVous{
|
||||
Location = eventLocation,
|
||||
EventDate = eventDate
|
||||
});
|
||||
}
|
||||
public string GetDescription() {
|
||||
return $"{Location?.Address} {EventDate.ToString()}";
|
||||
Location = eventLocation;
|
||||
EventDate = eventDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue