Exemple #1
0
        public Activity()
        {
            Id             = -1;
            Name           = string.Empty;
            Description    = string.Empty;
            ActivityStatus = Status.New;
            Billable       = true;

            Activities = new List <DocumentActivities>();

            ProjectId        = -1;
            CompanyProfileId = -1;

            Started = null;
            Stopped = null;

            LanguageRateChecked = false;
            HourlyRateChecked   = false;
            CustomRateChecked   = false;

            IsChecked = false;

            DocumentActivityRates = new ActivityRates();
            ComparisonOptions     = new ComparisonSettings();
            MetricReportSettings  = new QualityMetricReportSettings();
        }
        public object Clone()
        {
            var activityRate = new ActivityRates();

            activityRate.Id = Id;
            activityRate.ProjectActivityId = ProjectActivityId;

            activityRate.LanguageRateId          = LanguageRateId;
            activityRate.LanguageRateName        = LanguageRateName;
            activityRate.LanguageRateDescription = LanguageRateDescription;
            activityRate.LanguageRateCurrency    = LanguageRateCurrency;
            activityRate.LanguageRateTotal       = LanguageRateTotal;

            activityRate.LanguageRates = new List <LanguageRate>();
            foreach (var languageRate in LanguageRates)
            {
                activityRate.LanguageRates.Add((LanguageRate)languageRate.Clone());
            }


            activityRate.HourlyRateName        = HourlyRateName;
            activityRate.HourlyRateDescription = HourlyRateDescription;
            activityRate.HourlyRateRate        = HourlyRateRate;
            activityRate.HourlyRateQuantity    = HourlyRateQuantity;
            activityRate.HourlyRateCurrency    = HourlyRateCurrency;
            activityRate.HourlyRateTotal       = HourlyRateTotal;

            activityRate.CustomRateName        = CustomRateName;
            activityRate.CustomRateDescription = CustomRateDescription;
            activityRate.CustomRateCurrency    = CustomRateCurrency;
            activityRate.CustomRateTotal       = CustomRateTotal;

            return(activityRate);
        }