private void btnSearchDepositByCourse_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.studentDepositListTableAdapter.FillByUserNameCourseID(this.depositListDataSet.StudentDepositList, frmCourseSelect.CourseID, this.UserName);
     }
     else
     {
         if (frmCourseSelect.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         this.studentDepositListTableAdapter.FillByCourseID(this.depositListDataSet.StudentDepositList, frmCourseSelect.CourseID);
     }
     txtShowDepositRange.Text = frmCourseSelect.CourseTypeName + " - " + frmCourseSelect.CourseSubtypeName + " - " + frmCourseSelect.CourseName;
 }
 private void btnSearchDepositByCourseWithDate_Click(object sender, EventArgs e)
 {
     CourseSelectForm frmCourseSelect = new CourseSelectForm();
     DateTime beginDate = dtDepositBeginDate.Value;
     beginDate = new DateTime(beginDate.Year, beginDate.Month, beginDate.Day, 0, 0, 0);
     DateTime endDate = dtDepositEndDate.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.studentDepositListTableAdapter.FillByUserNameCourseIDWithDate(this.depositListDataSet.StudentDepositList, beginDate, endDate, frmCourseSelect.CourseID, this.UserName);
     }
     else
     {
         if (frmCourseSelect.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         this.studentDepositListTableAdapter.FillByCourseIDWithDate(this.depositListDataSet.StudentDepositList, frmCourseSelect.CourseID, beginDate, endDate);
     }
     txtShowDepositRange.Text = frmCourseSelect.CourseTypeName + " - " + frmCourseSelect.CourseSubtypeName + " - " + frmCourseSelect.CourseName + "    " + beginDate.ToShortDateString() + " - " + endDate.ToShortDateString();
 }