Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        private void newTestToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TestFrom frm = new TestFrom(new Test(), this);

            frm.ShowDialog();
        }
Esempio n. 4
0
        public override void EditSelectedItem()
        {
            TestFrom frm = new TestFrom(GetSelectedTest(), MdiParentForm);

            frm.ShowDialog();
        }