private void btnSearchByCourse_Click(object sender, EventArgs e) { CourseSelectForm frmCourseSelect = new CourseSelectForm(); if (UserType == 0) { frmCourseSelect.isPrivate = true; frmCourseSelect.userName = this.UserName; if (frmCourseSelect.ShowDialog() != DialogResult.OK) { return; } this.leaveCourseTableAdapter.FillByUserNameCourse(this.leaveCourseDataSet.LeaveCourse, frmCourseSelect.CourseID, this.UserName); } else { if (frmCourseSelect.ShowDialog() != DialogResult.OK) { return; } this.leaveCourseTableAdapter.FillByCourse(this.leaveCourseDataSet.LeaveCourse, frmCourseSelect.CourseID); } txtShowRange.Text = frmCourseSelect.CourseTypeName + " - " + frmCourseSelect.CourseSubtypeName + " - " + frmCourseSelect.CourseName; }
private void btnSearchByCourseWithDate_Click(object sender, EventArgs e) { CourseSelectForm frmCourseSelect = new CourseSelectForm(); DateTime beginDate = dtRefundBeginDate.Value; beginDate = new DateTime(beginDate.Year, beginDate.Month, beginDate.Day, 0, 0, 0); DateTime endDate = dtRefundEndDate.Value; endDate = new DateTime(endDate.Year, endDate.Month, endDate.Day, 0, 0, 0); if (UserType == 0) { frmCourseSelect.isPrivate = true; frmCourseSelect.userName = this.UserName; if (frmCourseSelect.ShowDialog() != DialogResult.OK) { return; } this.leaveCourseTableAdapter.FillByUserNameCourseWithDate(this.leaveCourseDataSet.LeaveCourse, frmCourseSelect.CourseID, beginDate, endDate, this.UserName); } else { if (frmCourseSelect.ShowDialog() != DialogResult.OK) { return; } this.leaveCourseTableAdapter.FillByCourseWithDate(this.leaveCourseDataSet.LeaveCourse, frmCourseSelect.CourseID, beginDate, endDate); } txtShowRange.Text = frmCourseSelect.CourseTypeName + " - " + frmCourseSelect.CourseSubtypeName + " - " + frmCourseSelect.CourseName + " " + beginDate.ToShortDateString() + " - " + endDate.ToShortDateString(); }
private void btnSearchByCourse_Click(object sender, EventArgs e) { CourseSelectForm frmCourseSelect = new CourseSelectForm(); if (frmCourseSelect.ShowDialog() != DialogResult.OK) { return; } studentsTableAdapter.FillByCourse(studentsDataSet.Students, frmCourseSelect.CourseID); this.Text = "学生资料管理 - [" + frmCourseSelect.CourseTypeName + " - " + frmCourseSelect.CourseSubtypeName + " - " + frmCourseSelect.CourseName + "]"; txtShowRange.Text = frmCourseSelect.CourseTypeName + " - " + frmCourseSelect.CourseSubtypeName + " - " + frmCourseSelect.CourseName; }