public HallViewModel(IHall view) { this.view = view; view.SaveHall += SaveHall; view.GetHallName += GetHallName; view.SetHallName += SetHallName; }
public void Update(IBaseModel model) { IHall hall = (IHall)model; this.Id = hall.Id; this.HalName = hall.HalName; this.HalSitscount = hall.HalSitscount; this.CinemaId = hall.CinemaId; }
public async Task Add(IHall hall) { await this.hallService.addHallAsync(new addHallRequest { halName = hall.HalName, halSitscount = hall.HalSitscount, halSitscountSpecified = true, cinId = hall.CinemaId, cinIdSpecified = true, }); }
public async Task <IHall> Merge(IHall hall) { var result = await this.hallService.mergeHallAsync(new mergeHallRequest { halId = hall.Id, halIdSpecified = true, halName = hall.HalName, halSitscount = hall.HalSitscount, halSitscountSpecified = true, cinId = hall.CinemaId, cinIdSpecified = true, }); return(this.ToHall(result.@return)); }
private bool FilterHalls(IHall hall) { return(this.cinemasView.Selected != null && hall.CinemaId == this.cinemasView.Selected.Id); }
public override bool Equals(object hall) { IHall hallToCompare = hall as IHall; return(hallToCompare != null && this.Id.Equals(hallToCompare.Id)); }