private void btnSearchDepositByCourseTypeWithDate_Click(object sender, EventArgs e)
 {
     CourseTypeSelectForm frmCourseTypeSelect = new CourseTypeSelectForm();
     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)
     {
         frmCourseTypeSelect.isPrivate = true;
         frmCourseTypeSelect.userName = this.UserName;
         if (frmCourseTypeSelect.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         this.studentDepositListTableAdapter.FillByUserNameCourseTypeWithDate(this.depositListDataSet.StudentDepositList, frmCourseTypeSelect.CourseTypeId, beginDate, endDate, this.UserName);
     }
     else
     {
         if (frmCourseTypeSelect.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         this.studentDepositListTableAdapter.FillByCourseTypeWithDate(this.depositListDataSet.StudentDepositList, frmCourseTypeSelect.CourseTypeId, beginDate, endDate);
     }
     txtShowDepositRange.Text = frmCourseTypeSelect.CourseTypeName + "    " + beginDate.ToShortDateString() + " - " + endDate.ToShortDateString();
 }
 private void btnSearchDepositByCourseType_Click(object sender, EventArgs e)
 {
     CourseTypeSelectForm frmCourseTypeSelect = new CourseTypeSelectForm();
     if (UserType == 0)
     {
         frmCourseTypeSelect.isPrivate = true;
         frmCourseTypeSelect.userName = this.UserName;
         if (frmCourseTypeSelect.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         this.studentDepositListTableAdapter.FillByUserNameCourseType(this.depositListDataSet.StudentDepositList, frmCourseTypeSelect.CourseTypeId, this.UserName);
     }
     else
     {
         if (frmCourseTypeSelect.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         this.studentDepositListTableAdapter.FillByCourseType(this.depositListDataSet.StudentDepositList, frmCourseTypeSelect.CourseTypeId);
     }
     txtShowDepositRange.Text = frmCourseTypeSelect.CourseTypeName;
 }