public void SetData(EducationInfo info) { this.typeComboBox.Text = info.Type; this.buildTime.Value = info.BuidTime; this.classNum.Text = info.ClassNum; this.houseType.Text = info.HouseType; this.studentNum.Text = info.StudentNum; this.HouseProperty.Text = info.HouseProperty; this.teacherNum.Text = info.TeacherNum; this.ownerProperty.Text = info.OwnerProperty; this.ownerName.Text = info.OwnerName; this.zhandiSquere.Text = info.ZhandiSquere; this.huodongSquere.Text = info.HuodongSquere; this.jianzhuSquere.Text = info.SchoolJianzhuSquere; }
private void clearBtn_Click(object sender, EventArgs e) { EducationInfo educationinfo = new EducationInfo(); educationinfo.Type = null; educationinfo.BuidTime = DateTime.Now; educationinfo.ClassNum = null; educationinfo.HouseType = null; educationinfo.StudentNum = null; educationinfo.HouseProperty = null; educationinfo.TeacherNum = null; educationinfo.OwnerProperty = null; educationinfo.OwnerName = null; educationinfo.ZhandiSquere = null; educationinfo.HuodongSquere = null; educationinfo.SchoolJianzhuSquere = null; SetData(educationinfo); }
public EducationInfo GetData() { EducationInfo info = new EducationInfo(); info.Type = this.typeComboBox.Text; info.BuidTime = this.buildTime.Value.Date; info.ClassNum = this.classNum.Text; info.HouseType = this.houseType.Text; info.StudentNum = this.studentNum.Text; info.HouseProperty = this.HouseProperty.Text; info.TeacherNum = this.teacherNum.Text; info.OwnerProperty = this.ownerProperty.Text; info.OwnerName = this.ownerName.Text; info.ZhandiSquere = this.zhandiSquere.Text; info.HuodongSquere = this.huodongSquere.Text; info.SchoolJianzhuSquere = this.jianzhuSquere.Text; return(info); }