public TestGroupPane(TestingGroup testingGroup, bool enableCtr) { this._testingGroup = testingGroup; this._enableCtr = enableCtr; InitializeComponent(); SetControlState(); PopTestingAreas(); BindTestingGroup(); }
public TestingGroupFrom(TestingGroup tgroup, Form mdiparent) { this._testingGroup = tgroup; this._mdiparent = mdiparent; InitializeComponent(); lqtToolStrip1.SaveAndCloseClick += new EventHandler(lqtToolStrip1_SaveAndCloseClick); lqtToolStrip1.SaveAndNewClick += new EventHandler(lqtToolStrip1_SaveAndNewClick); PopTestingAreas(); LoadTestingAreaCtr(); }
public static void DeleteTestingGroup(TestingGroup g) { DaoFactory.GetDaoFactory().CreateTestingGroupDao().Delete(g); }
public static void SaveOrUpdateTestingGroup(TestingGroup tgroup) { DaoFactory.GetDaoFactory().CreateTestingGroupDao().SaveOrUpdate(tgroup); }
private void butNewgroup_Click(object sender, EventArgs e) { TestingGroup tg = new TestingGroup(); tg.TestingArea = _testingArea; TestingGroupFrom frm = new TestingGroupFrom(tg, _mdiparent); frm.ShowDialog(); DisplayTestingGroup(); }
public void RebindTestingGroup(TestingGroup testgroup) { this._testingGroup = testgroup; BindTestingGroup(); }
public TestGroupPane(TestingGroup testinggroup) : this(testinggroup, false) { }
private void butNewgroup_Click(object sender, EventArgs e) { if (CreateOrEditTestingGroup != null) { TestingGroup tg = new TestingGroup(); tg.TestingArea = _testingArea; CreateOrUpdateEventArgs eArgs = new CreateOrUpdateEventArgs(tg); CreateOrEditTestingGroup(this, eArgs); } }
private IList<ImportTestData> GetDataRow(DataSet ds) { string testName; string groupName; string areaName; string aName = ""; string gName = ""; TestingArea testArea = null; TestingGroup testgroup = null; int rowno = 0; bool haserror; IList<ImportTestData> rdlist = new List<ImportTestData>(); foreach (DataRow dr in ds.Tables[0].Rows) { rowno++; haserror=false; testName = Convert.ToString(dr[0]).Trim() ; areaName = Convert.ToString(dr[1]).Trim() ; groupName = Convert.ToString(dr[2]).Trim() ; if (String.IsNullOrEmpty(groupName)) groupName = TestingGroup.GetDefaultGroupName; ImportTestData rd = new ImportTestData(testName, groupName, areaName, rowno); if (aName != areaName) { if (!string.IsNullOrEmpty(areaName)) { testArea = DataRepository.GetTestingAreaByName(areaName); if (testArea == null) { testArea = new TestingArea(); testArea.AreaName = areaName; DataRepository.SaveOrUpdateTestingArea(testArea); } } else testArea = null; aName = areaName; } rd.TestArea = testArea; if (testArea != null) { if (gName != groupName) { testgroup = DataRepository.GetTestingGroupByName(testArea.Id, groupName); if (testgroup == null) { testgroup = new TestingGroup(); testgroup.GroupName = groupName; testgroup.TestingArea = testArea; DataRepository.SaveOrUpdateTestingGroup(testgroup); } gName = groupName; } rd.TestGroup = testgroup; if (!string.IsNullOrEmpty(testName)) rd.IsExist = DataRepository.GetTestByNameAndTestArea(testName,testArea.Id) != null; else haserror = true; } else haserror = true; rd.HasError = haserror; rdlist.Add(rd); } return rdlist; }
void lqtToolStrip1_SaveAndNewClick(object sender, EventArgs e) { try { LQTUserMessage msg = SaveOrUpdateObject(); ((LqtMainWindowForm)_mdiparent).ShowStatusBarInfo(msg.Message, true); //DataRepository.CloseSession(); ((LqtMainWindowForm)_mdiparent).BuildNavigationMenu(); _testingGroup = new TestingGroup(); //_testingGroup.TestingArea = LqtUtil.GetComboBoxValue<TestingArea>(comTestarea); LoadTestingAreaCtr(); } catch (LQTUserException ex) { new FrmShowError(CustomExceptionHandler.ShowExceptionText(ex)).ShowDialog(); } catch (Exception ex) { new FrmShowError(CustomExceptionHandler.ShowExceptionText("There is already a Test-Group with this group name.", ex)).ShowDialog(); } }