예제 #1
0
 public static ProjectProgressDto ToDto(this ProjectProgressStatus progress)
 {
     if (progress == null)
     {
         return(null);
     }
     return(new ProjectProgressDto {
         Id = progress.Id, ProjId = progress.ProjectId, Month = progress.Month, OK = progress.OK
     });
 }
예제 #2
0
        public void AddOrUpdateProgress(long projId, DateTime month, bool ok)
        {
            var mStr     = GetMonth(month);
            var progress = _progressRepo.Table.FirstOrDefault(c => c.ProjectId == projId && mStr == c.Month);

            if (progress == null)
            {
                progress = new ProjectProgressStatus {
                    ProjectId = projId, Month = mStr, OK = ok
                };
                _progressRepo.Insert(progress);
            }
            else
            {
                progress.OK = ok;
                UpdateProgress(progress);
            }
        }
예제 #3
0
 public void UpdateProgress(ProjectProgressStatus progress)
 {
     _progressRepo.Update(progress);
 }