1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using EMIS.ViewModel;
- using EMIS.CommonLogic.CalendarManage;
- using Bowin.Web.Controls.Mvc;
- using EMIS.ViewModel.CalendarManage;
- namespace EMIS.Web.Controllers.CalendarManage
- {
- [Authorization]
- public class ArrangementsController : Controller
- {
- public IArrangementServices arrangementServices { get; set; }
-
- /// <summary>
- /// 周工作表页面
- /// </summary>
- /// <returns></returns>
- public ActionResult List()
- {
- return View();
- }
- /// <summary>
- /// 列表
- /// </summary>
- /// <param name="pararms"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult List(QueryParamsModel pararms)
- {
- return Json(arrangementServices.GetArrangementViewGrid());
- }
- /// <summary>
- /// 保存
- /// </summary>
- /// <returns></returns>
- [HttpPost]
- public ActionResult Edit()
- {
- try
- {
- var arrangementsList = DataGrid.GetTableData<ArrangementView>("dgArrangementsList");
- arrangementServices.ArrangementAdd(arrangementsList);
- return Json(new ReturnMessage()
- {
- IsSuccess = true,
- Message = "保存成功!"
- });
- }
- catch (Exception ex)
- {
- return Json(new ReturnMessage()
- {
- IsSuccess = true,
- Message = "保存失败,原因:" + ex.Message + "!"
- });
- }
- }
- [HttpPost]
- public ActionResult IsOnWork(int weekday, Guid courseTimeID)
- {
- try
- {
- var isOnWork = arrangementServices.IsOnWork(weekday, courseTimeID);
- return Json(isOnWork);
- }
- catch (Exception ex)
- {
- return Json(false);
- }
- }
- }
- }
|