コード例 #1
0
        public void Execute(JobReviewDto request)
        {
            _validator.ValidateAndThrow(request); //ValidationException
            var jobReview = new JobReviews()
            {
                Description = request.Description,
                JobId       = request.JobId,
                UserId      = request.UserId
            };

            _context.Entry(jobReview).State = EntityState.Added;
            _context.SaveChanges();
        }
コード例 #2
0
ファイル: FormJobTime.cs プロジェクト: ChemBrain/OpenDental
 private void butOK_Click(object sender, EventArgs e)
 {
     //Insert new time log entries for each row that has a non-zero additional hours
     foreach (GridRow row in gridJobs.ListGridRows)
     {
         if (row.Cells[4].Text.ToString() != "0")
         {
             JobReview review = new JobReview();
             review.Description  = POut.String(row.Cells[4].Text.ToString());
             review.ReviewerNum  = Security.CurUser.UserNum;
             review.TimeReview   = TimeSpan.FromHours(PIn.Double(row.Cells[4].Text));
             review.JobNum       = ((Job)row.Tag).JobNum;
             review.ReviewStatus = JobReviewStatus.TimeLog;
             JobReviews.Insert(review);
             Signalods.SetInvalid(InvalidType.Jobs, KeyType.Job, review.JobNum);
         }
     }
     DialogResult = DialogResult.OK;
     Close();
 }