1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- using EMIS.CommonLogic.Students;
- using System;
- using System.Net;
- using System.Net.Http;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using EMIS.ViewModel;
- using EMIS.ViewModel.SystemView;
- using EMIS.CommonLogic.SystemServices;
- using EMIS.ViewModel.Students;
- using EMIS.Utility.FormValidate;
- namespace EMIS.Web.ServiceControllers.StudentManage
- {
- public class StudentServicesController: Controller
- {
- public IStudentsServices StudentsServices { get; set; }
- public IUserServices userServices { get; set; }
- public IStudentRecordServices studentRecordServices { get; set; }
- public ActionResult GetStudentViewByLoginID(string loginID)
- {
- return Json(StudentsServices.GetStudentViewByLoginID(loginID), JsonRequestBehavior.AllowGet);
- }
- public ActionResult GetStudentViewByUserID(Guid userID)
- {
- return Json(StudentsServices.GetStudentfileView(userID), JsonRequestBehavior.AllowGet);
- }
- public ActionResult GetStudentViewByIDNum(string idNum)
- {
- return Json(StudentsServices.GetStudentViewByIDNum(idNum), JsonRequestBehavior.AllowGet);
- }
- //public ActionResult GetStudentChangeFeilds(Guid? UserID)
- //{
- // return Json(studentRecordServices.GetStudentChangeFeilds(UserID.Value), JsonRequestBehavior.AllowGet);
- //}
- //public ActionResult StudentChangeSave(RegistView Model, Guid? UserID)
- //{
- // try
- // {
- // userServices.StudentRegist(Model);
- // return Json(new ReturnMessage { IsSuccess = true, Message = "保存成功" });
- // }
- // catch (Exception ex)
- // {
- // return Json(new ReturnMessage { IsSuccess = false, Message = "保存失败,原因:" + ex.Message });
- // }
- //}
- public ActionResult SaveStudentChange(StudentsView Model, Guid UserID)
- {
- try
- {
- HttpContext.User = new CustomPrincipal() { UserID = UserID };
- StudentsServices.Save(Model);
- return Json(new ReturnMessage { IsSuccess = true, Message = "保存成功" });
- }
- catch (Exception ex)
- {
- return Json(new ReturnMessage { IsSuccess = false, Message = "保存失败,原因:" + ex.Message });
- }
- }
- }
- }
|