private void lbtAddnew_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { Test test = new Test(); if (_filiterBy == FiliterTestByEnum.TestArea) { test.TestingArea = DataRepository.GetTestingAreaById(_parentId); } //else if (_filiterBy == FiliterTestByEnum.TestGroup) //{ // test.TestingGroup = DataRepository.GetTestingGroupById(_parentId); // test.TestingArea = test.TestingGroup.TestingArea; //} TestFrom frm = new TestFrom(test, MdiParentForm); frm.ShowDialog(); }
public static void ExampleA() { TestFrom a = new TestFrom() { Name = "1", Age = 2, Weight = 3, LevelEnum = LevelEnum.第一层, Height = 100, Sex = true }; PrintEntityInfo(a); Console.WriteLine("-----"); TestTo b = Mapping <TestFrom, TestTo>(a); Console.WriteLine("-----"); PrintEntityInfo(b); }
private void newTestToolStripMenuItem_Click(object sender, EventArgs e) { TestFrom frm = new TestFrom(new Test(), this); frm.ShowDialog(); }
public override void EditSelectedItem() { TestFrom frm = new TestFrom(GetSelectedTest(), MdiParentForm); frm.ShowDialog(); }