12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using EMIS.CommonLogic.CalendarManage;
- using EMIS.ViewModel.CalendarManage;
- using EMIS.ViewModel;
- using Bowin.Common.Utility;
- namespace EMIS.Web.Controllers.CalendarManage
- {
- public class CalendarController : Controller
- {
- public ICalendarViewServices CalendarViewServices { get; set; }
- /// <summary>
- /// 学年校历页面
- /// </summary>
- /// <returns></returns>
- public ActionResult Index()
- {
- return View();
- }
- [HttpPost]
- public ActionResult GetCalendarView(Guid schoolYearID)
- {
- try
- {
- var calendarView = CalendarViewServices.GetCalendarViewBySchoolYearID(schoolYearID);
- return Json(new ReturnMessage<CalendarView>
- {
- IsSuccess = true,
- Data = calendarView
- });
- }
- catch (Exception ex)
- {
- return Json(new ReturnMessage
- {
- IsSuccess = false,
- Message = ex.Message
- });
- }
- }
- [HttpPost]
- public ActionResult Excel()
- {
- var schoolyear = Request.Form["SchoolYearDropdown"].ParseStrTo<Guid>();
- CalendarViewServices.Excel(schoolyear.Value, "学年校历" + DateTime.Now.ToString("yyyyMMddhhmmss"));
- return Json(new ReturnMessage()
- {
- IsSuccess = false,
- Message = "导出成功!"
- });
- }
- }
- }
|