示例#1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FEdit frm = new FEdit();

            frm.Render();
            frm.ShowDialogWithMask();
            if (frm.IsOK)
            {
                ShowSuccessDialog(frm.Person.ToString());
            }

            frm.Dispose();
        }
示例#2
0
        private void btnEdit_Click(object sender, System.EventArgs e)
        {
            Person person = new Person();

            person.Name       = "SunnyUI";
            person.Sex        = Sex.Male;
            person.Age        = 18;
            person.Department = "研发部";
            person.Birthday   = new DateTime(2002, 1, 1);

            FEdit frm = new FEdit();

            frm.Render();
            frm.Person = person;
            frm.ShowDialog();
            if (frm.IsOK)
            {
                this.ShowSuccessDialog(frm.Person.ToString());
            }

            frm.Dispose();
        }