PlanningGraduateDateHelper.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace EMIS.Utility
  6. {
  7. public static class PlanningGraduateDateHelper
  8. {
  9. /// <summary>
  10. /// 查询对应的预计毕业日期
  11. /// </summary>
  12. /// <param name="graduateSchoolyearDate"></param>
  13. /// <returns></returns>
  14. public static DateTime GetPlanningGraduateDate(DateTime graduateSchoolyearDate)
  15. {
  16. if (graduateSchoolyearDate.Month >= 1 && graduateSchoolyearDate.Month <= 6)
  17. {
  18. int month = Convert.ToInt32(EMIS.Utility.Const.LOCAL_SETTING_PlanningGraduateDateAutumnMonth);
  19. int day = Convert.ToInt32(EMIS.Utility.Const.LOCAL_SETTING_PlanningGraduateDateAutumnDay);
  20. return new DateTime(graduateSchoolyearDate.Year, month, day);
  21. }
  22. else
  23. {
  24. int month=Convert.ToInt32(EMIS.Utility.Const.LOCAL_SETTING_PlanningGraduateDateSpringMonth);
  25. int day=Convert.ToInt32( EMIS.Utility.Const.LOCAL_SETTING_PlanningGraduateDateSpringDay);
  26. return new DateTime((graduateSchoolyearDate.Year + 1), month, day);
  27. }
  28. }
  29. }
  30. }