Пример #1
0
 public static ShowWeeklyPlan CreateShowWeeklyPlan(WeekSummary weekSummary, WeekTarget weekTarget, Department department)
 {
     var showWeeklyPlan = new ShowWeeklyPlan();
     if (!weekSummary.Null())
     {
         showWeeklyPlan.ID = weekSummary.ID;
         showWeeklyPlan.Description = weekSummary.Description;
         showWeeklyPlan.CreateTime = weekSummary.CreateTime.ToString("yy-MM-dd HH:mm");
         showWeeklyPlan.TargetTime = weekSummary.WeekNum;
     }
     if (!weekTarget.Null())
     {
         showWeeklyPlan.Target = weekTarget.Target ?? " ";
         showWeeklyPlan.Progress = weekTarget.Progress;
         showWeeklyPlan.TargetTime = weekTarget.WeekNum;
     }
     if (!department.Null())
     {
         showWeeklyPlan.DepartmentName = department.Name;
     }
     DateTime beginTime;
     DateTime endTime;
     DateTimeUtility.GetWeekDays(showWeeklyPlan.TargetTime, out beginTime, out endTime);
     showWeeklyPlan.BeginTime = beginTime.ToString("yy-MM-dd");
     showWeeklyPlan.EndTime = endTime.ToString("yy-MM-dd");
     return showWeeklyPlan;
 }
Пример #2
0
 public Department CreateShowDepartment()
 {
     Department department = new Department();
     department.ID = Guid.NewGuid();
     department.Name = Name;
     department.CreateTime = DateTime.Now;
     return department;
 }
Пример #3
0
 public Department UpdateShowDepartment(Department department)
 {
     department.Name = Name;
     return department;
 }