예제 #1
0
        public bool UpdateTreatment(Treatment treatment)
        {
            Treatment treatment1 = Treatments.SingleOrDefault(tr => tr.Id == treatment.Id);

            if (treatment1 == null)
            {
                return(false);
            }

            treatment1.Name     = treatment.Name;
            treatment1.Duration = treatment.Duration;
            treatment1.Price    = treatment.Price;
            treatment1.Category = treatment.Category;

            return(true);
        }