示例#1
0
 public Activity(ActivityCreateViewModel activity)
 {
     Name           = activity.Name;
     ActivityTypeId = activity.ActivityTypeId;
     Description    = activity.Description;
     StartDate      = activity.StartDate.Value;
     EndDate        = activity.EndDate.Value;
     ModuleId       = activity.ModuleId;
 }
示例#2
0
 public void Update(ActivityCreateViewModel activity)
 {
     Name           = activity.Name;
     Description    = activity.Description;
     ActivityTypeId = activity.ActivityTypeId;
     if (activity.StartDate != null)
     {
         StartDate = activity.StartDate.Value;
     }
     if (activity.EndDate != null)
     {
         EndDate = activity.EndDate.Value;
     }
 }