private void BtnSave_Click(object sender, RoutedEventArgs e) { var sec = new Section_Evaluation { Evaluator_ID = 1, Comment = "Testing 123" }; theSection.Section_Evaluation.Add(sec); }
private void AddToSectionEvaluations() { var lstSections = stm.Sections.ToList(); foreach (SmokeTestDBClassLibrary.Section sct in lstSections) { var re = new Section_Evaluation { Release_ID = TheRelease.Id, Section_ID = sct.Id, Report_ID = sct.Report_ID, Evaluator_ID = 1, Status_ID = 1 }; stm.Section_Evaluations.Add(re); } stm.SaveChanges(); }
private void BtnSave_Click(object sender, RoutedEventArgs e) { ste.Sections.Add(TheSection); string currentUser = System.Security.Principal.WindowsIdentity.GetCurrent().Name; var newSectionEval = new Section_Evaluation { Evaluator_ID = 1, Status_ID = 1, Release_ID = CurrentRelease.Id, Report_ID = TheReport.Id, AddedBy = currentUser, DateAdded = DateTime.Now, DateModified = DateTime.Now, ModifiedBy = currentUser }; ste.Section_Evaluations.Add(newSectionEval); ste.SaveChanges(); StringLabel = "Saved Successfully"; formParent.UpdateSections(); //formParent.DgReport.Items.Refresh(); }