public void TestGetActivities()
        {
            var activitiesServices = new ActivitiesServices();

            var activities = activitiesServices.GetActivities(string.Empty, DateTime.Now.AddSeconds(-10));

            Assert.IsNotNull(activities);
        }
示例#2
0
        public object Clone()
        {
            Activity activity = new Activity
            {
                Date                = Date,
                Client              = Client,
                ClientId            = ClientId,
                State               = State,
                Periodicity         = Periodicity,
                ActivitiesEmployees = new List <ActivityEmployee>(ActivitiesEmployees.Select(a => new ActivityEmployee {
                    EmployeeId = a.EmployeeId
                })),
                ActivitiesServices = new List <ActivityService>(ActivitiesServices.Select(a => new ActivityService {
                    ServiceCode = a.ServiceCode
                }))
            };

            activity.ActivitiesEmployees.ForEach(a => a.Activity = activity);
            activity.ActivitiesServices.ForEach(a => a.Activity  = activity);

            return(activity);
        }