Example #1
0
    public List <DailyActivity> GetActivities(DateTime minDay, DateTime maxDay)
    {
        DailyActivityTimes   activities       = new DailyActivityTimes();
        List <DailyActivity> activitiesForDay = activities.FindDailyActivities(minDay, maxDay);

        return(activitiesForDay);
    }
Example #2
0
    public bool CheckAvailabilityforActivity(DateTime StartDatetime, DateTime EndDateTime, int ClassID)
    {
        DailyActivityTimes activityTimes = new DailyActivityTimes();
        bool DayIsAvailable = true;

        DayIsAvailable = activityTimes.FindAvailabilityofActivity(StartDatetime, EndDateTime, ClassID); // call eventTimes.FindAvailability to check day is available

        return(DayIsAvailable);
    }
Example #3
0
    public bool CreateActivity(DateTime startTime, DateTime endTime, string descriptionofactivity, string notes, int Classid)
    {
        DailyActivityTimes activityTimes  = new DailyActivityTimes();
        DailyActivity      activityForAdd = new DailyActivity();

        activityForAdd.StartDateTime         = startTime;
        activityForAdd.EndDateTime           = endTime;
        activityForAdd.DescriptionofActivity = descriptionofactivity;
        activityForAdd.Notes   = notes;
        activityForAdd.ClassID = Classid;

        bool success = activityTimes.AddDailyActivity(activityForAdd);

        return(success);
    }
Example #4
0
    public bool RemoveActivity(int id)
    {
        DailyActivityTimes activities = new DailyActivityTimes();

        try
        {
            bool b = activities.DeleteDailyActivity(id);
            if (b)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        catch (Exception e)
        {
            return(false);
        }
    }