Example #1
0
 public CreateOrderViewModel()
 {
     AddEquipmentCommand               = new Command(AddEquipmentToOrder, CanAddEquipmentToOrder);
     CreateOrderCommand                = new Command(CreateOrder);
     RemoveEquipmentCommand            = new Command(RevoveEquipment);
     CheckEquipmentAvailabilityCommand = new Command(CheckAvailabilityOfEquipment);
     GoogleCalendarColors              = AppSettings.GoogleCalendarColors;
     SelectedColor = GoogleCalendarColors.Select(c => c).Where(c => c.Key == AppSettings.GoogleCalendarColorId)
                     .SingleOrDefault();
     LoadEquipments();
 }
Example #2
0
 public EditOrderViewModel(Order oldOrder)
 {
     OldOrder               = oldOrder;
     AddEquipmentCommand    = new Command(AddEquipmentToOrder, CanAddEquipmentToOrder);
     EditOrderCommand       = new Command(UpdateOrder);
     RemoveEquipmentCommand = new Command(RevoveEquipment);
     GoogleCalendarColors   = AppSettings.GoogleCalendarColors;
     SelectedColor          = GoogleCalendarColors.Select(c => c).Where(c => c.Key == OldOrder.GoogleCalendarColorId)
                              .SingleOrDefault();
     LoadEquipments();
 }