예제 #1
0
        private void BtnSave_Click(object sender, RoutedEventArgs e)
        {
            var sec = new Section_Evaluation
            {
                Evaluator_ID = 1,
                Comment      = "Testing 123"
            };

            theSection.Section_Evaluation.Add(sec);
        }
예제 #2
0
        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();
        }
예제 #3
0
        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();
        }