コード例 #1
0
 private void PopulateNewHabit()
 {
     newHabit.SaveDate       = DateTime.Today;
     newHabit.Smoke_describe = newHabit.ConvertSmokeDescribeCode(_patientRegView.Smoke_describe);
     newHabit.Smoke          = newHabit.ConvertSmokeStatus(newHabit.Smoke_describe);
     newHabit.Smoke_year     = (newHabit.Smoke) ? _patientRegView.Smoke_year : null;
     newHabit.Smoke_roll     = (newHabit.Smoke) ? _patientRegView.Smoke_roll : null;
     newHabit.Alcohol        = _patientRegView.Alcohol;
     newHabit.Alcohol_year   = (newHabit.Alcohol) ? _patientRegView.Alcohol_year : null;
     newHabit.Alcohol_bottle = (newHabit.Alcohol) ? _patientRegView.Alcohol_bottle : null;
     newHabit.Kava           = _patientRegView.Kava;
     newHabit.Kava_year      = (newHabit.Kava) ? _patientRegView.Kava_year: null;
     newHabit.Kava_bottle    = (newHabit.Kava) ? _patientRegView.Kava_bottle: "";
     newHabit.HealthyDiet    = _patientRegView.HealthyDiet;
     newHabit.Exercise       = _patientRegView.Exercise;
 }