public void SetStatus(ScheduleEntryState scheduleEntryState)
        {
            var list = new BAGlobalObject[] { SelectedEntry };

            reservationOperation(list.ToList(), delegate(BAGlobalObject obj)
            {
                ReservationsOperationParam param = new ReservationsOperationParam();
                param.EntryId       = obj.GlobalId;
                param.OperationType = scheduleEntryState == ScheduleEntryState.Done ? ReservationsOperationType.StatusDone : ReservationsOperationType.StatusCancelled;
                return(param);
            });
        }
Example #2
0
        protected Championship CreateChampionshipEx(Profile profile, string name, ChampionshipType type = ChampionshipType.Trojboj, ScheduleEntryState state = ScheduleEntryState.Done, DateTime?startDate = null, params ChampionshipCategory[] categories)
        {
            Championship championship = new Championship();

            championship.Name    = name;
            championship.MyPlace = GetDefaultMyPlace(profile);
            championship.Profile = profile;
            championship.State   = state;
            if (!startDate.HasValue)
            {
                startDate = DateTime.Now;
            }
            championship.StartTime = startDate.Value;
            foreach (var championshipCategory in categories)
            {
                championship.Categories.Add(championshipCategory);
            }

            championship.ChampionshipType = type;
            insertToDatabase(championship);

            return(championship);
        }
Example #3
0
        protected Championship CreateChampionship(Profile profile, string name, ChampionshipType type = ChampionshipType.Trojboj, ScheduleEntryState state = ScheduleEntryState.Done)
        {
            Championship championship = new Championship();

            championship.Name             = name;
            championship.MyPlace          = GetDefaultMyPlace(profile);
            championship.StartTime        = DateTime.Now;
            championship.Profile          = profile;
            championship.ChampionshipType = type;
            championship.State            = state;
            insertToDatabase(championship);

            return(championship);
        }