示例#1
0
文件: Form1.cs 项目: smr2804/demo
        private void button2_Click(object sender, EventArgs e)
        {
            EmployeeDataController employeeDataController = new EmployeeDataController();
            EmployeeOptionalInfo   employeeOptInfo        = employeeDataController.GetExtendedEmployeeData(int.Parse(textBox1.Text));

            if (employeeOptInfo != null)
            {
                textBox7.Text = employeeOptInfo.EmpEduInfo;
                textBox8.Text = employeeOptInfo.EmpFamilyInfo;
                textBox9.Text = employeeOptInfo.EmpHobbies;
            }
            btnUpdate.Enabled = true;
        }
示例#2
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            EmployeeDataController employeeDataController = new EmployeeDataController();
            EmployeeOptionalInfo   employeeOptInfo        = employeeDataController.GetExtendedEmployeeData(int.Parse(TextBox1.Text));

            if (employeeOptInfo != null)
            {
                Label6.Text    = "Educational Info: " + employeeOptInfo.EmpEduInfo;
                Label7.Text    = "Family Details: "; // +employeeOptInfo.EmpFamilyInfo;
                Label8.Text    = "Hobbies: ";        // +employeeOptInfo.EmpHobbies;
                Label6.Visible = true;
                Label7.Visible = true;
                Label8.Visible = true;
            }
        }