static void TestMedFunctional() { Med med = new Med(); med.Name = "оциллококцинум"; med.Guid = Guid.NewGuid(); med.MinDoseCapacity = 30; med.DoseUnit = "таб"; med.MinDose = 1; med.Price = 120; med.GetMedInfo(); // Console.WriteLine(med.GetInfo()); MedCourse medCourse = new MedCourse(); medCourse.Medicine = med; medCourse.Guid = Guid.NewGuid(); medCourse.DayDose = 18; medCourse.DayDoseDistr = new Dictionary <double, double>() { { 8, 9 }, { 10, 5 }, { 11, 4 } }; medCourse.CourseDayInterval = 14; medCourse.CourseDayPattern = new int[] { 1 }; medCourse.CalculateCourse(); CourseDistributer distributedCourse = new CourseDistributer(medCourse); distributedCourse.Guid = Guid.NewGuid(); distributedCourse.startCourseDay = DateTime.Now; distributedCourse.DistributeCourseByData(); distributedCourse.PrintInfo(); var a = distributedCourse.CourseByDateTime; for (int i = 0; i < 14; i++) { distributedCourse.GetShedule(DateTime.Now.AddDays(i)); } SaveSheduleSQL(distributedCourse); }
/// <summary> /// Конструктор распределения курса. /// </summary> /// <param name="medCourse">Курс препарата.</param> public CourseDistributer(MedCourse medCourse) { Course = medCourse; MedStatus = TestName(medCourse.Medicine.Name); }