private void ChangeCategory(ReservationCategory newCategory) { ReservationsByCategory newReservationsByCategory = new ReservationsByCategory(ReservationCategory.OverUtilized); // BUGBUG: TODO: Look up in Array (GRP) this.reservationsByCategory.RemoveReservation(this); newReservationsByCategory.AddReservation(this); this.reservationsByCategory = newReservationsByCategory; if (newCategory == ReservationCategory.OverUtilized) { // Stur pot. (Check appropriate queue - we may be able to start transmitting / receiving. // TODO GRP. } }
private void CheckCategory() { ReservationCategory newCategory = ReservationCategory.UnderUtilized; if (this.currentUtilization > this.reservationUtilization) { newCategory = (this.currentUtilization > this.maximumUtilization) ? ReservationCategory.OverUtilized : ReservationCategory.LimitUtilized; } if (newCategory != this.reservationsByCategory.ReservationCategory) { ChangeCategory(newCategory); } }
public ReservationsByCategory(ReservationCategory reservationCategory) { this.reservationCategory = reservationCategory; }
partial void ReservationCategories_Updating(ReservationCategory entity) { entity.UpdateDate = DateTime.Now; entity.UpdateUser = Application.User.Name; }