public TeacherForm(List <Teacher> teacherSelList, ITeacherFormReq ITeacherFormReq, string currentCourseID, RefreshUI RefreshUI) { this.RefreshUI = RefreshUI; this.currentCourseID = currentCourseID; this.ITeacherFormReq = ITeacherFormReq; this.TeacherSelList = teacherSelList; InitializeComponent(); this.initData(); this.initView(); }
/// <summary> /// 注意这个初始化的调用先后顺序是不能颠倒的 /// </summary> private void initData() { if (this.ICourseFormReq == null) { this.ICourseFormReq = ImplCourseFormReq.NewInstance(); } if (this.ITeacherFormReq == null) { this.ITeacherFormReq = ImplTeacherFormReq.NewInstance(); } if (this.ITextbookFormReq == null) { this.ITextbookFormReq = ImplTextbookFormReq.NewInstance(); } //课程列表 this.LvCourseInitData(); //选中首个课程 this.lvCourse.Items[0].Selected = true; this.CurrentlCourse = this.CourseList[0]; }